Bug 446195

Summary: Plasmashell crashes after changing the wallpaper from slideshow to plain color
Product: [Plasma] plasmashell Reporter: John Eric <johneric>
Component: Image & Slideshow wallpaper pluginsAssignee: Marco Martin <notmart>
Status: RESOLVED FIXED    
Severity: crash CC: lee295012, mrjptux, nate, plasma-bugs, qydwhotmail
Priority: NOR Keywords: drkonqi
Version: 5.22.5   
Target Milestone: 1.0   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 5.90
Sentry Crash Report:

Description John Eric 2021-11-28 12:44:00 UTC
STEPS TO REPRODUCE
1. Right-click on the desktop, configure the wallpaper to a folder view to a slideshow (1 hour for example), apply and close the dialog
2. Right-click on the desktop, configure the wallpaper to a plain color (keep the folder view), apply and close the dialog
3. Right-click on the desktop: plasma crashes

OBSERVED RESULT
Crash in plasmashell

EXPECTED RESULT
No crash

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 5.22.5 on Ubuntu 21.10
(available in About System)
KDE Plasma Version: 5.22.5 
KDE Frameworks Version: 5.86.0 
Qt Version:  5.12.5

ADDITIONAL INFORMATION
#0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=140405159598464) at pthread_kill.c:44
#1  __pthread_kill_internal (signo=6, threadid=140405159598464) at pthread_kill.c:80
#2  __GI___pthread_kill (threadid=140405159598464, signo=signo@entry=6) at pthread_kill.c:91
#3  0x00007fb2a3b30476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4  0x00007fb2a3b167b7 in __GI_abort () at abort.c:79
#5  0x00007fb2a3db3a31 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#6  0x00007fb2a3dbf4ec in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#7  0x00007fb2a3dbf557 in std::terminate() () from /lib/x86_64-linux-gnu/libstdc++.so.6
#8  0x00007fb2a3dbf7f9 in __cxa_throw () from /lib/x86_64-linux-gnu/libstdc++.so.6
#9  0x00007fb2a3fbcf85 in qBadAlloc() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#10 0x00007fb2a3fbf834 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#11 0x00007fb2a4ed9e80 in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#12 0x00007fb2a4ed9f81 in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#13 0x00007fb2a4f07769 in QWidget::insertAction(QAction*, QAction*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#14 0x00007fb2a4f078b6 in QWidget::addActions(QList<QAction*>) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#15 0x00007fb29c526797 in ?? () from /usr/lib/x86_64-linux-gnu/qt5/plugins/plasma/scriptengines/plasma_appletscript_declarative.so
#16 0x00007fb29c5275de in ?? () from /usr/lib/x86_64-linux-gnu/qt5/plugins/plasma/scriptengines/plasma_appletscript_declarative.so
#17 0x00007fb2a5c213c8 in QQuickItem::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Quick.so.5
#18 0x00007fb2a4ece6b3 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#19 0x00007fb2a41e616a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#20 0x00007fb2a5c3dd56 in QQuickWindowPrivate::deliverMatchingPointsToItem(QQuickItem*, QQuickPointerEvent*, bool) () from /lib/x86_64-linux-gnu/libQt5Quick.so.5
#21 0x00007fb2a5c3eef7 in QQuickWindowPrivate::deliverPressOrReleaseEvent(QQuickPointerEvent*, bool) () from /lib/x86_64-linux-gnu/libQt5Quick.so.5
#22 0x00007fb2a5c3fced in QQuickWindowPrivate::deliverMouseEvent(QQuickPointerMouseEvent*) () from /lib/x86_64-linux-gnu/libQt5Quick.so.5
#23 0x00007fb2a5c40f6f in QQuickWindowPrivate::deliverPointerEvent(QQuickPointerEvent*) () from /lib/x86_64-linux-gnu/libQt5Quick.so.5
#24 0x00007fb2a45d7515 in QWindow::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#25 0x00007fb2a4ece6b3 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#26 0x00007fb2a41e616a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#27 0x00007fb2a45cb257 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#28 0x00007fb2a45a09bc in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#29 0x00007fb29f12bb9e in ?? () from /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#30 0x00007fb2a26218bb in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#31 0x00007fb2a2674f08 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#32 0x00007fb2a261f003 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#33 0x00007fb2a423f548 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#34 0x00007fb2a41e4a9b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#35 0x00007fb2a41ed024 in QCoreApplication::exec() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#36 0x0000560145d53e0c in ?? ()
#37 0x00007fb2a3b17fd0 in __libc_start_call_main (main=main@entry=0x560145d52ec0, argc=argc@entry=1, argv=argv@entry=0x7fffb6335e98) at ../sysdeps/nptl/libc_start_call_main.h:58
#38 0x00007fb2a3b1807d in __libc_start_main_impl (main=0x560145d52ec0, argc=1, argv=0x7fffb6335e98, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffb6335e88) at ../csu/libc-start.c:409
#39 0x0000560145d53f35 in ?? ()
Comment 1 Fushan Wen 2021-12-04 08:14:48 UTC
Can reproduce.
Comment 2 Fushan Wen 2021-12-04 08:16:26 UTC
It could be "Next Wallpaper Image"  not being deleted.
Comment 3 Fushan Wen 2021-12-04 08:20:40 UTC
(gdb) bt
#0  QList<QWidget*>::append(QWidget* const&) (this=0x100000100, t=@0x7fffffffcc30: 0x7fffe40605d0) at ../../include/QtCore/../../src/corelib/tools/qlist.h:622
#1  0x00007ffff6a3fe30 in QWidget::insertAction(QAction*, QAction*) (this=0x7fffe40605d0, before=<optimized out>, action=0x5555560f2d90) at kernel/qwidget.cpp:3129
#2  0x00007ffff6a3ff56 in QWidget::addActions(QList<QAction*>) (this=this@entry=0x7fffe40605d0, actions=...) at kernel/qwidget.cpp:3098
#3  0x00007ffff00c7537 in ContainmentInterface::addContainmentActions(QMenu*, QEvent*) (this=this@entry=0x555555da1900, desktopMenu=desktopMenu@entry=0x7fffe40605d0, event=event@entry=0x7fffffffd380)
    at /usr/src/debug/plasma-framework-5.89.0git.20211202T174329~a871333d9-ku.12.1.x86_64/src/scriptengines/qml/plasmoid/containmentinterface.cpp:1135
