Bug 480927 - Programs running under KWin + Wayland segfault when switching monitors
Summary: Programs running under KWin + Wayland segfault when switching monitors
Status: RESOLVED DUPLICATE of bug 473020
Alias: None
Product: kwin
Classification: Plasma
Component: multi-screen (show other bugs)
Version: 5.93.0
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: multiscreen, qt6, wayland
Depends on:
Blocks:
 
Reported: 2024-02-06 01:46 UTC by Adam Fontenot
Modified: 2024-02-14 17:55 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
crash traceback (for Konsole) (65.95 KB, text/vnd.kde.kcrash-report)
2024-02-06 01:46 UTC, Adam Fontenot
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Fontenot 2024-02-06 01:46:51 UTC
Created attachment 165588 [details]
crash traceback (for Konsole)

SUMMARY

I found a case where all my applications crashed when I plugged in an external screen.

 * The crashes occurred in several applications (e.g. Konsole) that were running at the time of the crash, not KWin itself. However, having a look at the backtrace I believe that the issue is probably not in any particular application (or set of applications), so I'm reporting it here.
 * The crash doesn't occur with every monitor switch. This has happened to me once so far, with the specific reproduction steps given below.
 * I suspect the issue probably lies upstream in Qt. I need (at the very least) someone to help triage the issue, in order to verify that this is the case, help determine whether it's already been reported (or fixed?), and so on.

STEPS TO REPRODUCE
1. Set KDE to display exclusively on the external screen.
2. Reboot the computer and log in to KDE directly on the external screen.
3. Put the computer to sleep.
4. Unplug the external screen and wake the computer back up again. Log in.
5. Plug in the external screen.

OBSERVED RESULT
All running applications (all of them were built on Qt6, incidentally) crash with a segfault. The call stack contains

#11 QPlatformScreen::screen (this=this@entry=0x72bdd4006da0) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.7.0-beta2/src/gui/kernel/qplatformscreen.cpp:116
#12 0x000072bde856396e in QtWaylandClient::QWaylandWindow::handleScreensChanged (this=0x61642913e7d0) at /usr/src/debug/qt6-wayland/qtwayland-everywhere-src-6.7.0-beta2/src/client/qwaylandwindow.cpp:1414

Full stack trace attached.

EXPECTED RESULT
No crash, all applications automatically switch to external screen since it was enabled (exclusively) last time it was plugged in.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.93.0
KDE Frameworks Version: 5.249.0
Qt Version: 6.7.0
Kernel Version: 6.7.3-arch1-2 (64-bit)
Graphics Platform: Wayland

This is an up to date Arch Linux system with the kde-unstable repositories enabled, with timestamp Tue Feb  6 01:45:31 UTC 2024.

ADDITIONAL INFORMATION

Unfortunately, I haven't been able to reproduce this so far. I'm hoping the kcrash data provides enough information to work out a more precise cause.
Comment 1 Nate Graham 2024-02-14 17:55:44 UTC
Thanks. It appears to be the same as Bug 473020, which itself looks to be a potential recurrence of Bug 435989.

*** This bug has been marked as a duplicate of bug 473020 ***