SUMMARY $ heaptrack -a /home/dfaure/heaptrack.akonadiserver.14228.zst (some old file I had lying around, in case it matters) Filtered for a time range (around the first 10 to 20% of the recording) OBSERVED RESULT FATAL: ASSERT: "m_data.labels.size() < ChartRows::MAX_NUM_COST" in file /d/kde/src/5/extragear/sdk/heaptrack/src/analyze/gui/chartmodel.cpp, line 181 EXPECTED RESULT Keine assert :-) SOFTWARE/OS VERSIONS Linux: OpenSUSE Tumbleweed snapshot 20210810 Heaptrack: git master from today (2a1e071) Qt Version: 5.15.3-kde
(gdb) p m_data.labels.d->size $5 = 20 (gdb) p (int) ChartRows::MAX_NUM_COST $7 = 20
178│ void ChartModel::resetData(const ChartData& data) 179│ { 180│ Q_ASSERT(data.resultData); 181├───> Q_ASSERT(m_data.labels.size() < ChartRows::MAX_NUM_COST); 182│ beginResetModel(); 183│ m_data = data; Was this means to be an assert on data rather m_data? It seems odd to test the old data we're about to replace....
Git commit b9e2f195909871608842d18db071296263b84d7a by Milian Wolff. Committed on 19/08/2021 at 06:46. Pushed by mwolff into branch 'master'. Fix latent bug in ChartData creation We created too many labeled values, leading to an overflow of the ChartRows::cost array. Previously, this assert didn't hit until filtering, because the model checked the size of the wrong container. This patch fixes this all: We now ensure we stay within ChartRows::MAX_NUM_COST but also increase it by one to keep the same size as before. Furthermore, we now correctly assert the size of the right container, and additionally check this already during parsing and not only later when the model is set. M +1 -1 src/analyze/gui/chartmodel.cpp M +1 -1 src/analyze/gui/chartmodel.h M +2 -1 src/analyze/gui/parser.cpp https://invent.kde.org/sdk/heaptrack/commit/b9e2f195909871608842d18db071296263b84d7a