Bug 498604 - System settings crashes in QList<KDirModelNode*>::isEmpty() when showing file dialog to add a startup script
Summary: System settings crashes in QList<KDirModelNode*>::isEmpty() when showing file...
Status: RESOLVED WORKSFORME
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: Open/save dialogs (show other bugs)
Version: 5.115.0
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2025-01-13 13:25 UTC by Paul
Modified: 2025-02-15 03:46 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul 2025-01-13 13:25:25 UTC
Application: systemsettings (5.27.11)

Qt Version: 5.15.12
Frameworks Version: 5.115.0
Operating System: Linux 6.4.0-150600.23.30-default x86_64
Windowing System: X11
Distribution: openSUSE Leap 15.6
DrKonqi: 5.27.11 [KCrashBackend]

-- Information about the crash:
I am trying to add a startup/shutdown login script:
- Start System Settings from the Application Launcher
- Select Startup and Shutdown from the Workspace apps
- Select Autostart from the left panel of Startup and Shutdown
- Click  Add...
- Select Add Login Script... from the popup menu
- A file choose dialog is displayed briefly and then the System Settings app crashes

The crash can be reproduced every time.

-- Backtrace:
Application: System Settings (systemsettings), signal: Segmentation fault

[KCrash Handler]
#4  0x00007fe1e8db120c in KDirModel::data(QModelIndex const&, int) const () at /usr/lib64/libKF5KIOWidgets.so.5
#5  0x00007fe1ed29e5a9 in QSortFilterProxyModel::data(QModelIndex const&, int) const () at /usr/lib64/libQt5Core.so.5
#6  0x00007fe1e8d9bba3 in ??? () at /usr/lib64/libKF5KIOWidgets.so.5
#7  0x00007fe1e8d9d4ec in ??? () at /usr/lib64/libKF5KIOWidgets.so.5
#8  0x00007fe1e8d9ea59 in ??? () at /usr/lib64/libKF5KIOWidgets.so.5
#9  0x00007fe1e8d9ef8a in KFileItemDelegate::sizeHint(QStyleOptionViewItem const&, QModelIndex const&) const () at /usr/lib64/libKF5KIOWidgets.so.5
#10 0x00007fe1ee26aef2 in QTreeViewPrivate::widthHintForIndex(QModelIndex const&, int, QStyleOptionViewItem const&, int) const () at /usr/lib64/libQt5Widgets.so.5
#11 0x00007fe1ee26dce9 in QTreeView::sizeHintForColumn(int) const () at /usr/lib64/libQt5Widgets.so.5
#12 0x00007fe1ee2134e9 in ??? () at /usr/lib64/libQt5Widgets.so.5
#13 0x00007fe1ee213bba in QHeaderView::sectionSize(int) const () at /usr/lib64/libQt5Widgets.so.5
#14 0x00007fe1ee26dfdb in QTreeViewPrivate::updateScrollBars() () at /usr/lib64/libQt5Widgets.so.5
#15 0x00007fe1ee274d78 in QTreeView::updateGeometries() () at /usr/lib64/libQt5Widgets.so.5
#16 0x00007fe1ee1fd0fd in QAbstractItemView::doItemsLayout() () at /usr/lib64/libQt5Widgets.so.5
#17 0x00007fe1ee2733fb in QTreeView::doItemsLayout() () at /usr/lib64/libQt5Widgets.so.5
#18 0x00007fe1ee1ffc2d in QAbstractItemView::timerEvent(QTimerEvent*) () at /usr/lib64/libQt5Widgets.so.5
#19 0x00007fe1ee2738da in QTreeView::timerEvent(QTimerEvent*) () at /usr/lib64/libQt5Widgets.so.5
#20 0x00007fe1ed30bb73 in QObject::event(QEvent*) () at /usr/lib64/libQt5Core.so.5
#21 0x00007fe1edfe031b in QWidget::event(QEvent*) () at /usr/lib64/libQt5Widgets.so.5
#22 0x00007fe1ee08784e in QFrame::event(QEvent*) () at /usr/lib64/libQt5Widgets.so.5
#23 0x00007fe1ee08a653 in QAbstractScrollArea::event(QEvent*) () at /usr/lib64/libQt5Widgets.so.5
#24 0x00007fe1ee20941b in QAbstractItemView::event(QEvent*) () at /usr/lib64/libQt5Widgets.so.5
#25 0x00007fe1edf9f87c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib64/libQt5Widgets.so.5
#26 0x00007fe1edfa663f in QApplication::notify(QObject*, QEvent*) () at /usr/lib64/libQt5Widgets.so.5
#27 0x00007fe1ed2d7d53 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib64/libQt5Core.so.5
#28 0x00007fe1ed339609 in QTimerInfoList::activateTimers() () at /usr/lib64/libQt5Core.so.5
#29 0x00007fe1ed339dd1 in ??? () at /usr/lib64/libQt5Core.so.5
#30 0x00007fe1eb256fac in ??? () at /usr/lib64/libglib-2.0.so.0
#31 0x00007fe1eb258bd0 in ??? () at /usr/lib64/libglib-2.0.so.0
#32 0x00007fe1eb2591cc in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#33 0x00007fe1ed33a17c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#34 0x00007fe1ed2d65ba in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#35 0x00007fe1ed2dfdf7 in QCoreApplication::exec() () at /usr/lib64/libQt5Core.so.5
#36 0x0000557c01e89be3 in ??? ()
#37 0x00007fe1ec840eec in __libc_start_call_main () at /lib64/libc.so.6
#38 0x00007fe1ec840fb5 in __libc_start_main_impl () at /lib64/libc.so.6
#39 0x0000557c01e8a011 in ??? ()
[Inferior 1 (process 13881) detached]

