<?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>472524</bug_id>
          
          <creation_ts>2023-07-23 07:48:02 +0000</creation_ts>
          <short_desc>Crash when moving a task on the taskbar</short_desc>
          <delta_ts>2023-07-29 03:51:42 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Plasma</classification>
          <product>plasmashell</product>
          <component>Task Manager and Icons-Only Task Manager widgets</component>
          <version>master</version>
          <rep_platform>openSUSE</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>crash</bug_severity>
          <target_milestone>1.0</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Will">tcosprojects</reporter>
          <assigned_to name="Plasma Bugs List">plasma-bugs-null</assigned_to>
          <cc>nate</cc>
          
          <cf_commitlink>https://invent.kde.org/plasma/plasma-workspace/-/commit/097e896ccb960a33e4bc60721344e3529ccedf4b</cf_commitlink>
          <cf_versionfixedin>5.27.7</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2242226</commentid>
    <comment_count>0</comment_count>
    <who name="Will">tcosprojects</who>
    <bug_when>2023-07-23 07:48:02 +0000</bug_when>
    <thetext>Application: plasmashell
Build from commit cc80403daa9613c10666a3c48088ff470149d712 (HEAD -&gt; Plasma/5.27, origin/Plasma/5.27)

Qt Version: 5.15.10
Frameworks Version: 5.109.0
Operating System: Linux 6.4.3-1-default x86_64
Windowing System: X11
Distribution: openSUSE Tumbleweed

STEPS TO REPRODUCE
I&apos;m not sure this is reliably reproducible.

1. Quickly add, remove, launch, and move around tasks on the task tray

-- Backtrace

           PID: 14236 (plasmashell)
           UID: 1000 (will)
           GID: 1000 (will)
        Signal: 11 (SEGV)
     Timestamp: Sat 2023-07-22 23:13:30 PDT (1h 16min ago)
  Command Line: /home/will/kde/usr/bin/plasmashell --replace
    Executable: /home/will/kde/usr/bin/plasmashell
 Control Group: /user.slice/user-1000.slice/user@1000.service/app.slice/app-konsolesu-8eb80c66a91e45b3ab10c9c311272e99.scope
          Unit: user@1000.service
     User Unit: app-konsolesu-8eb80c66a91e45b3ab10c9c311272e99.scope
         Slice: user-1000.slice
     Owner UID: 1000 (will)
       Boot ID: 4e5c51538732497f942e95c7877ec471
    Machine ID: 35bbab8c5a0449aeba77a054f0d6bc69
      Hostname: localhost.localdomain
       Storage: /var/lib/systemd/coredump/core.plasmashell.1000.4e5c51538732497f942e95c7877ec471.14236.1690092810000000.zst (present)
  Size on Disk: 21.6M
       Message: Process 14236 (plasmashell) of user 1000 dumped core.