#4  0x00007ffff00c841e in ContainmentInterface::mousePressEvent(QMouseEvent*) (this=0x555555da1900, event=<optimized out>)
    at /usr/src/debug/plasma-framework-5.89.0git.20211202T174329~a871333d9-ku.12.1.x86_64/src/scriptengines/qml/plasmoid/containmentinterface.cpp:943
#5  0x00007ffff778a988 in QQuickItem::event(QEvent*) (this=0x555555da1900, ev=0x7fffffffd380) at /usr/src/debug/libqt5-qtdeclarative-5.15.2+kde36-ku.1.1.x86_64/src/quick/items/qquickitem.cpp:8221
#6  0x00007ffff6a07a7f in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x555555da1900, e=0x7fffffffd380) at kernel/qapplication.cpp:3632
#7  0x00007ffff5c699fa in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x555555da1900, event=0x7fffffffd380) at kernel/qcoreapplication.cpp:1064
#8  0x00007ffff77a6d16 in QQuickWindowPrivate::deliverMatchingPointsToItem(QQuickItem*, QQuickPointerEvent*, bool) (this=this@entry=0x555555dd32f0, item=0x555555da1900, pointerEvent=pointerEvent@entry=
    0x555558604f70, handlersOnly=handlersOnly@entry=false) at /usr/src/debug/libqt5-qtdeclarative-5.15.2+kde36-ku.1.1.x86_64/src/quick/items/qquickwindow.cpp:2903
#9  0x00007ffff77a7eaf in QQuickWindowPrivate::deliverPressOrReleaseEvent(QQuickPointerEvent*, bool) (this=<optimized out>, event=<optimized out>, handlersOnly=false)
    at /usr/src/debug/libqt5-qtdeclarative-5.15.2+kde36-ku.1.1.x86_64/src/quick/items/qquickwindow.cpp:2855
#10 0x00007ffff77a8cad in QQuickWindowPrivate::deliverMouseEvent(QQuickPointerMouseEvent*) (this=this@entry=0x555555dd32f0, pointerEvent=0x555558604f70)
    at /usr/src/debug/libqt5-qtdeclarative-5.15.2+kde36-ku.1.1.x86_64/src/quick/items/qquickwindow.cpp:2040