The reporter indicates this bug may be a duplicate of or related to bug 487586.

Reported using DrKonqi
Comment 1 Nate Graham 2025-01-13 20:34:45 UTC
Thank you for the bug report! Unfortunately I can't reproduce the crash myself on current git master (which has a lot of changes compared to Plasma 5, and the backtrace is incomplete and missing debug symbols for the following lines that we need to figure out exactly what's going wrong:

> #6  0x00007fe1e8d9bba3 in ??? () at /usr/lib64/libKF5KIOWidgets.so.5
> #7  0x00007fe1e8d9d4ec in ??? () at /usr/lib64/libKF5KIOWidgets.so.5
> #8  0x00007fe1e8d9ea59 in ??? () at /usr/lib64/libKF5KIOWidgets.so.5

Could you please install full debug symbols for the KIO framework, and attach a new symbolicated backtrace generated by using `coredumpctl gdb` in a terminal window? See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports#Retrieving_a_backtrace_using_coredumpctl for details about how to do this.

Thanks again!
Comment 2 Paul 2025-01-13 23:00:42 UTC
Nate,

You'll have to forgive me for asking potentially stupid questions.  I've been doing UNIX for pushing 40 years, but just setting up a non-headless Linux workstation for the first time.  When you say, "install full debug symbols for the KIO framework", which packages do I need to install?

I am on openSUSE 15.6 Leap and have about a dozen different KIO related package installed.  I do see there is a kio package which is described as a framework.  Can I get away with just installing the debug version of that package or do I need to install the debug versions of the rest of them as well?

Paul
Comment 3 Nate Graham 2025-01-13 23:10:56 UTC
Hopefully the debug version of that package should suffice! It depends on the distro though, so in the end, distro-specific instructions would have to take priority over anything I say. We have some distro-specific instructions at https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports#openSUSE.

Make sure you select the debug package for version 5.whatever of KIO. I can't remember if openSUSE remains the older KDE 4 packages, but if they do, the `kio` package might be that`
Comment 4 Paul 2025-01-14 17:54:23 UTC
Nate,

It turns out there's a buttonin the crash reporter app (which I found after manually installing a bunch of debuginfo)  that downloads the missing debug info.   The crash is still reliably repeatable.  Here's the new stack trace:

Application: System Settings (systemsettings), signal: Segmentation fault

