Bug 502779

Summary: KWin crashes when connecting a new display on Wayland
Product: [Plasma] kwin Reporter: david.stengel
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: xaver.hugl
Priority: NOR Keywords: drkonqi
Version First Reported In: 6.3.3   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 6.3.4
Sentry Crash Report: https://crash-reports.kde.org/share/issue/174b2b6055b544d99ff49597ff6faa92/
Attachments: New crash information added by DrKonqi

Description david.stengel 2025-04-14 08:54:50 UTC
Application: kwin_wayland (6.3.3)

ApplicationNotResponding [ANR]: false
Qt Version: 6.8.3
Frameworks Version: 6.12.0
Operating System: Linux 6.13.8-arch1-1 x86_64
Windowing System: Wayland
Distribution: "Arch Linux"
DrKonqi: 6.3.3 [CoredumpBackend]

-- Information about the crash:
I have two displays connected to my PC:
	1: 1080x1920 BenQ
	2: 2560x1080 LG
The LG was connected, but set to a different input. So KWin did not send any display output to that.

Steps before the crash:
- Have a video playing in Firefox on the BenQ Display
- Switch the LG display to the input coming from the PC
- The 'display connected' sound gets played
- KWin apparently tries to start sending image content to the LG display
- KWin crashed and restarted

Note this crash only rarely happens, most of the time the new display gets added correctly.

The crash can be reproduced sometimes.

-- Backtrace (Reduced):
#5  0x0000759649421743 in ??? () at /usr/lib/libkwin.so.6
#6  0x00007596491980f6 in KWin::OutputLayer::importScanoutBuffer(KWin::SurfaceItem*, std::shared_ptr<KWin::OutputFrame> const&) () at /usr/lib/libkwin.so.6
#7  0x000075964917763f in KWin::WaylandCompositor::composite(KWin::RenderLoop*) () at /usr/lib/libkwin.so.6
#8  0x00007596467b3f1c in ??? () at /usr/lib/libQt6Core.so.6
#9  0x000075964918ed45 in KWin::RenderLoop::frameRequested(KWin::RenderLoop*) () at /usr/lib/libkwin.so.6


Reported using DrKonqi
Comment 1 david.stengel 2025-04-14 08:54:51 UTC
Created attachment 180248 [details]
New crash information added by DrKonqi

DrKonqi auto-attaching complete backtrace.
Comment 2 Zamundaaa 2025-04-14 12:21:12 UTC
This has been fixed with https://invent.kde.org/plasma/kwin/-/merge_requests/7412