Bug 501588

Summary: On X11, Plasmashell crashed after closing laptop lid right after login
Product: [Plasma] plasmashell Reporter: bugskde
Component: generic-crashAssignee: Plasma Bugs List <plasma-bugs-null>
Status: REOPENED ---    
Severity: crash CC: kishore96, nate, oguilherme, sephiroth_pk
Priority: NOR Keywords: drkonqi, qt-crash, X11-only
Version First Reported In: 6.3.2   
Target Milestone: 1.0   
Platform: Fedora RPMs   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=499383
Latest Commit: Version Fixed In: 6.3.5
Sentry Crash Report: https://crash-reports.kde.org/organizations/kde/issues/148696/events/1da8ac1a255d4d14a98a6a60edfe02f2/
Attachments: New crash information added by DrKonqi
attachment-4100042-0.html

Description bugskde 2025-03-16 15:59:53 UTC
Application: plasmashell (6.3.2)

ApplicationNotResponding [ANR]: false
Qt Version: 6.8.2
Frameworks Version: 6.11.0
Operating System: Linux 6.13.5-200.fc41.x86_64 x86_64
Windowing System: X11
Distribution: "Fedora Linux 41 (KDE Plasma)"
DrKonqi: 6.3.2 [CoredumpBackend]

-- Information about the crash:
Plasmashell crashed after closing laptop lid right after login.
two screens connected through dell thunderbolt4 dock
no action taken after login, no applictions on desktop

The reporter is unsure if this crash is reproducible.

-- Backtrace (Reduced):
#5  0x00007f0e93196898 in QXcbVirtualDesktop::screen (this=<optimized out>) at /usr/src/debug/qt6-qtbase-6.8.2-3.fc41.x86_64/src/plugins/platforms/xcb/qxcbscreen.h:38
#6  QXcbScreen::screen (this=<optimized out>) at /usr/src/debug/qt6-qtbase-6.8.2-3.fc41.x86_64/src/plugins/platforms/xcb/qxcbscreen.h:152
#7  QXcbScreen::root (this=<optimized out>) at /usr/src/debug/qt6-qtbase-6.8.2-3.fc41.x86_64/src/plugins/platforms/xcb/qxcbscreen.h:153
#8  QXcbWindow::handleConfigureNotifyEvent (this=0x55c6bb1bb760, event=0x7f0e8400d860) at /usr/src/debug/qt6-qtbase-6.8.2-3.fc41.x86_64/src/plugins/platforms/xcb/qxcbwindow.cpp:1815
#9  0x00007f0e93156058 in QXcbConnection::handleXcbEvent (this=this@entry=0x55c6b8c35fa0, event=event@entry=0x7f0e8400d860) at /usr/src/debug/qt6-qtbase-6.8.2-3.fc41.x86_64/src/plugins/platforms/xcb/qxcbconnection.cpp:634


Reported using DrKonqi
Comment 1 bugskde 2025-03-16 15:59:54 UTC
Created attachment 179464 [details]
New crash information added by DrKonqi

