Bug 465827

Summary: Segmentation fault in plasmashell on X11 when unplugging a display connected via USB-C / Thunderbolt 4
Product: [Plasma] plasmashell Reporter: Oliver Reeh <oliver>
Component: generic-multiscreenAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: crash CC: aleixpol, nate, notmart
Priority: NOR Flags: oliver: Wayland-
oliver: X11+
Version: 5.27.0   
Target Milestone: 1.0   
Platform: Slackware   
OS: Linux   
Latest Commit: Version Fixed In: 5.104
Sentry Crash Report:

Description Oliver Reeh 2023-02-16 12:02:41 UTC
SUMMARY
Segmentation fault in plasmashell when unplugging a display connected via USB-C / Thunderbolt 4

STEPS TO REPRODUCE
1. connect a display with USB-C / TB4 
2. disconnect it


OBSERVED RESULT
drkonqi report a segfault in plasmashell
Application: Plasma (plasmashell), signal: Segmentation fault

[KCrash Handler]
#4  0x0000000000435e30 in  ()
#5  0x000000000044e8b0 in  ()
#6  0x00007f4c4feea6a2 in  () at /usr/lib64/libQt5Core.so.5
#7  0x00007f4c4feee41a in QTimer::timeout(QTimer::QPrivateSignal) () at /usr/lib64/libQt5Core.so.5
#8  0x00007f4c4fedf53d in QObject::event(QEvent*) () at /usr/lib64/libQt5Core.so.5
#9  0x00007f4c50b703ce in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib64/libQt5Widgets.so.5
#10 0x00007f4c4feb5458 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib64/libQt5Core.so.5
#11 0x00007f4c4ff08f31 in QTimerInfoList::activateTimers() () at /usr/lib64/libQt5Core.so.5
#12 0x00007f4c4ff0973c in  () at /usr/lib64/libQt5Core.so.5
#13 0x00007f4c4eb1dd79 in g_main_context_dispatch () at /usr/lib64/libglib-2.0.so.0
#14 0x00007f4c4eb1dfe8 in  () at /usr/lib64/libglib-2.0.so.0
#15 0x00007f4c4eb1e06c in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#16 0x00007f4c4ff09a16 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#17 0x00007f4c4feb403b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#18 0x00007f4c4febbb42 in QCoreApplication::exec() () at /usr/lib64/libQt5Core.so.5
#19 0x00000000004259e6 in  ()
#20 0x00007f4c4f62c6b7 in __libc_start_call_main () at /lib64/libc.so.6
#21 0x00007f4c4f62c775 in __libc_start_main_impl () at /lib64/libc.so.6
#22 0x0000000000425c01 in  ()
[Inferior 1 (process 14409) detached]

EXPECTED RESULT
no segfault

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Slackware x64
KDE Plasma Version: 5.27.0
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
this happens only in X11 not in wayland
Comment 1 Nate Graham 2023-02-17 21:05:12 UTC
Thank you for the bug report! Unfortunately the backtrace is incomplete and missing debug symbols for the following lines that we need to figure out exactly what's going wrong:

> #4  0x0000000000435e30 in  ()
> #5  0x000000000044e8b0 in  ()

Could you please install debug symbols, reproduce the crash, and attach a new symbolicated backtrace? See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports

Thanks again!
Comment 2 Oliver Reeh 2023-02-19 13:03:35 UTC
With the required debug builds I get KDE Plasma 5.27.80 instead of 5.27.0 and KDE Frameworks 5.104.0 instead of 5.103.0. 
Wit these versions the bug seems to be fixed.
Comment 3 Nate Graham 2023-02-21 19:13:33 UTC
Awesome!