Bug 474385 - Plasma crashes when closing notification after removing icon applet
Summary: Plasma crashes when closing notification after removing icon applet
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (show other bugs)
Version: master
Platform: Other Linux
: NOR crash
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: qt6
: 475701 483574 484635 485504 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-09-10 21:22 UTC by Nicolas Fella
Modified: 2024-04-13 20:08 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0.4


Attachments
Full crash backtrace (179.22 KB, text/vnd.kde.kcrash-report)
2024-03-13 19:21 UTC, Jure Repinc
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Fella 2023-09-10 21:22:00 UTC
STEPS TO REPRODUCE
1. Add an icon applet to the desktop 
2. Remove it
3. Close the "Undo" notifcation

OBSERVED RESULT
#5  0x00000065be102454 in  ()
#6  0x00007f29605d5b7e in QObject::disconnect(QObject const*, char const*, QObject const*, char const*) (sender=0x2083460, signal=signal@entry=0x0, receiver=receiver@entry=0x1b3d520, method=method@entry=0x0) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/kernel/qobject.cpp:3165
#7  0x00007f2963ad2513 in Plasma::Applet::~Applet() (this=0x1b3d520, __in_chrg=<optimized out>) at /home/nico/kde6/src/plasma-framework/src/plasma/applet.cpp:77
#8  0x00007f294c57d099 in IconApplet::~IconApplet() (this=0x1b3d520, __in_chrg=<optimized out>) at /home/nico/kde6/src/plasma-workspace/applets/icon/iconapplet.cpp:54
#9  0x00007f29605cfc59 in QObject::event(QEvent*) (this=0x1b3d520, e=0x424fce0) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/kernel/qobject.cpp:1378
#10 0x00007f2961bc0af8 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib64/libQt6Widgets.so.6
#11 0x00007f296057cdb8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x1b3d520, event=0x424fce0) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/kernel/qcoreapplication.cpp:1118
#12 0x00007f296057cfbd in QCoreApplication::sendEvent(QObject*, QEvent*) (receiver=<optimized out>, event=<optimized out>) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/kernel/qcoreapplication.cpp:1536
#13 0x00007f29605808d5 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=0x0, event_type=0, data=0x1380960) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/kernel/qcoreapplication.cpp:1898
#14 0x00007f2960580c0d in QCoreApplication::sendPostedEvents(QObject*, int) (receiver=<optimized out>, event_type=<optimized out>) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/kernel/qcoreapplication.cpp:1757
#15 0x00007f296082108f in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) (s=0x1633f30) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/kernel/qeventdispatcher_glib.cpp:243
#16 0x00007f295f8b14fc in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#17 0x00007f295f90f6b8 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#18 0x00007f295f8aeb83 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#19 0x00007f296082092f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x1385820, flags=...) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/kernel/qeventdispatcher_glib.cpp:393
#20 0x00007f29605899f3 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fffe09f09d0, flags=..., flags@entry=...) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/global/qflags.h:34
#21 0x00007f296058569d in QCoreApplication::exec() () at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/global/qflags.h:74
#22 0x0000000000425b79 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /home/nico/kde6/src/plasma-workspace/shell/main.cpp:236


SOFTWARE/OS VERSIONS
KDE Plasma Version: master
KDE Frameworks Version: master
Qt Version: 6.5.2