DrKonqi auto-attaching complete backtrace.
Comment 2 Nate Graham 2025-03-17 19:18:16 UTC
Thread 1 (Thread 0x7f0ea106dd80 (LWP 3165)):
[KCrash Handler]
#5  0x00007f0e93196898 in QXcbVirtualDesktop::screen (this=<optimized out>) at /usr/src/debug/qt6-qtbase-6.8.2-3.fc41.x86_64/src/plugins/platforms/xcb/qxcbscreen.h:38
#6  QXcbScreen::screen (this=<optimized out>) at /usr/src/debug/qt6-qtbase-6.8.2-3.fc41.x86_64/src/plugins/platforms/xcb/qxcbscreen.h:152
#7  QXcbScreen::root (this=<optimized out>) at /usr/src/debug/qt6-qtbase-6.8.2-3.fc41.x86_64/src/plugins/platforms/xcb/qxcbscreen.h:153
#8  QXcbWindow::handleConfigureNotifyEvent (this=0x55c6bb1bb760, event=0x7f0e8400d860) at /usr/src/debug/qt6-qtbase-6.8.2-3.fc41.x86_64/src/plugins/platforms/xcb/qxcbwindow.cpp:1815
#9  0x00007f0e93156058 in QXcbConnection::handleXcbEvent (this=this@entry=0x55c6b8c35fa0, event=event@entry=0x7f0e8400d860) at /usr/src/debug/qt6-qtbase-6.8.2-3.fc41.x86_64/src/plugins/platforms/xcb/qxcbconnection.cpp:634
#10 0x00007f0e93157407 in QXcbConnection::processXcbEvents (this=0x55c6b8c35fa0, flags=...) at /usr/src/debug/qt6-qtbase-6.8.2-3.fc41.x86_64/src/plugins/platforms/xcb/qxcbconnection.cpp:1086
#11 0x00007f0e931788ff in xcbSourceDispatch (source=<optimized out>) at /usr/src/debug/qt6-qtbase-6.8.2-3.fc41.x86_64/src/plugins/platforms/xcb/qxcbeventdispatcher.cpp:55
#12 0x00007f0ea61b428c in g_main_dispatch (context=0x7f0e8c000f00) at ../glib/gmain.c:3357
#13 g_main_context_dispatch_unlocked (context=0x7f0e8c000f00) at ../glib/gmain.c:4208
#14 0x00007f0ea62147b8 in g_main_context_iterate_unlocked.isra.0 (context=context@entry=0x7f0e8c000f00, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4273
#15 0x00007f0ea61b5783 in g_main_context_iteration (context=0x7f0e8c000f00, may_block=1) at ../glib/gmain.c:4338
#16 0x00007f0ea79ef2b3 in QEventDispatcherGlib::processEvents (this=0x55c6b8cb0820, flags=...) at /usr/src/debug/qt6-qtbase-6.8.2-3.fc41.x86_64/src/corelib/kernel/qeventdispatcher_glib.cpp:399
#17 0x00007f0ea7700993 in QEventLoop::exec (this=this@entry=0x7ffd9e6dccd0, flags=..., flags@entry=...) at /usr/src/debug/qt6-qtbase-6.8.2-3.fc41.x86_64/src/corelib/global/qflags.h:34
#18 0x00007f0ea76fbf6e in QCoreApplication::exec () at /usr/src/debug/qt6-qtbase-6.8.2-3.fc41.x86_64/src/corelib/global/qflags.h:74
#19 0x00007f0ea7ed7d3d in QGuiApplication::exec () at /usr/src/debug/qt6-qtbase-6.8.2-3.fc41.x86_64/src/gui/kernel/qguiapplication.cpp:1975
#20 0x00007f0ea9a3d929 in QApplication::exec () at /usr/src/debug/qt6-qtbase-6.8.2-3.fc41.x86_64/src/widgets/kernel/qapplication.cpp:2564
#21 0x000055c6878f32fe in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/plasma-workspace-6.3.2-1.fc41.x86_64/shell/main.cpp:191

Not seeing any KDE code in the backtrace; could be a Qt issue. Maybe it's the X11 equivalent of Bug 499383?
Comment 3 bugskde 2025-03-17 20:22:26 UTC
Created attachment 179513 [details]
attachment-4100042-0.html

