Bug 476043 - Frequent plasma crashes that affect KDE apps
Summary: Frequent plasma crashes that affect KDE apps
Status: RESOLVED WORKSFORME
Alias: None
Product: plasmashell
Classification: Plasma
Component: generic-crash (other bugs)
Version First Reported In: 5.27.8
Platform: Neon Linux
: NOR crash
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
: 476072 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-10-24 12:15 UTC by avlas
Modified: 2025-04-09 16:22 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.3.4
Sentry Crash Report:


Attachments
backtrace (225.67 KB, text/plain)
2023-10-25 05:35 UTC, avlas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description avlas 2023-10-24 12:15:51 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

This issue may be a regression of https://bugs.kde.org/show_bug.cgi?id=357895 or at least I workarounded with the same reported solution, that is, disabling tooltips: https://bugs.kde.org/show_bug.cgi?id=357895#c28

STEPS TO REPRODUCE

Click on plasma widgets, then on the desktop

OBSERVED RESULT

Plasma crashes killing KDE apps such as Kmail and Konqueror

SOFTWARE/OS VERSIONS
Operating System: KDE neon 5.27
KDE Plasma Version: 5.27.8
KDE Frameworks Version: 5.111.0
Qt Version: 5.15.11
Kernel Version: 6.2.0-35-generic (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i5-8350U CPU @ 1.70GHz
Memory: 15.4 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620
Manufacturer: LENOVO
Product Name: 20KHCTO1WW
System Version: ThinkPad X1 Carbon 6th
Comment 1 Nate Graham 2023-10-24 18:18:13 UTC
As the message at the top of the SUMMARY says, if something crashed, we need a backtrace of it so we can figure out what's going on. Can you please attach a backtrace of the crash using the coredumpctl command-line program, as detailed in https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports#Retrieving_a_backtrace_using_coredumpctl?

Thanks!
Comment 2 avlas 2023-10-24 18:42:08 UTC
(In reply to Nate Graham from comment #1)
> As the message at the top of the SUMMARY says, if something crashed, we need
> a backtrace of it so we can figure out what's going on. Can you please
> attach a backtrace of the crash using the coredumpctl command-line program,
> as detailed in
> https://community.kde.org/Guidelines_and_HOWTOs/Debugging/
> How_to_create_useful_crash_reports#Retrieving_a_backtrace_using_coredumpctl?
> 
> Thanks!

I know. I was about to do that... but weirdly enough, the crashes I experienced for months, were resolved after disabling the tooltips.

I reenabled the tooltips with the intention to attach the backtrace to this bug but, hey, plasma isn't crashing anymore. I know it sounds weird but it's how it happened.

I was waiting for the issue to reappear, then I saw your response. It the issue comes back, I will attach the backtrace. In the meantime please just ignore.
Comment 3 avlas 2023-10-25 05:32:44 UTC
Happened again. It may be starting to happen after waking up from suspend rather than other things. It my be unrelated to bug id=357895
Comment 4 avlas 2023-10-25 05:35:27 UTC
Created attachment 162553 [details]
backtrace
Comment 5 Nate Graham 2023-10-25 20:32:13 UTC
Thanks. Pasting the backtrace inline for searchability:

Thread 1 (Thread 0x7fd1f8e20e80 (LWP 188992)):
[KCrash Handler]
#4  0x00007fd1fd483245 in QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> >::operator->() const (this=0x4d9) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qscopedpointer.h:118
#5  qGetPtrHelper<QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> > const>(QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> > const&) (ptr=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:1151
#6  QQuickWindow::d_func() const (this=0x4d1) at items/qquickwindow.h:79
#7  QQuickWindow::mouseGrabberItem() const (this=0x4d1) at items/qquickwindow.cpp:1740
#8  0x00007fd1fd485a8f in QQuickWindowPrivate::removeGrabber(QQuickItem*, bool, bool) (this=this@entry=0x563037289ab0, grabber=grabber@entry=0x563038dd7f70, mouse=mouse@entry=true, touch=touch@entry=true) at items/qquickwindow.cpp:1007
#9  0x00007fd1fd46b575 in QQuickItemPrivate::derefWindow() (this=this@entry=0x563038eba3a0) at items/qquickitem.cpp:3035
#10 0x00007fd1fd46c164 in QQuickItem::setParentItem(QQuickItem*) (this=0x563038dd7f70, parentItem=parentItem@entry=0x0) at items/qquickitem.cpp:2717
#11 0x00007fd1fd46c464 in QQuickItem::~QQuickItem() (this=this@entry=0x563038eba230, __in_chrg=<optimized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qlist.h:117
#12 0x00007fd1fd4d9211 in QQuickMouseArea::~QQuickMouseArea() (this=this@entry=0x563038eba230, __in_chrg=<optimized out>) at items/qquickmousearea.cpp:436
#13 0x00007fd1fd5f8969 in QQmlPrivate::QQmlElement<QQuickMouseArea>::~QQmlElement() (this=0x563038eba230, __in_chrg=<optimized out>) at ../../include/QtQml/../../src/qml/qml/qqmlprivate.h:144
#14 QQmlPrivate::QQmlElement<QQuickMouseArea>::~QQmlElement() (this=0x563038eba230, __in_chrg=<optimized out>) at ../../include/QtQml/../../src/qml/qml/qqmlprivate.h:144
#15 0x00007fd1fdde131c in PlasmaQuick::AppletQuickItem::~AppletQuickItem() () at /lib/x86_64-linux-gnu/libKF5PlasmaQuick.so.5
#16 0x00007fd1f41f34bd in AppletInterface::~AppletInterface() (this=0x563036d4d7a0, __in_chrg=<optimized out>) at ./src/scriptengines/qml/plasmoid/appletinterface.cpp:132
#17 0x00007fd1fb6e741e in QObjectPrivate::deleteChildren() (this=0x563036d4c220) at kernel/qobject.cpp:2137
#18 0x00007fd1fb6f23d6 in QObject::~QObject() (this=<optimized out>, __in_chrg=<optimized out>) at kernel/qobject.cpp:1115
#19 0x00007fd1f41ec8cd in DeclarativeAppletScript::~DeclarativeAppletScript() (this=0x563036d43a90, __in_chrg=<optimized out>) at ./src/scriptengines/qml/plasmoid/declarativeappletscript.cpp:65
#20 0x00007fd1fdb246d8 in  () at /lib/x86_64-linux-gnu/libKF5Plasma.so.5
#21 0x00007fd1fdb248dd in  () at /lib/x86_64-linux-gnu/libKF5Plasma.so.5
#22 0x00007fd1fdb0e2b6 in Plasma::Applet::~Applet() () at /lib/x86_64-linux-gnu/libKF5Plasma.so.5
#23 0x00007fd1fdb0e2dd in Plasma::Applet::~Applet() () at /lib/x86_64-linux-gnu/libKF5Plasma.so.5
#24 0x00007fd1fb6e741e in QObjectPrivate::deleteChildren() (this=0x563036d366a0) at kernel/qobject.cpp:2137
#25 0x00007fd1fb6f23d6 in QObject::~QObject() (this=<optimized out>, __in_chrg=<optimized out>) at kernel/qobject.cpp:1115
#26 0x00007fd1fdb13e0d in Plasma::Containment::~Containment() () at /lib/x86_64-linux-gnu/libKF5Plasma.so.5
#27 0x0000563035987c40 in ShellCorona::~ShellCorona() (this=0x563036824d10, __in_chrg=<optimized out>) at ./shell/shellcorona.cpp:310
#28 0x0000563035987f3d in ShellCorona::~ShellCorona() (this=0x563036824d10, __in_chrg=<optimized out>) at ./shell/shellcorona.cpp:312
#29 0x00007fd1fb6e9b83 in QObject::event(QEvent*) (this=0x563036824d10, e=0x563042ce24a0) at kernel/qobject.cpp:1334
#30 0x00007fd1fc56c763 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x563036824d10, e=0x563042ce24a0) at kernel/qapplication.cpp:3640
#31 0x00007fd1fb6bc88a in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x563036824d10, event=0x563042ce24a0) at kernel/qcoreapplication.cpp:1064
#32 0x00007fd1fb6bf987 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=0x0, event_type=52, data=0x563036522ec0) at kernel/qcoreapplication.cpp:1821
#33 0x00007fd1fb6c376c in QCoreApplication::exec() () at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:86
#34 0x0000563035954a8b in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at ./shell/main.cpp:235


I can't immediately identify a cause in there.
Comment 6 Nate Graham 2023-10-25 20:50:13 UTC
*** Bug 476072 has been marked as a duplicate of this bug. ***
Comment 7 Nate Graham 2023-10-25 20:50:40 UTC
You indicated in Bug 476072 that you can reproduce the crash by running `plasmashell --replace` in a terminal window; do I have that right?
Comment 8 avlas 2023-10-26 06:36:57 UTC
(In reply to Nate Graham from comment #7)
> You indicated in Bug 476072 that you can reproduce the crash by running
> `plasmashell --replace` in a terminal window; do I have that right?

The two bugs may have different roots:

- In 476072 the bug and backtrace are generated from executing `plasmashell --replace` in krunner.

- The bug here occurs spontaneously. The sequence is that plasmashell crashes and restarts itself. If the backtrace is equivalent to the one in 476072, does it mean that the backtrace is not really about what makes plasmashell crash, but instead about plasmashell restarting when it crashes? 

Is there a way to avoid plasmashell restarting automatically to better identify the root of what makes plasmashell fail in the first place?
Comment 9 Nate Graham 2023-10-26 21:37:56 UTC
The backtraces are the same, which means the same thing is ultimately causing both even if you can reproduce them in different ways (or rather, can only reproduce one, and the other is random).

Plasma always restarts with it crashes; that part isn't connected or relevant.
Comment 10 avlas 2023-10-26 22:34:54 UTC
(In reply to Nate Graham from comment #9)
> The backtraces are the same, which means the same thing is ultimately
> causing both even if you can reproduce them in different ways (or rather,
> can only reproduce one, and the other is random).
> 
> Plasma always restarts with it crashes; that part isn't connected or
> relevant.

Ok. Do you see anything in the backtrace informative for the underlying cause? Do you think this is a plasma bug or could it be a misbehaving widget that I may have installed in my system?
Comment 11 Nate Graham 2023-10-27 14:52:54 UTC
Unfortunately I do not see anything that would help me debug it. A more experienced Plasma developer will be needed here.
Comment 12 avlas 2023-10-28 10:25:06 UTC
(In reply to Nate Graham from comment #11)
> Unfortunately I do not see anything that would help me debug it. A more
> experienced Plasma developer will be needed here.

Ok thanks
Comment 13 Nate Graham 2025-04-08 19:30:31 UTC
Avlas, can you check again in Plasma 6.3 or later and see if this is still happening?

If so, it would also be great to learn if it's happening to you only on X11, only on Wayland, or both.

Thanks a lot!
Comment 14 avlas 2025-04-09 07:15:04 UTC
(In reply to Nate Graham from comment #13)
> Avlas, can you check again in Plasma 6.3 or later and see if this is still
> happening?
> 
> If so, it would also be great to learn if it's happening to you only on X11,
> only on Wayland, or both.
> 
> Thanks a lot!

I have tested `plasmashell --replace` in krunner and plasma has restarted with no issues. This is my system nowadays:

Operating System: KDE neon 6.3
KDE Plasma Version: 6.3.4
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.2
Kernel Version: 6.11.0-21-generic (64-bit)
Graphics Platform: Wayland
Comment 15 TraceyC 2025-04-09 16:18:08 UTC
That's great news. I'll close this out for now. Feel free to re-open it if you see the same crash again. Thanks for the update.