Bug 456526 - Crash when switching between cursor themes
Summary: Crash when switching between cursor themes
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_cursortheme (show other bugs)
Version: 5.25.2
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 453535 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-07-09 19:00 UTC by hexchain
Modified: 2022-07-13 17:39 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.25.3


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description hexchain 2022-07-09 19:00:08 UTC
SUMMARY
When switching between certain cursor themes, systemsettings crashes.

STEPS TO REPRODUCE
1. Install Posy's cursor theme from https://www.pling.com/p/1795042/
2. Switch (click the preview widget) back and forth multiple times between Posy's cursor theme and Breeze

OBSERVED RESULT
systemsettings crashes.

Stack trace:
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=11, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007f6da375a3d3 in __pthread_kill_internal (signo=11, threadid=<optimized out>) at pthread_kill.c:78
#2  0x00007f6da370a838 in __GI_raise (sig=11) at ../sysdeps/posix/raise.c:26
#3  0x00007f6da515a384 in KCrash::defaultCrashHandler (sig=11) at /usr/src/debug/kcrash-5.95.0/src/kcrash.cpp:618
#4  <signal handler called>
#5  0x00007f6d2db4a23c in operator() (__closure=0x55da3051df30) at /usr/src/debug/plasma-workspace-5.25.2/kcms/cursortheme/xcursor/previewwidget.cpp:118
#6  QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, PreviewWidget::PreviewWidget(QQuickItem*)::<lambda()> >::call (arg=0x7fff700ccad0, f=...) at /usr/include/qt/QtCore/qobjectdefs_impl.h:146
#7  QtPrivate::Functor<PreviewWidget::PreviewWidget(QQuickItem*)::<lambda()>, 0>::call<QtPrivate::List<>, void> (arg=0x7fff700ccad0, f=...) at /usr/include/qt/QtCore/qobjectdefs_impl.h:256
#8  QtPrivate::QFunctorSlotObject<PreviewWidget::PreviewWidget(QQuickItem*)::<lambda()>, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=1, this_=0x55da3051df20, r=0x55da3051dc20, a=0x7fff700ccad0, ret=0x0) at /usr/include/qt/QtCore/qobjectdefs_impl.h:443
#9  0x00007f6da3dce341 in QtPrivate::QSlotObjectBase::call (a=<optimized out>, r=<optimized out>, this=<optimized out>, this=<optimized out>, r=<optimized out>, a=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#10 doActivate<false> (sender=0x55da3051dc70, signal_index=3, argv=0x7fff700ccad0) at kernel/qobject.cpp:3886
#11 0x00007f6da3dd06ff in QTimer::timeout (this=<optimized out>, _t1=...) at .moc/moc_qtimer.cpp:205
#12 0x00007f6da3dc13e6 in QObject::event (this=0x55da3051dc70, e=0x7fff700ccc40) at kernel/qobject.cpp:1291
#13 0x00007f6da491bb3c in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x55da3051dc70, e=0x7fff700ccc40) at kernel/qapplication.cpp:3637
#14 0x00007f6da3d9dad8 in QCoreApplication::notifyInternal2 (receiver=0x55da3051dc70, event=0x7fff700ccc40) at kernel/qcoreapplication.cpp:1064
#15 0x00007f6da3de7b73 in QTimerInfoList::activateTimers (this=0x55da2e7d00c0) at kernel/qtimerinfo_unix.cpp:643
#16 0x00007f6da3de816a in timerSourceDispatch (source=<optimized out>) at kernel/qeventdispatcher_glib.cpp:183
#17 0x00007f6da23c7c6b in g_main_dispatch (context=0x7f6d98005010) at ../glib/glib/gmain.c:3417
#18 g_main_context_dispatch (context=0x7f6d98005010) at ../glib/glib/gmain.c:4135
#19 0x00007f6da241e001 in g_main_context_iterate.constprop.0 (context=context@entry=0x7f6d98005010, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4211
#20 0x00007f6da23c5392 in g_main_context_iteration (context=0x7f6d98005010, may_block=1) at ../glib/glib/gmain.c:4276
#21 0x00007f6da3de832c in QEventDispatcherGlib::processEvents (this=0x55da2e764eb0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#22 0x00007f6da3d9627c in QEventLoop::exec (this=0x7fff700ccef0, flags=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#23 0x00007f6da3da0da9 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#24 0x00007f6da4275092 in QGuiApplication::exec () at kernel/qguiapplication.cpp:1867
#25 0x00007f6da4919f4a in QApplication::exec () at kernel/qapplication.cpp:2829
#26 0x000055da2e4d5b93 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/systemsettings-5.25.2/app/main.cpp:183

EXPECTED RESULT
It should not crash.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Bug Janitor Service 2022-07-10 22:09:30 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1908
Comment 2 David Edmundson 2022-07-10 22:27:10 UTC
*** Bug 453535 has been marked as a duplicate of this bug. ***
Comment 3 David Edmundson 2022-07-12 08:38:03 UTC
Git commit ddf88d21487d505a635a9e4920057363c361c55f by David Edmundson.
Committed on 12/07/2022 at 08:23.
Pushed by davidedmundson into branch 'master'.

Guard against cursor theme changing in animation timer

PreviewWidget has a timer that advances to the next frame of the current
cursor.

"current" can change in setTheme, we need to stop the animation timer

M  +2    -0    kcms/cursortheme/xcursor/previewwidget.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/ddf88d21487d505a635a9e4920057363c361c55f
Comment 4 David Edmundson 2022-07-12 09:11:05 UTC
Git commit f844007bd8b6d165791e6d09f15c5accf78734eb by David Edmundson.
Committed on 12/07/2022 at 09:11.
Pushed by davidedmundson into branch 'Plasma/5.25'.

Guard against cursor theme changing in animation timer

PreviewWidget has a timer that advances to the next frame of the current
cursor.

"current" can change in setTheme, we need to stop the animation timer


(cherry picked from commit ddf88d21487d505a635a9e4920057363c361c55f)

M  +2    -0    kcms/cursortheme/xcursor/previewwidget.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/f844007bd8b6d165791e6d09f15c5accf78734eb