ADDITIONAL INFORMATION
Wayland
Comment 1 Nate Graham 2023-09-11 17:16:48 UTC
Cannot reproduce with current git master and 6.5.2.
Comment 2 Marco Martin 2023-11-23 16:33:42 UTC
looks slightly different to https://bugs.kde.org/show_bug.cgi?id=475701 which has the exact same symptom
Comment 3 Nate Graham 2023-11-29 20:32:16 UTC
Can't reproduce anymore. It must have gotten fixed by something recently.
Comment 4 Nate Graham 2023-11-29 20:33:05 UTC
*** Bug 475701 has been marked as a duplicate of this bug. ***
Comment 5 Jure Repinc 2024-03-13 19:20:43 UTC
Just happened to me now. Dragged a *.sh from dolphin to desktop, it created an Icon widgets for URL. Delted it and closed the undo notification and it crahed with the following backtrace
Thread 1 (Thread 0x7fa73dadfac0 (LWP 3463)):
[KCrash Handler]
#5  0x00007fa740bd1a2f in QObject::disconnect(QObject const*, char const*, QObject const*, char const*) (sender=0x557abc8c5730, signal=signal@entry=0x0, receiver=receiver@entry=0x7fa7280af0b0, method=method@entry=0x0) at /usr/src/debug/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qobject.cpp:3215
#6  0x00007fa74359e783 in Plasma::Applet::~Applet() (this=0x7fa7280af0b0, this=<optimized out>) at /usr/src/debug/libplasma-6.0.80git.20240307T011941~61071f0f/src/plasma/applet.cpp:75
#7  0x00007fa734279c79 in IconApplet::~IconApplet() (this=0x7fa7280af0b0, this=<optimized out>) at /usr/src/debug/plasma-workspace-6.0.80git.20240309T123152~911ef51c/applets/icon/iconapplet.cpp:56
#8  0x00007fa740bca6b7 in QObject::event(QEvent*) (this=0x7fa7280af0b0, e=0x557abb0c78c0) at /usr/src/debug/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qobject.cpp:1424
#9  0x00007fa742dc1aae in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x7fa7280af0b0, e=0x557abb0c78c0) at /usr/src/debug/qtbase-everywhere-src-6.6.2/src/widgets/kernel/qapplication.cpp:3296
#10 0x00007fa740b87498 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x7fa7280af0b0, event=0x557abb0c78c0) at /usr/src/debug/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qcoreapplication.cpp:1121
#11 0x00007fa740b874d9 in QCoreApplication::sendEvent(QObject*, QEvent*) (receiver=<optimized out>, event=<optimized out>) at /usr/src/debug/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qcoreapplication.cpp:1539
#12 0x00007fa740b877f7 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=0x0, event_type=0, data=0x557ab3ac6680) at /usr/src/debug/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qcoreapplication.cpp:1901
#13 0x00007fa740da6783 in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) (s=0x557ab3b825e0) at /usr/src/debug/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qeventdispatcher_glib.cpp:243
#14 0x00007fa73f9aef30 in g_main_dispatch (context=0x7fa738000ef0) at ../glib/gmain.c:3476
#15 g_main_context_dispatch_unlocked (context=context@entry=0x7fa738000ef0) at ../glib/gmain.c:4284
#16 0x00007fa73f9b0b58 in g_main_context_iterate_unlocked (context=context@entry=0x7fa738000ef0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4349
#17 0x00007fa73f9b120c in g_main_context_iteration (context=0x7fa738000ef0, may_block=1) at ../glib/gmain.c:4414
#18 0x00007fa740da330c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x557ab3b05ae0, flags=...) at /usr/src/debug/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qeventdispatcher_glib.cpp:393
#19 0x00007fa740b91cbb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7ffe1a652a60, flags=...) at /usr/src/debug/qtbase-everywhere-src-6.6.2/src/corelib/global/qflags.h:34
#20 0x00007fa740b8b8e6 in QCoreApplication::exec() () at /usr/src/debug/qtbase-everywhere-src-6.6.2/src/corelib/global/qflags.h:74
#21 0x00007fa7413e31bc in QGuiApplication::exec() () at /usr/src/debug/qtbase-everywhere-src-6.6.2/src/gui/kernel/qguiapplication.cpp:1925
#22 0x00007fa742dbeee5 in QApplication::exec() () at /usr/src/debug/qtbase-everywhere-src-6.6.2/src/widgets/kernel/qapplication.cpp:2574
#23 0x0000557ab312615e in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/plasma-workspace-6.0.80git.20240309T123152~911ef51c/shell/main.cpp:211

Operating System: openSUSE Tumbleweed 20240308
KDE Plasma Version: 6.0.80
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.7.7-1-default (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 7600 6-Core Processor
Memory: 31.1 GiB of RAM
Graphics Processor: AMD Radeon RX 480 Graphics
Comment 6 Jure Repinc 2024-03-13 19:21:11 UTC
Created attachment 167119 [details]
Full crash backtrace
Comment 7 Nicolas Fella 2024-03-28 14:15:17 UTC
Not fixed
Comment 8 Nicolas Fella 2024-03-28 14:17:19 UTC
*** Bug 484635 has been marked as a duplicate of this bug. ***
Comment 9 Bug Janitor Service 2024-03-28 14:20:14 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4165
Comment 10 Nicolas Fella 2024-04-01 23:59:27 UTC
Git commit 03b398ed64221638084b88121edf69888f6475a3 by Nicolas Fella.
Committed on 01/04/2024 at 23:47.
Pushed by nicolasfella into branch 'master'.

[applets/icon] Delay deleting the open with menu

The menu is parent to the open actions, which are added as contexual actions to the applet

The Applet dtor accesses these actions, so by deleting the menu (and thus the actions) it will access dangling pointers

To avoid that delete the menu later

M  +4    -2    applets/icon/iconapplet.cpp
M  +1    -1    applets/icon/iconapplet.h

https://invent.kde.org/plasma/plasma-workspace/-/commit/03b398ed64221638084b88121edf69888f6475a3
Comment 11 Nicolas Fella 2024-04-02 00:00:06 UTC
Git commit 861f3cfb85ca324f7b26baab287c6af758a0ba2b by Nicolas Fella.
Committed on 01/04/2024 at 23:59.
Pushed by nicolasfella into branch 'Plasma/6.0'.

[applets/icon] Delay deleting the open with menu

The menu is parent to the open actions, which are added as contexual actions to the applet

The Applet dtor accesses these actions, so by deleting the menu (and thus the actions) it will access dangling pointers

To avoid that delete the menu later
(cherry picked from commit 03b398ed64221638084b88121edf69888f6475a3)

M  +4    -2    applets/icon/iconapplet.cpp
M  +1    -1    applets/icon/iconapplet.h

https://invent.kde.org/plasma/plasma-workspace/-/commit/861f3cfb85ca324f7b26baab287c6af758a0ba2b
Comment 12 Nate Graham 2024-04-09 22:27:29 UTC
*** Bug 483574 has been marked as a duplicate of this bug. ***
Comment 13 medin 2024-04-13 20:08:36 UTC
*** Bug 485504 has been marked as a duplicate of this bug. ***