Skip to content

Fix crash on the debug console

Aleix Pol Gonzalez requested to merge work/crash-debug-console into master

Do not access fields in DataSourceModel::m_data that are not available

#0  0x00007f3445a4bd22 in raise () at /usr/lib/libc.so.6
#1  0x00007f3445a3590e in abort () at /usr/lib/libc.so.6
#2  0x00007f3446362bb1 in qt_message_fatal (message=<synthetic pointer>..., context=...) at /home/apol/devel/frameworks/qt5/qtbase/src/corelib/global/qlogging.cpp:1914
#3  QMessageLogger::fatal(char const*, ...) const (this=this@entry=0x7fff288a4ff8, msg=msg@entry=0x7f3446663028 "ASSERT failure in %s: \"%s\", file %s, line %d") at /home/apol/devel/frameworks/qt5/qtbase/src/corelib/global/qlogging.cpp:893
#4  0x00007f344636203e in qt_assert_x(char const*, char const*, char const*, int) (where=<optimized out>, what=<optimized out>, file=<optimized out>, line=<optimized out>) at /home/apol/devel/frameworks/qt5/qtbase/src/corelib/global/qglobal.cpp:3366
#5  0x00007f344973e118 in QVector<QByteArray>::at(int) const (this=0x55f42c20d338, i=7) at /home/apol/devel/kde5/include/QtCore/qvector.h:449
#6  0x00007f34497305df in KWin::DataSourceModel::data(QModelIndex const&, int) const (this=0x55f42c20d320, index=..., role=6) at /home/apol/devel/frameworks/kwin/src/debug_console.cpp:1657
#7  0x00007f3447674ed1 in QModelIndex::data(int) const (arole=6, this=0x7fff288a55c0) at ../../include/QtCore/../../../../../devel/frameworks/qt5/qtbase/src/corelib/itemmodels/qabstractitemmodel.h:460
#8  QStyledItemDelegate::initStyleOption(QStyleOptionViewItem*, QModelIndex const&) const (this=0x55f42b9ef980, option=0x7fff288a5220, index=...) at /home/apol/devel/frameworks/qt5/qtbase/src/widgets/itemviews/qstyleditemdelegate.cpp:281
#9  0x00007f3447673d82 in QStyledItemDelegate::paint(QPainter*, QStyleOptionViewItem const&, QModelIndex const&) const (this=0x55f42b9ef980, painter=0x7fff288a55a0, option=..., index=...) at /home/apol/devel/frameworks/qt5/qtbase/src/widgets/itemviews/qstyleditemdelegate.cpp:385
#10 0x00007f344769f260 in QTableViewPrivate::drawCell(QPainter*, QStyleOptionViewItem const&, QModelIndex const&) (this=this@entry=0x55f42bb5f900, painter=painter@entry=0x7fff288a55a0, option=..., index=...) at /home/apol/devel/frameworks/qt5/qtbase/src/widgets/itemviews/qtableview.cpp:1006
Edited by Aleix Pol Gonzalez

Merge request reports