[Heaptrack] [Bug 473634] ASSERT failure in QVector::at: "index out of range"

2023-09-04 Thread Milian Wolff
https://bugs.kde.org/show_bug.cgi?id=473634

Milian Wolff  changed:

   What|Removed |Added

  Latest Commit||https://invent.kde.org/sdk/
   ||heaptrack/-/commit/6e558868
   ||fa9555fd8f75e6520cbbde628c7
   ||d424a
 Status|REPORTED|RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from Milian Wolff  ---
Git commit 6e558868fa9555fd8f75e6520cbbde628c7d424a by Milian Wolff.
Committed on 04/09/2023 at 16:44.
Pushed by mwolff into branch 'master'.

Make ChartModel::headerData more resilient to prevent crashes

Return when we get asked for invalid data which seems to happen
through the KDChart attributes model. Fixes assertions/crashes like:

```
#0  0x7fdcfc88e83c in  () at /usr/lib/libc.so.6
#1  0x7fdcfc83e668 in raise () at /usr/lib/libc.so.6
#2  0x7fdcfc8264b8 in abort () at /usr/lib/libc.so.6
#3  0x7fdcfd8a0098 in qt_assert(char const*, char const*, int) () at
/usr/lib/libQt5Core.so.5
#4  0x7fdcfd8a0157 in  () at /usr/lib/libQt5Core.so.5
#5  0x5649da68cf3f in QVector::at(int) const (this=0x6070001170a0,
i=-1) at /usr/include/qt/QtCore/qvector.h:449
#6  0x5649da70272e in ChartModel::headerData(int, Qt::Orientation, int)
const (this=0x607000117060, section=-1, orientation=Qt::Horizontal,
role=175763350) at
/home/milian/projects/src/heaptrack/src/analyze/gui/chartmodel.cpp:69
#7  0x7fdcfda67f5e in QAbstractProxyModel::headerData(int, Qt::Orientation,
int) const () at /usr/lib/libQt5Core.so.5
#8  0x7fdcfda7ba54 in QSortFilterProxyModel::headerData(int,
Qt::Orientation, int) const () at /usr/lib/libQt5Core.so.5
#9  0x7fdcff9b6dbf in KChart::AttributesModel::headerData(int,
Qt::Orientation, int) const () at /usr/lib/libKChart.so.2
#10 0x7fdcff9af76a in  () at /usr/lib/libKChart.so.2
#11 0x7fdcff9a7605 in KChart::AbstractDiagram::brush(int) const () at
/usr/lib/libKChart.so.2
#12 0x7fdcff9ac495 in KChart::AbstractDiagram::datasetBrushes() const () at
/usr/lib/libKChart.so.2
#13 0x7fdcff9ccd77 in  () at /usr/lib/libKChart.so.2
#14 0x7fdcff9cda4b in KChart::Legend::buildLegend() () at
/usr/lib/libKChart.so.2
#15 0x7fdcff9ce4ba in KChart::Legend::setNeedRebuild() () at
/usr/lib/libKChart.so.2
#16 0x7fdcfdad17f3 in  () at /usr/lib/libQt5Core.so.5
#17 0x7fdcff98c4f3 in
KChart::DiagramObserver::diagramDataChanged(KChart::AbstractDiagram*) () at
/usr/lib/libKChart.so.2
#18 0x7fdcfdad17f3 in  () at /usr/lib/libQt5Core.so.5
#19 0x7fdcfda59182 in
QAbstractItemModel::modelReset(QAbstractItemModel::QPrivateSignal) () at
/usr/lib/libQt5Core.so.5
#20 0x7fdcfda8506d in  () at /usr/lib/libQt5Core.so.5
#21 0x7fdcfdad17f3 in  () at /usr/lib/libQt5Core.so.5
#22 0x7fdcfda59182 in
QAbstractItemModel::modelReset(QAbstractItemModel::QPrivateSignal) () at
/usr/lib/libQt5Core.so.5
#23 0x5649da708068 in ChartModel::resetData(ChartData const&)
(this=0x607000117060, data=...) at
/home/milian/projects/src/heaptrack/src/analyze/gui/chartmodel.cpp:261
#24 0x5649da569a5d in operator()(ChartData const&) const
(__closure=0x604000258e20, data=...) at
/home/milian/projects/src/heaptrack/src/analyze/gui/mainwindow.cpp:223
```

M  +47   -46   src/analyze/gui/chartmodel.cpp

https://invent.kde.org/sdk/heaptrack/-/commit/6e558868fa9555fd8f75e6520cbbde628c7d424a

-- 
You are receiving this mail because:
You are watching all bug changes.

[Heaptrack] [Bug 473634] ASSERT failure in QVector::at: "index out of range"

2023-09-01 Thread Teodor Petrov
https://bugs.kde.org/show_bug.cgi?id=473634

Teodor Petrov  changed:

   What|Removed |Added

 Resolution|WAITINGFORINFO  |---
 Status|NEEDSINFO   |REPORTED

--- Comment #5 from Teodor Petrov  ---
Are you able to reproduce using the file I've uploaded?
This issue is making it hard to inspect the logs and with another file I can
hit the problem 100% of the time. :(

-- 
You are receiving this mail because:
You are watching all bug changes.

[Heaptrack] [Bug 473634] ASSERT failure in QVector::at: "index out of range"

2023-08-25 Thread Teodor Petrov
https://bugs.kde.org/show_bug.cgi?id=473634

--- Comment #4 from Teodor Petrov  ---
Created attachment 161175
  --> https://bugs.kde.org/attachment.cgi?id=161175=edit
File for nautilus

It doesn't happen immediately with this file.

Steps:
1. open it
2. select a tab which contain a graph
3. select a region
4. right click -> filter in on selection
5. repeat 3 while it crashes

I sometimes need to do 3 iterations of the steps 3-5 to get a crash.
Probably something related with the size of the region and its content.

-- 
You are receiving this mail because:
You are watching all bug changes.

[Heaptrack] [Bug 473634] ASSERT failure in QVector::at: "index out of range"

2023-08-23 Thread Milian Wolff
https://bugs.kde.org/show_bug.cgi?id=473634

--- Comment #3 from Milian Wolff  ---
You can also try to use tools/anonymize - though it seems to expect a gz input
file and output file - but doing what that does for a zstd heaptrack file
should be trivial, just replace the strings

-- 
You are receiving this mail because:
You are watching all bug changes.

[Heaptrack] [Bug 473634] ASSERT failure in QVector::at: "index out of range"

2023-08-23 Thread Teodor Petrov
https://bugs.kde.org/show_bug.cgi?id=473634

--- Comment #2 from Teodor Petrov  ---
Nope, I cannot unfortunately.
I'll see if I can reproduce with something that is shareable.

-- 
You are receiving this mail because:
You are watching all bug changes.

[Heaptrack] [Bug 473634] ASSERT failure in QVector::at: "index out of range"

2023-08-23 Thread Milian Wolff
https://bugs.kde.org/show_bug.cgi?id=473634

Milian Wolff  changed:

   What|Removed |Added

 Resolution|--- |WAITINGFORINFO
 Status|REPORTED|NEEDSINFO

--- Comment #1 from Milian Wolff  ---
can you please share the heaptrack file that triggers this behavior with me?

-- 
You are receiving this mail because:
You are watching all bug changes.