diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index d7d2de3c..46f0ed20 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -2439,6 +2439,13 @@ void Worker::MemFreeFailure( uint64_t thread ) m_failureData.srcloc = 0; } +void Worker::FrameEndFailure() +{ + m_failure = Failure::ZoneEnd; + m_failureData.thread = 0; + m_failureData.srcloc = 0; +} + void Worker::ProcessZoneValidation( const QueueZoneValidation& ev ) { auto td = NoticeThread( ev.thread ); @@ -2496,7 +2503,7 @@ void Worker::ProcessFrameMarkEnd( const QueueFrameMark& ev ) const auto time = TscTime( ev.time ); if( fd->frames.empty() ) { - assert( m_onDemand ); + FrameEndFailure(); return; } assert( fd->frames.back().end == -1 ); @@ -3857,7 +3864,8 @@ static const char* s_failureReasons[] = { "Received zone end event without a matching zone begin event.", "Zone text transfer destination doesn't match active zone.", "Zone name transfer destination doesn't match active zone.", - "Memory free event without a matching allocation." + "Memory free event without a matching allocation.", + "Discontinuous frame begin/end mismatch.", }; static_assert( sizeof( s_failureReasons ) / sizeof( *s_failureReasons ) == (int)Worker::Failure::NUM_FAILURES, "Missing failure reason description." ); diff --git a/server/TracyWorker.hpp b/server/TracyWorker.hpp index 30995ece..dea28be9 100644 --- a/server/TracyWorker.hpp +++ b/server/TracyWorker.hpp @@ -189,6 +189,7 @@ public: ZoneText, ZoneName, MemFree, + FrameEnd, NUM_FAILURES }; @@ -350,6 +351,7 @@ private: void ZoneTextFailure( uint64_t thread ); void ZoneNameFailure( uint64_t thread ); void MemFreeFailure( uint64_t thread ); + void FrameEndFailure(); tracy_force_inline void CheckSourceLocation( uint64_t ptr ); void NewSourceLocation( uint64_t ptr );