[KCrash Handler]
#4  0x00007fd932bb120c in QListData::isEmpty (this=0x55ee17477b20) at /usr/include/qt5/QtCore/qlist.h:116
#5  QList<KDirModelNode*>::isEmpty (this=0x55ee17477b20) at /usr/include/qt5/QtCore/qlist.h:201
#6  KDirModelDirNode::childCount (this=0x55ee17477b00) at /usr/src/debug/kio-5.115.0-150600.1.4.x86_64/src/widgets/kdirmodel.cpp:144
#7  KDirModel::data (this=<optimized out>, index=<optimized out>, role=<optimized out>) at /usr/src/debug/kio-5.115.0-150600.1.4.x86_64/src/widgets/kdirmodel.cpp:920
#8  0x00007fd936a9e5a9 in QSortFilterProxyModel::data (this=<optimized out>, index=..., role=743246400) at itemmodels/qsortfilterproxymodel.cpp:2294
#9  0x00007fd932b9bba3 in QModelIndex::data (arole=743246400, this=0x7ffd387ba9e0) at /usr/include/qt5/QtCore/qabstractitemmodel.h:460
#10 KFileItemDelegate::Private::itemSize (this=this@entry=0x55ee171f1d90, index=..., item=...) at /usr/src/debug/kio-5.115.0-150600.1.4.x86_64/src/widgets/kfileitemdelegate.cpp:199
#11 0x00007fd932b9d4ec in KFileItemDelegate::Private::display (this=this@entry=0x55ee171f1d90, index=...) at /usr/src/debug/kio-5.115.0-150600.1.4.x86_64/src/widgets/kfileitemdelegate.cpp:878
#12 0x00007fd932b9ea59 in KFileItemDelegate::Private::initStyleOption (this=<optimized out>, option=option@entry=0x7ffd387ba840, index=...) at /usr/src/debug/kio-5.115.0-150600.1.4.x86_64/src/widgets/kfileitemdelegate.cpp:757
#13 0x00007fd932b9ef8a in KFileItemDelegate::sizeHint (this=0x55ee171ee090, option=..., index=...) at /usr/include/c++/13/bits/unique_ptr.h:199
#14 0x00007fd937a6aef2 in QTreeViewPrivate::widthHintForIndex (this=this@entry=0x55ee1716d110, index=..., hint=11, option=..., i=i@entry=201) at itemviews/qtreeview.cpp:1591
#15 0x00007fd937a6dce9 in QTreeView::sizeHintForColumn (this=<optimized out>, column=1) at itemviews/qtreeview.cpp:2940
#16 0x00007fd937a134e9 in QHeaderViewPrivate::resizeSections (this=0x55ee171eeb30, globalMode=globalMode@entry=QHeaderView::Interactive, useGlobalMode=useGlobalMode@entry=false) at itemviews/qheaderview.cpp:3551
#17 0x00007fd937a13881 in QHeaderView::resizeSections (this=<optimized out>) at itemviews/qheaderview.cpp:1860
#18 0x00007fd937a13bba in QHeaderViewPrivate::executePostedResize (this=<optimized out>) at ../../include/QtWidgets/5.15.12/QtWidgets/private/../../../../../src/widgets/itemviews/qheaderview_p.h:246
#19 QHeaderView::sectionSize (this=0x55ee17204950, logicalIndex=2) at itemviews/qheaderview.cpp:674
#20 0x00007fd937a6dfdb in QTreeViewPrivate::updateScrollBars (this=0x55ee1716d110) at itemviews/qtreeview.cpp:3752
#21 0x00007fd937a74d78 in QTreeView::updateGeometries (this=0x55ee1720a210) at itemviews/qtreeview.cpp:2844
#22 0x00007fd9379fd0fd in QAbstractItemView::doItemsLayout (this=this@entry=0x55ee1720a210) at itemviews/qabstractitemview.cpp:1232
#23 0x00007fd937a733fb in QTreeView::doItemsLayout (this=0x55ee1720a210) at itemviews/qtreeview.cpp:2103
#24 0x00007fd9379ffc2d in QAbstractItemView::timerEvent (this=this@entry=0x55ee1720a210, event=event@entry=0x7ffd387bb2d0) at itemviews/qabstractitemview.cpp:2566
#25 0x00007fd937a738da in QTreeView::timerEvent (this=0x55ee1720a210, event=0x7ffd387bb2d0) at itemviews/qtreeview.cpp:1272
#26 0x00007fd936b0bb73 in QObject::event (this=this@entry=0x55ee1720a210, e=e@entry=0x7ffd387bb2d0) at kernel/qobject.cpp:1369
#27 0x00007fd9377e031b in QWidget::event (this=this@entry=0x55ee1720a210, event=event@entry=0x7ffd387bb2d0) at kernel/qwidget.cpp:9106
#28 0x00007fd93788784e in QFrame::event (this=this@entry=0x55ee1720a210, e=e@entry=0x7ffd387bb2d0) at widgets/qframe.cpp:550
#29 0x00007fd93788a653 in QAbstractScrollArea::event (this=this@entry=0x55ee1720a210, e=e@entry=0x7ffd387bb2d0) at widgets/qabstractscrollarea.cpp:1044
#30 0x00007fd937a0941b in QAbstractItemView::event (this=0x55ee1720a210, event=0x7ffd387bb2d0) at itemviews/qabstractitemview.cpp:1685
#31 0x00007fd93779f87c in QApplicationPrivate::notify_helper (this=this@entry=0x55ee148601e0, receiver=receiver@entry=0x55ee1720a210, e=e@entry=0x7ffd387bb2d0) at kernel/qapplication.cpp:3640
#32 0x00007fd9377a663f in QApplication::notify (this=<optimized out>, receiver=0x55ee1720a210, e=0x7ffd387bb2d0) at kernel/qapplication.cpp:3164
#33 0x00007fd936ad7d53 in QCoreApplication::notifyInternal2 (receiver=0x55ee1720a210, event=0x7ffd387bb2d0) at kernel/qcoreapplication.cpp:1064
#34 0x00007fd936b39609 in QTimerInfoList::activateTimers (this=0x55ee14867220) at kernel/qtimerinfo_unix.cpp:643
#35 0x00007fd936b39dd1 in timerSourceDispatch (source=<optimized out>) at kernel/qeventdispatcher_glib.cpp:183
#36 0x00007fd9349a5fac in ??? () at /usr/lib64/libglib-2.0.so.0
#37 0x00007fd9349a7bd0 in ??? () at /usr/lib64/libglib-2.0.so.0
#38 0x00007fd9349a81cc in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#39 0x00007fd936b3a17c in QEventDispatcherGlib::processEvents (this=0x55ee149aa2a0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#40 0x00007fd936ad65ba in QEventLoop::exec (this=this@entry=0x7ffd387bb520, flags=..., flags@entry=...) at kernel/qeventloop.cpp:235
#41 0x00007fd936adfdf7 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1375
#42 0x000055ee02bb9be3 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/systemsettings5-5.27.11-bp156.1.2.x86_64/app/main.cpp:188
[Inferior 1 (process 10040) detached]
Comment 5 Nate Graham 2025-01-15 18:25:04 UTC
Thanks. Do other KDE apps crash similarly when you open a file picker? How about other System Settings pages, such as File Search > Stop Indexing a Folder or Screen Locking > Configure Appearance > image > Add?

