From 255f465a8f1e29991408b93f77cbfbc97e267b95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Gr=C3=A9goire?= Date: Wed, 8 Oct 2025 07:47:51 +0200 Subject: [PATCH] Fix uninitialized Worker::m_pending* loaded traces. This was causing issues in the Infos -> Trace Statistics window as `GetCallstackFrameCount` uses `m_pendingCallstackFrames`. Just in case, init those all those variables where declared instead of constructor. --- server/TracyWorker.cpp | 8 -------- server/TracyWorker.hpp | 16 ++++++++-------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index 483e3233..b1dffe1a 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -263,14 +263,6 @@ Worker::Worker( const char* addr, uint16_t port, int64_t memoryLimit ) , m_buffer( new char[TargetFrameSize*3 + 1] ) , m_bufferOffset( 0 ) , m_inconsistentSamples( false ) - , m_pendingStrings( 0 ) - , m_pendingThreads( 0 ) - , m_pendingFibers( 0 ) - , m_pendingExternalNames( 0 ) - , m_pendingSourceLocation( 0 ) - , m_pendingCallstackFrames( 0 ) - , m_pendingCallstackSubframes( 0 ) - , m_pendingSymbolCode( 0 ) , m_memoryLimit( memoryLimit ) , m_callstackFrameStaging( nullptr ) , m_traceVersion( CurrentVersion ) diff --git a/server/TracyWorker.hpp b/server/TracyWorker.hpp index 2aa09a0e..c76cd7cf 100644 --- a/server/TracyWorker.hpp +++ b/server/TracyWorker.hpp @@ -1049,14 +1049,14 @@ private: StringLocation m_pendingSingleString = {}; StringLocation m_pendingSecondString = {}; - uint32_t m_pendingStrings; - uint32_t m_pendingThreads; - uint32_t m_pendingFibers; - uint32_t m_pendingExternalNames; - uint32_t m_pendingSourceLocation; - uint32_t m_pendingCallstackFrames; - uint8_t m_pendingCallstackSubframes; - uint32_t m_pendingSymbolCode; + uint32_t m_pendingStrings = 0; + uint32_t m_pendingThreads = 0; + uint32_t m_pendingFibers = 0; + uint32_t m_pendingExternalNames = 0; + uint32_t m_pendingSourceLocation = 0; + uint32_t m_pendingCallstackFrames = 0; + uint8_t m_pendingCallstackSubframes = 0; + uint32_t m_pendingSymbolCode = 0; CallstackFrameData* m_callstackFrameStaging; uint64_t m_callstackFrameStagingPtr;