From e59601cf1c6f9ad2f70cf4753aa1f645bf6ec956 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Gr=C3=A9goire?= Date: Wed, 20 May 2026 17:51:42 +0200 Subject: [PATCH] Fix ProfilerWorker hang when TRACY_HAS_CALLSTACK is not defined --- public/client/TracyProfiler.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/client/TracyProfiler.cpp b/public/client/TracyProfiler.cpp index e7b1360a..d1a67831 100644 --- a/public/client/TracyProfiler.cpp +++ b/public/client/TracyProfiler.cpp @@ -1971,8 +1971,12 @@ void Profiler::Worker() } #ifdef TRACY_ON_DEMAND +# ifdef TRACY_HAS_CALLSTACK + // Only wait on m_symbolsBusy if the symbol worker thread exists; otherwise nobody + // ever resets the flag and we'd spin forever on the second connection. while( m_symbolsBusy.load( std::memory_order_acquire ) ) { YieldThread(); } m_symbolsBusy.store( true, std::memory_order_release ); +# endif const auto currentTime = GetTime(); ClearQueues( token ); m_connectionId.fetch_add( 1, std::memory_order_release );