Needless to say, I'm unable to reproduce the issue on current git master (soon to be Plasma 6.3), hence all the questions.
Comment 6 Paul 2025-01-15 19:48:11 UTC
Nate,

So far, the only places I've seen the crash are in the Startup and Shutdown > Autostart > Add login script and Add logout script.

Neither of the two things you suggested caused the crash.

Paul
Comment 7 Nate Graham 2025-01-16 17:26:38 UTC
The code has changed a lot here between 5.27 and 6.3, so I'm unsure I'll be able to debug it further. If you could upgrade to at least Plasma 6.0 or later and see if it still happens, that would be very helpful.
Comment 8 Paul 2025-01-16 17:45:01 UTC
Nate,

At this point, I don't know enough about KDE/Plasma to go looking for more trouble than I've already got.  I am running openSUSE because my ancient Sun Blade 2500 died.  I tried to go to Solaris 11.4  x86 but gnome 3 is an abomination that should be killed, burned, and the remains put on a nuclear rocket ship set to self-destruct in deep space.  Probably with Oracle attached to the rocket with a short rope.  But I digress.  I am also trying to migrate a Solaris 10 x86 network server to Solaris 11 and switching from cable TV to streaming all at the same time.  To say my plate is full is an understatement. 

The crash is not causing me any major problems.  I was just trying to figure out what an auto start login was supposed to look like and I am pretty sure I can figure that out in other ways.  So, thanks for looking into this and I am sorry it was a waste of your time.

Paul
Comment 9 Paul 2025-01-16 20:58:54 UTC
Nate,

I don't know if this is related or not but I am also getting crashes in the File > Open dialog in Libre Office Writer and I saw some weird behavior in the file chooser in one of my browsers (Firefox or Vivaldi, I can't remember which).  The Libre Office Writer crashes just started happening today.

Paul
Comment 10 Bug Janitor Service 2025-01-31 03:47:31 UTC
🐛🧹 ⚠️ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 11 Bug Janitor Service 2025-02-15 03:46:39 UTC
🐛🧹 This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME.