tracy icon indicating copy to clipboard operation
tracy copied to clipboard

Fix: Hang on shutdown with enabled system tracing

Open 6yry6e opened this issue 8 months ago • 0 comments

The issue occur when the client wants to shutdown profiling but transfer all data to the server before exiting. The client code looks like it: tracy::GetProfiler().RequestShutdown(); while (!tracy::GetProfiler().HasShutdonwFinished()) { yield... }

If the client doesn't send any zones/data to the queue, it works fine. But when system tracing is enabled it constantly fills queue with new data, the queue may never become empty, so we never reach exit conditions and the app hangs.

It look like solution to that problem is shutting down system tracing before sending remaining data to the server. Another possible fix is to check ShouldExit in the systrace callback, but that's appear to me as a waste of cycles.

6yry6e avatar Mar 28 '25 23:03 6yry6e