From afe5c8dfbed060ff0bfe584af028175df6fc4a03 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Thu, 23 May 2024 19:48:33 +0200 Subject: [PATCH] Don't try to create FrameData in ProcessFrameMarkEnd(). --- server/TracyWorker.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index 97be71e1..b17a7222 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -5055,15 +5055,18 @@ void Worker::ProcessFrameMarkStart( const QueueFrameMark& ev ) void Worker::ProcessFrameMarkEnd( const QueueFrameMark& ev ) { - auto fd = m_data.frames.Retrieve( ev.name, [this] ( uint64_t name ) { - auto fd = m_slab.AllocInit(); - fd->name = name; - fd->continuous = 0; - return fd; + auto fd = m_data.frames.Retrieve( ev.name, [this] ( uint64_t name ) -> FrameData* { + return nullptr; }, [this] ( uint64_t name ) { Query( ServerQueryFrameName, name ); } ); + if( !fd ) + { + if( !m_ignoreFrameEndFaults ) FrameEndFailure(); + return; + } + assert( fd->continuous == 0 ); if( fd->frames.empty() ) {