#11 0x00007ffff77a9f2b in QQuickWindowPrivate::deliverPointerEvent(QQuickPointerEvent*) (this=0x555555dd32f0, event=0x555558604f70)
    at /usr/src/debug/libqt5-qtdeclarative-5.15.2+kde36-ku.1.1.x86_64/src/quick/items/qquickwindow.cpp:2612
#12 0x00007ffff60d45e5 in QWindow::event(QEvent*) (this=0x555555dbfb40, ev=<optimized out>) at kernel/qwindow.cpp:2438
#13 0x00007ffff6a07a7f in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x555555dbfb40, e=0x7fffffffd380) at kernel/qapplication.cpp:3632
#14 0x00007ffff5c699fa in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x555555dbfb40, event=0x7fffffffd380) at kernel/qcoreapplication.cpp:1064
#15 0x00007ffff60c85c7 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) (e=0x55555871d670) at kernel/qguiapplication.cpp:2282
#16 0x00007ffff609e78c in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) (flags=flags@entry=...) at kernel/qwindowsysteminterface.cpp:1169
#17 0x00007ffff1116d0a in xcbSourceDispatch(GSource*, GSourceFunc, gpointer) (source=source@entry=0x5555556ebb30) at qxcbeventdispatcher.cpp:105
#18 0x00007ffff3f86d4f in g_main_dispatch (context=0x7fffec005000) at ../glib/gmain.c:3381
#19 g_main_context_dispatch (context=0x7fffec005000) at ../glib/gmain.c:4099
#20 0x00007ffff3f870d8 in g_main_context_iterate (context=context@entry=0x7fffec005000, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4175
#21 0x00007ffff3f8718f in g_main_context_iteration (context=0x7fffec005000, may_block=1) at ../glib/gmain.c:4240
#22 0x00007ffff5cc0ed4 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x5555556f6800, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#23 0x00007ffff5c683fb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fffffffd6b0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#24 0x00007ffff5c706e0 in QCoreApplication::exec() () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#25 0x00007ffff60bc18c in QGuiApplication::exec() () at kernel/qguiapplication.cpp:1867
#26 0x00007ffff6a079f5 in QApplication::exec() () at kernel/qapplication.cpp:2824
#27 0x0000555555579611 in main(int, char**) (argc=<optimized out>, argv=0x7fffffffd870) at /usr/src/debug/plasma5-workspace-5.23.80git.20211130T213720~747076d71-ku.67.1.x86_64/shell/main.cpp:238
Comment 4 Bug Janitor Service 2021-12-04 10:41:07 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/plasma-framework/-/merge_requests/406
Comment 5 Bug Janitor Service 2021-12-04 10:41:31 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1246
Comment 6 Fushan Wen 2021-12-04 16:09:33 UTC
Git commit 9b37459570f75e09f17aadf32f7abfe8b8d4d1e0 by Fushan Wen.
Committed on 04/12/2021 at 10:48.
Pushed by fusionfuture into branch 'master'.

wallpaperinterface: Don't double delete action

`removeAction` already deletes the action, it makes no sense to delete
the action again and will crash plasmashell.

M  +0    -1    src/scriptengines/qml/plasmoid/wallpaperinterface.cpp

https://invent.kde.org/frameworks/plasma-framework/commit/9b37459570f75e09f17aadf32f7abfe8b8d4d1e0
Comment 7 Fushan Wen 2021-12-05 17:21:24 UTC
Git commit 77fedf1f9919eb2cc07c8ecccdd70ad2a7343161 by Fushan Wen.
Committed on 05/12/2021 at 00:51.
Pushed by ngraham into branch 'master'.

wallpaperinterface: Update "contextualActions" after clearing actions

After clearing the entire action collection, "contextualActions" needs
to be updated to remove invalid action pointers.

M  +1    -0    src/scriptengines/qml/plasmoid/wallpaperinterface.cpp

https://invent.kde.org/frameworks/plasma-framework/commit/77fedf1f9919eb2cc07c8ecccdd70ad2a7343161
Comment 8 Fushan Wen 2021-12-12 15:54:09 UTC
The patch was not merged into 5.89. Delayed to 5.90.
Comment 9 Fushan Wen 2022-03-22 11:50:35 UTC
*** Bug 421316 has been marked as a duplicate of this bug. ***