Core was generated by `/home/will/kde/usr/bin/plasmashell --replace&apos;.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  __pthread_kill_implementation (threadid=&lt;optimized out&gt;, signo=signo@entry=11, no_tid=no_tid@entry=0)
    at pthread_kill.c:44
44            return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0;
[Current thread is 1 (Thread 0x7f58d9614a00 (LWP 14236))]

#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  0x00007f58dac92b43 in __pthread_kill_internal (signo=11, threadid=&lt;optimized out&gt;) at pthread_kill.c:78
#2  0x00007f58dac41266 in __GI_raise (sig=11) at ../sysdeps/posix/raise.c:26
#3  0x00007f58de3916b7 in KCrash::defaultCrashHandler(int) (sig=11) at /home/will/kde/src/kcrash/src/kcrash.cpp:611
#4  0x00007f58dac41330 in &lt;signal handler called&gt; () at /lib64/libc.so.6
#5  0x00007f58cc31552a in QScopedPointer&lt;TaskManager::ActivityInfo::Private, QScopedPointerDeleter&lt;TaskManager::ActivityInfo::Private&gt; &gt;::operator-&gt;() const (this=0x10)
    at /usr/include/qt5/QtCore/qscopedpointer.h:118
#6  0x00007f58cc31503c in TaskManager::ActivityInfo::currentActivity() const (this=0x0) at /home/will/kde/src/plasma-workspace/libtaskmanager/activityinfo.cpp:84
#7  0x00007f58cc339bca in TaskManager::TasksModel::move(int, int, QModelIndex const&amp;) (this=0x2d7f7b0, row=4, newPos=3, parent=...)
    at /home/will/kde/src/plasma-workspace/libtaskmanager/tasksmodel.cpp:1657
#8  0x00007f58cc30d4c6 in TaskManager::TasksModel::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)
    (_o=0x2d7f7b0, _c=QMetaObject::InvokeMetaMethod, _id=51, _a=0x7ffded51b420)
    at /home/will/kde/build/plasma-workspace/libtaskmanager/taskmanager_autogen/EWIEGA46WW/moc_tasksmodel.cpp:467
#9  0x00007f58cc30ea3b in TaskManager::TasksModel::qt_metacall(QMetaObject::Call, int, void**) (this=0x2d7f7b0, _c=QMetaObject::InvokeMetaMethod, _id=51, _a=0x7ffded51b420)
    at /home/will/kde/build/plasma-workspace/libtaskmanager/taskmanager_autogen/EWIEGA46WW/moc_tasksmodel.cpp:763
#10 0x00007f58dd4e1353 in QQmlObjectOrGadget::metacall(QMetaObject::Call, int, void**) const
    (this=this@entry=0x7ffded51b6b0, type=type@entry=QMetaObject::InvokeMetaMethod, index=&lt;optimized out&gt;, index@entry=147, argv=&lt;optimized out&gt;)
    at /usr/src/debug/qtdeclarative-everywhere-src-5.15.10+kde26/src/qml/qml/qqmlobjectorgadget.cpp:51
#11 0x00007f58dd3bda99 in CallMethod
    (callType=&lt;optimized out&gt;, callArgs=0x78, engine=&lt;optimized out&gt;, argTypes=&lt;optimized out&gt;, argCount=&lt;optimized out&gt;, returnType=&lt;optimized out&gt;, index=&lt;optimized out&gt;, object=...) at /usr/include/qt5/QtCore/qvarlengtharray.h:189
#12 CallPrecise(QQmlObjectOrGadget const&amp;, QQmlPropertyData const&amp;, QV4::ExecutionEngine*, QV4::CallData*, QMetaObject::Call)
    (object=..., data=&lt;optimized out&gt;, engine=engine@entry=0x14b2f80, callArgs=callArgs@entry=0x7f58cc3be6c8, callType=callType@entry=QMetaObject::InvokeMetaMethod)
    at /usr/src/debug/qtdeclarative-everywhere-src-5.15.10+kde26/src/qml/jsruntime/qv4qobjectwrapper.cpp:1553
#13 0x00007f58dd3bf73b in CallOverloaded
    (callType=&lt;optimized out&gt;, propertyCache=&lt;optimized out&gt;, callArgs=&lt;optimized out&gt;, engine=&lt;optimized out&gt;, data=&lt;optimized out&gt;, object=&lt;optimized out&gt;)
    at /usr/src/debug/qtdeclarative-everywhere-src-5.15.10+kde26/src/qml/jsruntime/qv4qobjectwrapper.cpp:1629
#14 QV4::QObjectMethod::callInternal(QV4::Value const*, QV4::Value const*, int) const (this=&lt;optimized out&gt;, thisObject=&lt;optimized out&gt;, argv=&lt;optimized out&gt;, argc=&lt;optimized out&gt;)
    at /usr/src/debug/qtdeclarative-everywhere-src-5.15.10+kde26/src/qml/jsruntime/qv4qobjectwrapper.cpp:2117
#15 0x00007f58dd3ee9da in QV4::FunctionObject::call(QV4::Value const*, QV4::Value const*, int) const (argc=2, argv=0x7f58cc3be660, thisObject=0x7f58cc3be648, this=0x7ffded51b7d8)
    at /usr/src/debug/qtdeclarative-everywhere-src-5.15.10+kde26/src/qml/jsruntime/qv4functionobject_p.h:202
#16 QV4::Runtime::CallPropertyLookup::call(QV4::ExecutionEngine*, QV4::Value const&amp;, unsigned int, QV4::Value*, int)
    (engine=0x14b2f80, base=..., index=&lt;optimized out&gt;, argv=0x7f58cc3be660, argc=2)
    at /usr/src/debug/qtdeclarative-everywhere-src-5.15.10+kde26/src/qml/jsruntime/qv4runtime.cpp:1460
#17 0x00007f588a81b649 in  ()
#18 0x0000000000000000 in  ()</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2242372</commentid>
    <comment_count>1</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2023-07-24 03:41:49 +0000</bug_when>
    <thetext>A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/3098</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2242385</commentid>
    <comment_count>2</comment_count>
    <who name="Will">tcosprojects</who>
    <bug_when>2023-07-24 04:24:38 +0000</bug_when>
    <thetext>Git commit ea4724ce000a8740a499f4677e8f7e5cc09f4c8f by Will Horne.
Committed on 24/07/2023 at 05:13.
Pushed by fusionfuture into branch &apos;Plasma/5.27&apos;.

Fix crash in TasksModel::move

Add nullptr check on d-&gt;activityInfo
Add test case for this bug to tasksmodeltest.cpp

M  +43   -0    libtaskmanager/autotests/tasksmodeltest.cpp
M  +1    -1    libtaskmanager/tasksmodel.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/ea4724ce000a8740a499f4677e8f7e5cc09f4c8f</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2242386</commentid>
    <comment_count>3</comment_count>
    <who name="Fushan Wen">qydwhotmail</who>
    <bug_when>2023-07-24 04:43:12 +0000</bug_when>
    <thetext>Git commit 097e896ccb960a33e4bc60721344e3529ccedf4b by Fushan Wen, on behalf of Will Horne.
Committed on 24/07/2023 at 06:25.
Pushed by fusionfuture into branch &apos;master&apos;.

Fix crash in TasksModel::move

Add nullptr check on d-&gt;activityInfo
Add test case for this bug to tasksmodeltest.cpp


(cherry picked from commit ea4724ce000a8740a499f4677e8f7e5cc09f4c8f)

M  +43   -0    libtaskmanager/autotests/tasksmodeltest.cpp
M  +1    -1    libtaskmanager/tasksmodel.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/097e896ccb960a33e4bc60721344e3529ccedf4b</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>