|Ahm, I'm not into KDE nor Qt. This info was gathered by a tool. Looking 
at the sources @ qt.io 
(https://code.qt.io/cgit/qt/qtbase.git/tree/src/plugins/platforms/xcb/qxcbscreen.h?h=6.8.2), 
that's the first frames of the callstack. Bug |499383 seems in a different code area.
  |1: xcb_screen_t *screen() const { return m_screen; } ||2: xcb_screen_t *screen() const { return m_virtualDesktop->screen(); } ||3: xcb_window_t root() const { return screen()->root; } ||4: auto reply = Q_XCB_REPLY(xcb_translate_coordinates, 
xcb_connection(), xcb_window(), xcbScreen()->root(), 0, 0); 5: |
|case XCB_FOCUS_OUT: HANDLE_PLATFORM_WINDOW_EVENT(xcb_focus_out_event_t, 
event, handleFocusOutEvent);||..... A segmentation fault at (1) is most likely due to a crab ||QXcbScreen::|/|m_virtualDesktop|/ |pointer. S.b. wants to handle an event while ||/QXcbScreen/'s ||virtual desktop is gone. M.b. also the QXcbScreen instance is already 
deleted at this time. That could be because desktop configuration was 
being changed in that moment because I closed the laptop lid and thus 
the laptop screen was deactivated. At some higher level of the 
callstack, events need to be stopped before deleting ||the virtual desktop|||||

On 17.03.25 20:18, Nate Graham wrote:
> https://bugs.kde.org/show_bug.cgi?id=501588
>
> Nate Graham<nate@kde.org> changed:
>
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>              Summary|Plasmashell crashed after   |On X11, Plasmashell crashed
>                     |closing laptop lid right    |after closing laptop lid
>                     |after login.                |right after login
>             Keywords|                            |X11-only
>                   CC|                            |nate@kde.org
>
> --- Comment #2 from Nate Graham<nate@kde.org> ---
> Thread 1 (Thread 0x7f0ea106dd80 (LWP 3165)):
> [KCrash Handler]
> #5  0x00007f0e93196898 in QXcbVirtualDesktop::screen (this=<optimized out>) at
> /usr/src/debug/qt6-qtbase-6.8.2-3.fc41.x86_64/src/plugins/platforms/xcb/qxcbscreen.h:38
> #6  QXcbScreen::screen (this=<optimized out>) at
> /usr/src/debug/qt6-qtbase-6.8.2-3.fc41.x86_64/src/plugins/platforms/xcb/qxcbscreen.h:152
> #7  QXcbScreen::root (this=<optimized out>) at
> /usr/src/debug/qt6-qtbase-6.8.2-3.fc41.x86_64/src/plugins/platforms/xcb/qxcbscreen.h:153
> #8  QXcbWindow::handleConfigureNotifyEvent (this=0x55c6bb1bb760,
> event=0x7f0e8400d860) at
> /usr/src/debug/qt6-qtbase-6.8.2-3.fc41.x86_64/src/plugins/platforms/xcb/qxcbwindow.cpp:1815
> #9  0x00007f0e93156058 in QXcbConnection::handleXcbEvent
> (this=this@entry=0x55c6b8c35fa0, event=event@entry=0x7f0e8400d860) at
> /usr/src/debug/qt6-qtbase-6.8.2-3.fc41.x86_64/src/plugins/platforms/xcb/qxcbconnection.cpp:634
> #10 0x00007f0e93157407 in QXcbConnection::processXcbEvents
> (this=0x55c6b8c35fa0, flags=...) at
> /usr/src/debug/qt6-qtbase-6.8.2-3.fc41.x86_64/src/plugins/platforms/xcb/qxcbconnection.cpp:1086
> #11 0x00007f0e931788ff in xcbSourceDispatch (source=<optimized out>) at
> /usr/src/debug/qt6-qtbase-6.8.2-3.fc41.x86_64/src/plugins/platforms/xcb/qxcbeventdispatcher.cpp:55
> #12 0x00007f0ea61b428c in g_main_dispatch (context=0x7f0e8c000f00) at
> ../glib/gmain.c:3357
> #13 g_main_context_dispatch_unlocked (context=0x7f0e8c000f00) at
> ../glib/gmain.c:4208
> #14 0x00007f0ea62147b8 in g_main_context_iterate_unlocked.isra.0
> (context=context@entry=0x7f0e8c000f00, block=block@entry=1,
> dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4273
> #15 0x00007f0ea61b5783 in g_main_context_iteration (context=0x7f0e8c000f00,
> may_block=1) at ../glib/gmain.c:4338
> #16 0x00007f0ea79ef2b3 in QEventDispatcherGlib::processEvents
> (this=0x55c6b8cb0820, flags=...) at
> /usr/src/debug/qt6-qtbase-6.8.2-3.fc41.x86_64/src/corelib/kernel/qeventdispatcher_glib.cpp:399
> #17 0x00007f0ea7700993 in QEventLoop::exec (this=this@entry=0x7ffd9e6dccd0,
> flags=..., flags@entry=...) at
> /usr/src/debug/qt6-qtbase-6.8.2-3.fc41.x86_64/src/corelib/global/qflags.h:34
> #18 0x00007f0ea76fbf6e in QCoreApplication::exec () at
> /usr/src/debug/qt6-qtbase-6.8.2-3.fc41.x86_64/src/corelib/global/qflags.h:74
> #19 0x00007f0ea7ed7d3d in QGuiApplication::exec () at
> /usr/src/debug/qt6-qtbase-6.8.2-3.fc41.x86_64/src/gui/kernel/qguiapplication.cpp:1975
> #20 0x00007f0ea9a3d929 in QApplication::exec () at
> /usr/src/debug/qt6-qtbase-6.8.2-3.fc41.x86_64/src/widgets/kernel/qapplication.cpp:2564
> #21 0x000055c6878f32fe in main (argc=<optimized out>, argv=<optimized out>) at
> /usr/src/debug/plasma-workspace-6.3.2-1.fc41.x86_64/shell/main.cpp:191
>
> Not seeing any KDE code in the backtrace; could be a Qt issue. Maybe it's the
> X11 equivalent of Bug 499383?
>
Comment 4 TraceyC 2025-04-15 18:23:42 UTC
*** Bug 502818 has been marked as a duplicate of this bug. ***
Comment 5 cwo 2025-05-10 11:48:39 UTC
*** Bug 503833 has been marked as a duplicate of this bug. ***
Comment 6 Nate Graham 2025-06-08 13:25:15 UTC
Sentry says there have been no further reports from affected people following their upgrade to Plasma 6.3.5; closing.
Comment 7 Riccardo Robecchi 2025-06-09 12:18:27 UTC
I did actually experienced this again last week, I didn't report it because I knew there was already an open bug report.