From ead931ef3cbce570f64cc011ecded61925620450 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Tue, 28 Jul 2026 23:49:01 +0200 Subject: [PATCH] Safeguard against zero count entries in statistics list. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is a legitimate, if rare, way to get nonReentrantCount == 0 with total != 0 — an outer zone that never terminated before the capture ended, whose reentrant inner zone did terminate. The outer never contributes to slz (no end event), but it did increment the stack count, so the inner one is correctly recorded as a reentry. --- profiler/src/profiler/TracyView_Statistics.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/profiler/src/profiler/TracyView_Statistics.cpp b/profiler/src/profiler/TracyView_Statistics.cpp index 93195452..2166b260 100644 --- a/profiler/src/profiler/TracyView_Statistics.cpp +++ b/profiler/src/profiler/TracyView_Statistics.cpp @@ -245,6 +245,7 @@ void View::DrawStatistics() total = it->second.nonReentrantTotal; break; } + if( count == 0 ) continue; if( !filterActive ) { srcloc.push_back_no_space_check( SrcLocZonesSlim { it->first, (uint16_t)it->second.threadCnt.size(), count, total } );