tracy
tracy copied to clipboard
tracy::DecodeCallstackPtr crashes if called too early
The callstack decoder would be very useful to hook into for applications, e.g. to report a callstack on an assert or in a log.
This is almost doable now including #include <client/TracyCallstack.hpp>
and using tracy::DecodeCallstackPtr
The issue I am running into is if you try to call it too early it will crash because the callstack background worker hasn't finished yet. All I would need is some way to wait on these threads but I can't see a way to do that. I am using it with vcpkg so I guess a feature would need to be added to define TRACY_DBGHELP_LOCK?
Currently my workaround is to just sleep until at least 1 second has passed since app startup before calling tracy::DecodeCallstackPtr