Bug 439030 - System Settings crash on deleting cursor themes
Summary: System Settings crash on deleting cursor themes
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_cursortheme (show other bugs)
Version: 5.22.1
Platform: Neon Linux
: NOR crash (vote)
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2021-06-22 14:32 UTC by Shaarav
Modified: 2021-09-16 00:26 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.23


Attachments
New crash information added by DrKonqi (16.44 KB, text/plain)
2021-07-21 19:29 UTC, sg7e0f7m
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Shaarav 2021-06-22 14:32:41 UTC
Application: systemsettings5 (5.22.1)

Qt Version: 5.15.3
Frameworks Version: 5.83.0
Operating System: Linux 5.8.0-55-generic x86_64
Windowing System: X11
Drkonqi Version: 5.22.1
Distribution: KDE neon User Edition 5.22

-- Information about the crash:
- What I was doing when the application crashed:
> I installed some cursors from the Get New Cursors
> I switched back to the Breeze Dark cursor theme
> I deleted the other themes that I had installed
> Clicking Apply crashes system settings.

The crash can be reproduced every time.

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

[New LWP 20974]
[New LWP 20975]
[New LWP 20976]
[New LWP 20977]
[New LWP 20978]
[New LWP 20983]
[New LWP 20984]
[New LWP 20986]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007fa08d2a1aff in __GI___poll (fds=0x7fff8783e6f8, nfds=1, timeout=1000) at ../sysdeps/unix/sysv/linux/poll.c:29
[Current thread is 1 (Thread 0x7fa088c62600 (LWP 20972))]

Thread 9 (Thread 0x7fa04ac96700 (LWP 20986)):
#0  0x00007fa08d2a1aff in __GI___poll (fds=0x7fa03c004a60, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fa08b3a136e in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fa08b3a14a3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fa08d86db3b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007fa08d811dcb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fa08d62bbb2 in QThread::exec() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fa08c6c8559 in ?? () from /lib/x86_64-linux-gnu/libQt5Qml.so.5
#7  0x00007fa08d62cd4c in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007fa08bd60609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#9  0x00007fa08d2ae293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 8 (Thread 0x7fa04bfff700 (LWP 20984)):
#0  __GI___libc_read (nbytes=16, buf=0x7fa04bffeab0, fd=21) at ../sysdeps/unix/sysv/linux/read.c:26
#1  __GI___libc_read (fd=21, buf=0x7fa04bffeab0, nbytes=16) at ../sysdeps/unix/sysv/linux/read.c:24
#2  0x00007fa08b3e9b2f in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fa08b3a0ebe in g_main_context_check () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fa08b3a1312 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fa08b3a14a3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x00007fa08d86db3b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007fa08d811dcb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007fa08d62bbb2 in QThread::exec() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007fa08c6c8559 in ?? () from /lib/x86_64-linux-gnu/libQt5Qml.so.5
#10 0x00007fa08d62cd4c in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#11 0x00007fa08bd60609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#12 0x00007fa08d2ae293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 7 (Thread 0x7fa072059700 (LWP 20983)):
#0  __GI___libc_read (nbytes=16, buf=0x7fa072058ab0, fd=20) at ../sysdeps/unix/sysv/linux/read.c:26
#1  __GI___libc_read (fd=20, buf=0x7fa072058ab0, nbytes=16) at ../sysdeps/unix/sysv/linux/read.c:24
#2  0x00007fa08b3e9b2f in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fa08b3a0ebe in g_main_context_check () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fa08b3a1312 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fa08b3a14a3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x00007fa08d86db3b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007fa08d811dcb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007fa08d62bbb2 in QThread::exec() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007fa08c6c8559 in ?? () from /lib/x86_64-linux-gnu/libQt5Qml.so.5
#10 0x00007fa08d62cd4c in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#11 0x00007fa08bd60609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#12 0x00007fa08d2ae293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 6 (Thread 0x7fa07e7fc700 (LWP 20978)):
#0  futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55b6808b7ee8) at ../sysdeps/nptl/futex-internal.h:183
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x55b6808b7e98, cond=0x55b6808b7ec0) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=0x55b6808b7ec0, mutex=0x55b6808b7e98) at pthread_cond_wait.c:638
#3  0x00007fa084a93b5b in ?? () from /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#4  0x00007fa084a9375b in ?? () from /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#5  0x00007fa08bd60609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#6  0x00007fa08d2ae293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 5 (Thread 0x7fa07effd700 (LWP 20977)):
#0  futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55b6808b7ee8) at ../sysdeps/nptl/futex-internal.h:183
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x55b6808b7e98, cond=0x55b6808b7ec0) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=0x55b6808b7ec0, mutex=0x55b6808b7e98) at pthread_cond_wait.c:638
#3  0x00007fa084a93b5b in ?? () from /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#4  0x00007fa084a9375b in ?? () from /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#5  0x00007fa08bd60609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#6  0x00007fa08d2ae293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 4 (Thread 0x7fa07f7fe700 (LWP 20976)):
#0  futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55b6808b7ee8) at ../sysdeps/nptl/futex-internal.h:183
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x55b6808b7e98, cond=0x55b6808b7ec0) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=0x55b6808b7ec0, mutex=0x55b6808b7e98) at pthread_cond_wait.c:638
#3  0x00007fa084a93b5b in ?? () from /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#4  0x00007fa084a9375b in ?? () from /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#5  0x00007fa08bd60609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#6  0x00007fa08d2ae293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 3 (Thread 0x7fa07ffff700 (LWP 20975)):
#0  futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55b6808b7ee8) at ../sysdeps/nptl/futex-internal.h:183
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x55b6808b7e98, cond=0x55b6808b7ec0) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=0x55b6808b7ec0, mutex=0x55b6808b7e98) at pthread_cond_wait.c:638
#3  0x00007fa084a93b5b in ?? () from /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#4  0x00007fa084a9375b in ?? () from /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#5  0x00007fa08bd60609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#6  0x00007fa08d2ae293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 2 (Thread 0x7fa087272700 (LWP 20974)):
#0  0x00007fa08d2a1aff in __GI___poll (fds=0x7fa078004e60, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fa08b3a136e in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fa08b3a14a3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fa08d86db3b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007fa08d811dcb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fa08d62bbb2 in QThread::exec() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fa08c2e3f4b in ?? () from /lib/x86_64-linux-gnu/libQt5DBus.so.5
#7  0x00007fa08d62cd4c in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007fa08bd60609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#9  0x00007fa08d2ae293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7fa088c62600 (LWP 20972)):
[KCrash Handler]
#4  QString::QString (other=..., this=0x7fff8783f470) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:1093
#5  CursorTheme::path (this=0x0) at ./kcms/cursortheme/xcursor/cursortheme.h:84
#6  CursorThemeConfig::removeThemes (this=this@entry=0x55b6810bf2f0) at ./kcms/cursortheme/kcmcursortheme.cpp:511
#7  0x00007fa04ae284bc in CursorThemeConfig::save (this=0x55b6810bf2f0) at ./kcms/cursortheme/kcmcursortheme.cpp:328
#8  0x00007fa08eee8146 in ?? () from /lib/x86_64-linux-gnu/libKF5KCMUtils.so.5
#9  0x00007fa08eeef74f in KCModuleProxy::save() () from /lib/x86_64-linux-gnu/libKF5KCMUtils.so.5
#10 0x00007fa08ef398b5 in ModuleView::moduleSave (this=0x55b680bee330, module=<optimized out>) at ./core/ModuleView.cpp:383
#11 0x00007fa08ef39bd8 in ModuleView::moduleSave (this=<optimized out>) at ./core/ModuleView.cpp:374
#12 0x00007fa08ef3353e in ModuleView::qt_static_metacall (_o=<optimized out>, _id=<optimized out>, _a=0x7fff8783f6c0, _c=<optimized out>) at ./obj-x86_64-linux-gnu/core/systemsettingsview_autogen/EWIEGA46WW/moc_ModuleView.cpp:133
#13 0x00007fa08d84a320 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#14 0x00007fa08e50ec66 in QAbstractButton::clicked(bool) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#15 0x00007fa08e50ee8e in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#16 0x00007fa08e510363 in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#17 0x00007fa08e510525 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#18 0x00007fa08e459cf6 in QWidget::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#19 0x00007fa08e5b4d43 in QPushButton::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#20 0x00007fa08e416dc3 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#21 0x00007fa08e41fe77 in QApplication::notify(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#22 0x00007fa08d8132ca in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#23 0x00007fa08e41f0a7 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#24 0x00007fa08e474f44 in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#25 0x00007fa08e478264 in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#26 0x00007fa08e416dc3 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#27 0x00007fa08e41fbb8 in QApplication::notify(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#28 0x00007fa08d8132ca in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#29 0x00007fa08dd204e8 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#30 0x00007fa08dd21b55 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#31 0x00007fa08dcf97ac in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#32 0x00007fa08883ceae in ?? () from /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#33 0x00007fa08b3a117d in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#34 0x00007fa08b3a1400 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#35 0x00007fa08b3a14a3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#36 0x00007fa08d86db22 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#37 0x00007fa08d811dcb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#38 0x00007fa08d819f84 in QCoreApplication::exec() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#39 0x000055b6802f4272 in main (argc=<optimized out>, argv=<optimized out>) at ./app/main.cpp:208
[Inferior 1 (process 20972) detached]

