Bug 477233 - plasmashell crashes when trying to exit "Edit Mode"
Summary: plasmashell crashes when trying to exit "Edit Mode"
Status: RESOLVED UPSTREAM
Alias: None
Product: plasmashell
Classification: Plasma
Component: Edit Mode toolbar (show other bugs)
Version: 5.27.80
Platform: Other Linux
: NOR crash
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL: https://codereview.qt-project.org/c/q...
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2023-11-19 14:28 UTC by MScattolin
Modified: 2024-01-18 00:31 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
full backtrace (229.55 KB, text/x-log)
2024-01-09 17:54 UTC, fanzhuyifan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MScattolin 2023-11-19 14:28:23 UTC
SUMMARY
Plasma sometimes crashes whilst exiting Edit Mode, either through clicking the close button or pressing ESC (which doesn't seem to work every time, but it still crashes it)
Also while fiddling with it in an attempt to get plasma to crash again, I actually got a different stack trace once while doing the same thing, it is attached at the end of the main trace because I was unsure about opening a different report

STEPS TO REPRODUCE
1. Right click panel
2. Enter Edit Mode
3. Press ESC

OBSERVED RESULT
the shell crashes

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch, KDE-Unstable repo, kernel 6.5.11
KDE Plasma Version: 5.27.80
KDE Frameworks Version: 5.245.0
Qt Version: 6.6.0
Wayland Session

ADDITIONAL INFORMATION
Core was generated by `/usr/bin/plasmashell --replace'.
Program terminated with signal SIGSEGV, Segmentation fault.

#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=11, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007ff8ed8ac8a3 in __pthread_kill_internal (signo=11, threadid=<optimized out>) at pthread_kill.c:78
#2  0x00007ff8ed85c668 in __GI_raise (sig=11) at ../sysdeps/posix/raise.c:26
#3  0x00007ff8f0614582 in KCrash::defaultCrashHandler(int) (sig=11) at /usr/src/debug/kcrash/kcrash-5.245.0/src/kcrash.cpp:597
#4  0x00007ff8ed85c710 in <signal handler called> () at /usr/lib/libc.so.6
#5  QScopedScopeLevelCounter::QScopedScopeLevelCounter(QThreadData*)
    (threadData=0x0, this=<synthetic pointer>, this=<optimized out>, threadData=<optimized out>)
    at /usr/src/debug/qt6-base/build/include/QtCore/6.6.0/QtCore/private/../../../../../../qtbase-everywhere-src-6.6.0/src/corelib/thread/qthread_p.h:339
#6  QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x562dd22edf20, event=0x7ffe8db286b0)
    at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/corelib/kernel/qcoreapplication.cpp:1115
#7  0x00007ff8edf6271d in QCoreApplication::sendEvent(QObject*, QEvent*) (receiver=<optimized out>, event=<optimized out>)
    at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/corelib/kernel/qcoreapplication.cpp:1536
#8  0x00007ff8ee5e9ad0 in QPlatformWindow::deliverUpdateRequest() (this=<optimized out>)
    at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/gui/kernel/qplatformwindow.cpp:783
#9  0x00007ff8edfa5077 in QObject::event(QEvent*) (this=0x562dd2606670, e=0x562dd2929190)
    at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/corelib/kernel/qobject.cpp:1437
#10 0x00007ff8eef7318b in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x562dd2606670, e=0x562dd2929190)
    at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/widgets/kernel/qapplication.cpp:3290
#11 0x00007ff8edf626d8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x562dd2606670, event=event@entry=0x562dd2929190)
    at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/corelib/kernel/qcoreapplication.cpp:1118
#12 0x00007ff8edf62a5b in QCoreApplication::sendEvent(QObject*, QEvent*) (event=0x562dd2929190, receiver=<optimized out>)
    at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/corelib/kernel/qcoreapplication.cpp:1536
#13 QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=0x0, event_type=0, data=0x562dcec96690)
    at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/corelib/kernel/qcoreapplication.cpp:1898
#14 0x00007ff8ee199d24 in QCoreApplication::sendPostedEvents(QObject*, int) (receiver=0x0, event_type=0)
    at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/corelib/kernel/qcoreapplication.cpp:1757
#15 postEventSourceDispatch(GSource*, GSourceFunc, gpointer) (s=0x562dced1f550)
    at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/corelib/kernel/qeventdispatcher_glib.cpp:243
#16 0x00007ff8ecb45f69 in g_main_dispatch (context=0x7ff8e4000ef0) at ../glib/glib/gmain.c:3476
#17 0x00007ff8ecba4327 in g_main_context_dispatch_unlocked (context=0x7ff8e4000ef0) at ../glib/glib/gmain.c:4284
#18 g_main_context_iterate_unlocked.isra.0
    (context=context@entry=0x7ff8e4000ef0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4349
#19 0x00007ff8ecb44162 in g_main_context_iteration (context=0x7ff8e4000ef0, may_block=1) at ../glib/glib/gmain.c:4414
#20 0x00007ff8ee197934 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x562dcec9bad0, flags=...)
    at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/corelib/kernel/qeventdispatcher_glib.cpp:393
--Type <RET> for more, q to quit, c to continue without paging--
#21 0x00007ff8edf6cc5e in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (flags=..., this=0x7ffe8db28b40)
    at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/corelib/kernel/qeventloop.cpp:100
#22 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7ffe8db28b40, flags=...)
    at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/corelib/kernel/qeventloop.cpp:182
#23 0x00007ff8edf65178 in QCoreApplication::exec() () at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/corelib/global/qflags.h:74
#24 0x00007ff8eef6fd1a in QApplication::exec() () at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/widgets/kernel/qapplication.cpp:2569
#25 0x0000562dccc0a22c in main(int, char**) (argc=<optimized out>, argv=<optimized out>)
    at /usr/src/debug/plasma-workspace/plasma-workspace-5.27.80/shell/main.cpp:230

----
second stack trace
---
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=11, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007f212d0ac8a3 in __pthread_kill_internal (signo=11, threadid=<optimized out>) at pthread_kill.c:78
#2  0x00007f212d05c668 in __GI_raise (sig=11) at ../sysdeps/posix/raise.c:26
#3  0x00007f212ff33582 in KCrash::defaultCrashHandler(int) (sig=11) at /usr/src/debug/kcrash/kcrash-5.245.0/src/kcrash.cpp:597
#4  0x00007f212d05c710 in <signal handler called> () at /usr/lib/libc.so.6
#5  0x00007f212d760c61 in std::__atomic_base<QThreadData*>::load(std::memory_order) const (__m=std::memory_order_relaxed, this=0x7e)
    at /usr/include/c++/13.2.1/atomic:576
#6  std::atomic<QThreadData*>::load(std::memory_order) const (__m=std::memory_order_relaxed, this=0x7e) at /usr/include/c++/13.2.1/atomic:577
#7  QAtomicOps<QThreadData*>::loadRelaxed<QThreadData*>(std::atomic<QThreadData*> const&)
    (_q_value=<error reading variable: Cannot access memory at address 0x7e>)
    at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/corelib/thread/qatomic_cxx11.h:201
#8  QBasicAtomicPointer<QThreadData>::loadRelaxed() const (this=0x7e)
    at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/corelib/thread/qbasicatomic.h:172
#9  QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*)
    (receiver=receiver@entry=0x55f7e3c876b0, event=event@entry=0x7ffff2d8d0f0)
    at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/corelib/kernel/qcoreapplication.cpp:1246
#10 0x00007f212e77317b in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x55f7e3c876b0, e=0x7ffff2d8d0f0)
    at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/widgets/kernel/qapplication.cpp:3284
#11 0x00007f212d7626d8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x55f7e3c876b0, event=0x7ffff2d8d0f0)
    at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/corelib/kernel/qcoreapplication.cpp:1118
#12 0x00007f212d76271d in QCoreApplication::sendEvent(QObject*, QEvent*) (receiver=<optimized out>, event=<optimized out>)
    at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/corelib/kernel/qcoreapplication.cpp:1536
#13 0x00007f212dde9ad0 in QPlatformWindow::deliverUpdateRequest() (this=<optimized out>)
    at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/gui/kernel/qplatformwindow.cpp:783
#14 0x00007f212d7a5077 in QObject::event(QEvent*) (this=0x55f7e4898fe0, e=0x55f7e4751fd0)
    at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/corelib/kernel/qobject.cpp:1437
#15 0x00007f212e77318b in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x55f7e4898fe0, e=0x55f7e4751fd0)
    at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/widgets/kernel/qapplication.cpp:3290
#16 0x00007f212d7626d8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x55f7e4898fe0, event=event@entry=0x55f7e4751fd0)
    at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/corelib/kernel/qcoreapplication.cpp:1118
#17 0x00007f212d762a5b in QCoreApplication::sendEvent(QObject*, QEvent*) (event=0x55f7e4751fd0, receiver=<optimized out>)
    at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/corelib/kernel/qcoreapplication.cpp:1536
#18 QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=0x0, event_type=0, data=0x55f7e01f2690)
    at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/corelib/kernel/qcoreapplication.cpp:1898
#19 0x00007f212d999d24 in QCoreApplication::sendPostedEvents(QObject*, int) (receiver=0x0, event_type=0)
    at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/corelib/kernel/qcoreapplication.cpp:1757
--Type <RET> for more, q to quit, c to continue without paging--
#20 postEventSourceDispatch(GSource*, GSourceFunc, gpointer) (s=0x55f7e0265ca0)
    at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/corelib/kernel/qeventdispatcher_glib.cpp:243
#21 0x00007f212c45ff69 in g_main_dispatch (context=0x7f2120000ef0) at ../glib/glib/gmain.c:3476
#22 0x00007f212c4be327 in g_main_context_dispatch_unlocked (context=0x7f2120000ef0) at ../glib/glib/gmain.c:4284
#23 g_main_context_iterate_unlocked.isra.0
    (context=context@entry=0x7f2120000ef0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4349
#24 0x00007f212c45e162 in g_main_context_iteration (context=0x7f2120000ef0, may_block=1) at ../glib/glib/gmain.c:4414
#25 0x00007f212d997934 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x55f7e01f7ad0, flags=...)
    at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/corelib/kernel/qeventdispatcher_glib.cpp:393
#26 0x00007f212d76cc5e in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (flags=..., this=0x7ffff2d8d580)
    at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/corelib/kernel/qeventloop.cpp:100
#27 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7ffff2d8d580, flags=...)
    at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/corelib/kernel/qeventloop.cpp:182
#28 0x00007f212d765178 in QCoreApplication::exec() () at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/corelib/global/qflags.h:74
#29 0x00007f212e76fd1a in QApplication::exec() () at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/widgets/kernel/qapplication.cpp:2569
#30 0x000055f7de1c822c in main(int, char**) (argc=<optimized out>, argv=<optimized out>)
    at /usr/src/debug/plasma-workspace/plasma-workspace-5.27.80/shell/main.cpp:230
Comment 1 Nate Graham 2023-11-26 16:48:16 UTC
This has been fixed with some commits in recent days. But if you still see it with the same backtrace after updating to the latest git versions, please feel free to re-open this bug report. If you see a crash with a different backtrace, please open a new one. Thanks a lot!
Comment 2 fanzhuyifan 2024-01-09 17:54:23 UTC
Reopening since I sometimes see this backtrace when plasmashell crashes during display rearrangements. Full backtrace will be attached. Version is current master compiled from source.

+bt
#0  QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x55bc890d90a0, event=0x7ffc931b35c0) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.7.0-beta1/src/corelib/kernel/qcoreapplication.cpp:1126
#1  0x00007fdf307654cd in QCoreApplication::sendEvent(QObject*, QEvent*) (receiver=<optimized out>, event=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.7.0-beta1/src/corelib/kernel/qcoreapplication.cpp:1575
#2  0x00007fdf30feb840 in QPlatformWindow::deliverUpdateRequest() (this=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.7.0-beta1/src/gui/kernel/qplatformwindow.cpp:783
#3  0x00007fdf307afc74 in QObject::event(QEvent*) (this=0x55bc891746e0, e=0x55bc8bee2710) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.7.0-beta1/src/corelib/kernel/qobject.cpp:1446
#4  0x00007fdf3297bf4b in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x55bc891746e0, e=0x55bc8bee2710) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.7.0-beta1/src/widgets/kernel/qapplication.cpp:3290
#5  0x00007fdf30765488 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x55bc891746e0, event=event@entry=0x55bc8bee2710) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.7.0-beta1/src/corelib/kernel/qcoreapplication.cpp:1134
#6  0x00007fdf30765814 in QCoreApplication::sendEvent(QObject*, QEvent*) (event=0x55bc8bee2710, receiver=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.7.0-beta1/src/corelib/kernel/qcoreapplication.cpp:1575
#7  QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=0x0, event_type=0, data=0x55bc862d7ba0) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.7.0-beta1/src/corelib/kernel/qcoreapplication.cpp:1946
#8  0x00007fdf309ad734 in QCoreApplication::sendPostedEvents(QObject*, int) (receiver=0x0, event_type=0) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.7.0-beta1/src/corelib/kernel/qcoreapplication.cpp:1803
#9  postEventSourceDispatch(GSource*, GSourceFunc, gpointer) (s=0x55bc8637a4c0) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.7.0-beta1/src/corelib/kernel/qeventdispatcher_glib.cpp:244
#10 0x00007fdf2f384f69 in g_main_dispatch (context=0x7fdf24000ef0) at ../glib/glib/gmain.c:3476
#11 0x00007fdf2f3e3367 in g_main_context_dispatch_unlocked (context=0x7fdf24000ef0) at ../glib/glib/gmain.c:4284
#12 g_main_context_iterate_unlocked.isra.0 (context=context@entry=0x7fdf24000ef0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4349
#13 0x00007fdf2f383162 in g_main_context_iteration (context=0x7fdf24000ef0, may_block=1) at ../glib/glib/gmain.c:4414
#14 0x00007fdf309ab164 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x55bc86306320, flags=...) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.7.0-beta1/src/corelib/kernel/qeventdispatcher_glib.cpp:394
#15 0x00007fdf3076d67e in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (flags=..., this=0x7ffc931b3a40) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.7.0-beta1/src/corelib/kernel/qeventloop.cpp:100
#16 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7ffc931b3a40, flags=...) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.7.0-beta1/src/corelib/kernel/qeventloop.cpp:182
#17 0x00007fdf307690b8 in QCoreApplication::exec() () at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.7.0-beta1/src/corelib/global/qflags.h:74
#18 0x00007fdf3297849a in QApplication::exec() () at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.7.0-beta1/src/widgets/kernel/qapplication.cpp:2568
#19 0x000055bc846780e5 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/plasma-workspace/plasma-workspace/shell/main.cpp:214

Operating System: Arch Linux 
KDE Plasma Version: 5.91.90
KDE Frameworks Version: 5.248.0
Qt Version: 6.7.0
Kernel Version: 6.6.10-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 20 × 13th Gen Intel® Core™ i9-13900H
Memory: 15.2 GiB of RAM
Graphics Processor: Mesa Intel® Graphics
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: ROG Zephyrus G16 GU603VV_GU603VV
System Version: 1.0
Comment 3 fanzhuyifan 2024-01-09 17:54:54 UTC
Created attachment 164779 [details]
full backtrace
Comment 4 Akseli Lahtinen 2024-01-15 14:06:47 UTC
Can't reproduce on my Plasma 6 setup.

Operating System: Fedora Linux 39
KDE Plasma Version: 6.0.80
KDE Frameworks Version: 5.249.0
Qt Version: 6.6.0
Kernel Version: 6.6.9-200.fc39.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
Memory: 15.5 GiB of RAM
Graphics Processor: AMD Radeon RX 6600

Could be possibly fixed, can you try again after updating your arch install? If it still happens, it could be bug related to the Qt version.
Comment 5 fanzhuyifan 2024-01-15 16:11:19 UTC
(In reply to Akseli Lahtinen from comment #4)
> Can't reproduce on my Plasma 6 setup.
> 
> Operating System: Fedora Linux 39
> KDE Plasma Version: 6.0.80
> KDE Frameworks Version: 5.249.0
> Qt Version: 6.6.0
> Kernel Version: 6.6.9-200.fc39.x86_64 (64-bit)
> Graphics Platform: Wayland
> Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
> Memory: 15.5 GiB of RAM
> Graphics Processor: AMD Radeon RX 6600
> 
> Could be possibly fixed, can you try again after updating your arch install?
> If it still happens, it could be bug related to the Qt version.

I tested again on neon unstable and when I rearrange displays, I got the crash in https://bugs.kde.org/show_bug.cgi?id=478838.

l will let you know if I ever see this backtrace here.
Comment 6 David Edmundson 2024-01-17 13:35:35 UTC
I believe this is fixed with https://codereview.qt-project.org/c/qt/qtwayland/+/529547. Please reopen if this happens with Qt 6.6.2 or newer