<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>456526</bug_id>
          
          <creation_ts>2022-07-09 19:00:08 +0000</creation_ts>
          <short_desc>Crash when switching between cursor themes</short_desc>
          <delta_ts>2022-07-13 17:39:17 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>systemsettings</product>
          <component>kcm_cursortheme</component>
          <version>5.25.2</version>
          <rep_platform>Arch Linux</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="hexchain">kde</reporter>
          <assigned_to name="Plasma Bugs List">plasma-bugs-null</assigned_to>
          <cc>bugseforuns</cc>
    
    <cc>nate</cc>
          
          <cf_commitlink>https://invent.kde.org/plasma/plasma-workspace/commit/f844007bd8b6d165791e6d09f15c5accf78734eb</cf_commitlink>
          <cf_versionfixedin>5.25.3</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2138026</commentid>
    <comment_count>0</comment_count>
    <who name="hexchain">kde</who>
    <bug_when>2022-07-09 19:00:08 +0000</bug_when>
    <thetext>SUMMARY
When switching between certain cursor themes, systemsettings crashes.

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

OBSERVED RESULT
systemsettings crashes.

Stack trace:
#0  __pthread_kill_implementation (threadid=&lt;optimized out&gt;, signo=signo@entry=11, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007f6da375a3d3 in __pthread_kill_internal (signo=11, threadid=&lt;optimized out&gt;) 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  &lt;signal handler called&gt;
#5  0x00007f6d2db4a23c in operator() (__closure=0x55da3051df30) at /usr/src/debug/plasma-workspace-5.25.2/kcms/cursortheme/xcursor/previewwidget.cpp:118
#6  QtPrivate::FunctorCall&lt;QtPrivate::IndexesList&lt;&gt;, QtPrivate::List&lt;&gt;, void, PreviewWidget::PreviewWidget(QQuickItem*)::&lt;lambda()&gt; &gt;::call (arg=0x7fff700ccad0, f=...) at /usr/include/qt/QtCore/qobjectdefs_impl.h:146
#7  QtPrivate::Functor&lt;PreviewWidget::PreviewWidget(QQuickItem*)::&lt;lambda()&gt;, 0&gt;::call&lt;QtPrivate::List&lt;&gt;, void&gt; (arg=0x7fff700ccad0, f=...) at /usr/include/qt/QtCore/qobjectdefs_impl.h:256
#8  QtPrivate::QFunctorSlotObject&lt;PreviewWidget::PreviewWidget(QQuickItem*)::&lt;lambda()&gt;, 0, QtPrivate::List&lt;&gt;, void&gt;::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=&lt;optimized out&gt;, r=&lt;optimized out&gt;, this=&lt;optimized out&gt;, this=&lt;optimized out&gt;, r=&lt;optimized out&gt;, a=&lt;optimized out&gt;) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#10 doActivate&lt;false&gt; (sender=0x55da3051dc70, signal_index=3, argv=0x7fff700ccad0) at kernel/qobject.cpp:3886
#11 0x00007f6da3dd06ff in QTimer::timeout (this=&lt;optimized out&gt;, _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=&lt;optimized out&gt;, 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=&lt;optimized out&gt;) 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=&lt;optimized out&gt;) 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=&lt;optimized out&gt;, argv=&lt;optimized out&gt;) 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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2138187</commentid>
    <comment_count>1</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2022-07-10 22:09:30 +0000</bug_when>
    <thetext>A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1908</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2138191</commentid>
    <comment_count>2</comment_count>
    <who name="David Edmundson">kde</who>
    <bug_when>2022-07-10 22:27:10 +0000</bug_when>
    <thetext>*** Bug 453535 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2138417</commentid>
    <comment_count>3</comment_count>
    <who name="David Edmundson">kde</who>
    <bug_when>2022-07-12 08:38:03 +0000</bug_when>
    <thetext>Git commit ddf88d21487d505a635a9e4920057363c361c55f by David Edmundson.
Committed on 12/07/2022 at 08:23.
Pushed by davidedmundson into branch &apos;master&apos;.

Guard against cursor theme changing in animation timer

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

&quot;current&quot; 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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2138418</commentid>
    <comment_count>4</comment_count>
    <who name="David Edmundson">kde</who>
    <bug_when>2022-07-12 09:11:05 +0000</bug_when>
    <thetext>Git commit f844007bd8b6d165791e6d09f15c5accf78734eb by David Edmundson.
Committed on 12/07/2022 at 09:11.
Pushed by davidedmundson into branch &apos;Plasma/5.25&apos;.

Guard against cursor theme changing in animation timer

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

&quot;current&quot; 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</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>