Possible duplicates by query: bug 429973, bug 424760, bug 410345, bug 409383, bug 384419.

Reported using DrKonqi
Comment 1 sg7e0f7m 2021-07-21 19:29:16 UTC
Created attachment 140241 [details]
New crash information added by DrKonqi

systemsettings5 (5.22.3) using Qt 5.15.3

- What I was doing when the application crashed:

I deleted some cursor themes and when I hit apply system settings crashes.

-- Backtrace (Reduced):
#4  QString::QString (other=..., this=0x7fff1ef28f50) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:1093
#5  CursorTheme::path (this=0x0) at ./kcms/cursortheme/xcursor/cursortheme.h:84
#6  CursorThemeConfig::removeThemes (this=this@entry=0x55c106679880) at ./kcms/cursortheme/kcmcursortheme.cpp:511
#7  0x00007fd6916164bc in CursorThemeConfig::save (this=0x55c106679880) at ./kcms/cursortheme/kcmcursortheme.cpp:328
[...]
#9  0x00007fd6c9db527f in KCModuleProxy::save() () from /lib/x86_64-linux-gnu/libKF5KCMUtils.so.5
Comment 2 Bug Janitor Service 2021-08-05 21:35:49 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/998
Comment 3 David Edmundson 2021-09-15 23:01:45 UTC
Git commit 59a352e19041eec9c0a521e4aaea1eaf95b30873 by David Edmundson.
Committed on 15/09/2021 at 23:01.
Pushed by davidedmundson into branch 'master'.

Fix potential crash removing cursorthemes

m_themeModel->removeTheme(idx) will adjust the model.

Therefore any model indexes we had stored will be invalidated.
If we try and remove 2 cursor themes this can end up either crashing or
even worse potentially removing the wrong theme.

M  +6    -5    kcms/cursortheme/kcmcursortheme.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/59a352e19041eec9c0a521e4aaea1eaf95b30873