Bug 483916 - plasmashell crashes when turning on external monitor
Summary: plasmashell crashes when turning on external monitor
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Image Wallpaper (show other bugs)
Version: 6.0.2
Platform: Arch Linux Linux
: NOR crash
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2024-03-18 16:58 UTC by Najjar
Modified: 2024-04-01 13:28 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0.4


Attachments
GDB coredump (23.65 KB, text/plain)
2024-03-18 16:58 UTC, Najjar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Najjar 2024-03-18 16:58:15 UTC
Created attachment 167416 [details]
GDB coredump

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
***
For a while now (from before Plasma 6), some KDE apps (namely Konsole) would crash when turning on an external monitor connected through DP (DP Alt mode on Thunderbolt/USB-C) while having it as the only display device (i.e. laptop lid closed).
After upgrading to Plasma 6 most running Qt programs would crash, up to KWin and the shell itself.
Since my monitor is DP only, I don't have a way of knowing if this would happen on HDMI as well.

This particular bug happened without even turning the display on and off. I was changing display settings (resolution, refresh rate, scaling), then changed the wallpaper when the crash happened.

STEPS TO REPRODUCE 1
1. Connect external display through DP
2. Turn off display, then on again
3. Crash!

STEPS TO REPRODUCE 2
1. Connect external display through DP
2. Change backgrounds
3. Crash!


SOFTWARE/OS VERSIONS
Linux: 6.8.1-arch1-1 (64-bit)
(available in About System)
KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2

ADDITIONAL INFORMATION
I have limited experience in debugging, so I can't tell where the segfault occurs in the core. I have a strong suspicion this is related to QML.
Comment 1 Méven Car 2024-03-19 10:13:02 UTC
```

#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=11, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x000077bc80eab393 in __pthread_kill_internal (signo=11, threadid=<optimized out>) at pthread_kill.c:78
#2  0x000077bc80e5a6c8 in __GI_raise (sig=11) at ../sysdeps/posix/raise.c:26
#3  0x000077bc83b7d43f in KCrash::defaultCrashHandler (sig=11) at /usr/src/debug/kcrash/kcrash-6.0.0/src/kcrash.cpp:586
#4  0x000077bc80e5a770 in <signal handler called> () at /usr/lib/libc.so.6
#5  0x000077bc8276740b in QArrayDataPointer<QString>::QArrayDataPointer (other=..., this=0x7ffd4d9f98c0) at /usr/include/qt6/QtCore/qarraydatapointer.h:38
#6  QList<QString>::QList (this=0x7ffd4d9f98c0, this=<optimized out>) at /usr/include/qt6/QtCore/qlist.h:70
#7  QQmlPropertyMap::keys (this=0x613e1e4bee20) at /usr/src/debug/qt6-declarative/qtdeclarative-everywhere-src-6.6.2/src/qml/util/qqmlpropertymap.cpp:255
#8  0x0000613e1bd7e717 in ContainmentConfigView::applyWallpaper (this=0x613e1ee72d00) at /usr/src/debug/plasma-workspace/plasma-workspace-6.0.2/shell/containmentconfigview.cpp:196
#9  ContainmentConfigView::qt_static_metacall (_o=0x613e1ee72d00, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /usr/src/debug/plasma-workspace/build/shell/plasmashell_autogen/EWIEGA46WW/moc_containmentconfigview.cpp:223
#10 0x0000613e1bd80670 in ContainmentConfigView::qt_metacall (this=0x613e1ee72d00, _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0x7ffd4d9f9c40) at /usr/src/debug/plasma-workspace/build/shell/plasmashell_autogen/EWIEGA46WW/moc_containmentconfigview.cpp:309
```

@Najjar, Do you have a script to change your wallpaper periodically, or anything changing your wallpaper ?
Comment 2 Bug Janitor Service 2024-03-19 10:18:07 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4109
Comment 3 Najjar 2024-03-21 19:59:33 UTC
No. I was browsing the stock wallpapers, including the ones that change according to light/dark themes.
Comment 4 Bug Janitor Service 2024-03-30 01:17:02 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4173
Comment 5 Fushan Wen 2024-04-01 11:32:28 UTC
Git commit 2aeababf9ce63d1b6c9846a611d072e79755bf36 by Fushan Wen.
Committed on 01/04/2024 at 11:13.
Pushed by fusionfuture into branch 'master'.

DesktopView: close config view if its user is destroyed

The config view is kept open when its user is destroyed, but the
wallpaper config map is already invalid at that point.
FIXED-IN: 6.0.4

M  +4    -0    shell/desktopview.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/2aeababf9ce63d1b6c9846a611d072e79755bf36
Comment 6 Fushan Wen 2024-04-01 13:28:59 UTC
Git commit db5763259ff7c476ab99a14fb34494d84ece675d by Fushan Wen.
Committed on 01/04/2024 at 13:06.
Pushed by fusionfuture into branch 'Plasma/6.0'.

DesktopView: close config view if its user is destroyed

The config view is kept open when its user is destroyed, but the
wallpaper config map is already invalid at that point.
FIXED-IN: 6.0.4


(cherry picked from commit 2aeababf9ce63d1b6c9846a611d072e79755bf36)

M  +4    -0    shell/desktopview.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/db5763259ff7c476ab99a14fb34494d84ece675d