From 1c50138f8584b66a9ecace0f07bfefecf1eacd50 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 12 Sep 2026 20:33:09 +0200 Subject: [PATCH] Report failed second-trace loads in compare instead of crashing. The compare load thread caught only UnsupportedVersion, so a corrupted or otherwise unloadable second trace escaped the thread as std::terminate. Catch the same set as the main trace load and route it to the existing bad-version dialog. --- profiler/src/profiler/TracyView_Compare.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/profiler/src/profiler/TracyView_Compare.cpp b/profiler/src/profiler/TracyView_Compare.cpp index 2a8a3b8b..0388102a 100644 --- a/profiler/src/profiler/TracyView_Compare.cpp +++ b/profiler/src/profiler/TracyView_Compare.cpp @@ -245,6 +245,20 @@ void View::DrawCompare() m_compare.badVer.state = BadVersionState::UnsupportedVersion; m_compare.badVer.version = e.version; } + catch( const tracy::LegacyVersion& e ) + { + m_compare.badVer.state = BadVersionState::LegacyVersion; + m_compare.badVer.version = e.version; + } + catch( const tracy::LoadFailure& e ) + { + m_compare.badVer.state = BadVersionState::LoadFailure; + m_compare.badVer.msg = e.msg; + } + catch( const tracy::FileReadError& ) + { + m_compare.badVer.state = BadVersionState::ReadError; + } } ); } }