| Summary: | Heaptrack GUI crash when opening a zst file | ||
|---|---|---|---|
| Product: | [Applications] Heaptrack | Reporter: | Andrea Cavalli <andrea> |
| Component: | general | Assignee: | Milian Wolff <mail> |
| Status: | RESOLVED FIXED | ||
| Severity: | crash | ||
| Priority: | NOR | ||
| Version First Reported In: | 1.2.0 | ||
| Target Milestone: | --- | ||
| Platform: | Appimage | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/sdk/heaptrack/commit/d525eee12ee379849ba005a658ec6161c77bff0a | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
|
Description
Andrea Cavalli
2020-10-19 10:53:15 UTC
A 500MB zst compressed file? 1329658135 lines! Woha :) Try to reduce the time you are profiling if at all possible. I doubt you'll gain much by looking at _that much_ data! I wonder if that's maybe overflowing the allocation index then, leading to this assertion. Anyhow, I'll try to investigate and reproduce. Cheers reproduced in a debug build, happens quickly on start - seems unrelated to the real big size of the file: : 1 i: 6598 v: 1 R: 8242528 +: 657714438 -: 654883794 a: 268508 c: 8242528 I: 1 #: 2 X: 1 s: 2400 t: 297335 Git commit d525eee12ee379849ba005a658ec6161c77bff0a by Milian Wolff. Committed on 20/10/2020 at 07:00. Pushed by mwolff into branch 'master'. Fix assertion in AccumulatedTraceData::mapToAllocationIndex When we encounter trace indices in the order A, B, A, where the index A is the current maximum but B is less than that, we incorrectly mapped the second occurrence of A to B. Fix this by explicitly remembering the allocation index of the maximum index. This allows us to keep the fast-path code and at the same time prevents the improperly attribution. M +3 -2 src/analyze/accumulatedtracedata.cpp M +1 -0 src/analyze/accumulatedtracedata.h https://invent.kde.org/sdk/heaptrack/commit/d525eee12ee379849ba005a658ec6161c77bff0a OK, fixed the issue. And looking at the heaptrack file, you should seriously consider using sqlite3_prepare and then reuse the queries instead of sqlite3_exec'ing all the time - I'm assuming that this would remove millions of temporary allocations from your code base ;-) cheers |