Bug 508622

Summary: KWin crashes on display disconnect
Product: [Plasma] kwin Reporter: Miren Radia <miren_radia>
Component: generic-crashAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: crash CC: kdedev
Priority: NOR Keywords: drkonqi
Version First Reported In: 6.4.4   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report: https://crash-reports.kde.org/organizations/kde/issues/237982/events/17290b1daf4147269973007aaddcce52/
Attachments: New crash information added by DrKonqi

Description Miren Radia 2025-08-22 22:11:41 UTC
Application: kwin_wayland (6.4.4)

ApplicationNotResponding [ANR]: false
Qt Version: 6.9.1
Frameworks Version: 6.17.0
Operating System: Linux 6.15.10-200.fc42.x86_64 x86_64
Windowing System: Wayland
Distribution: "Fedora release 42 (Adams)"
DrKonqi: 6.4.4 [CoredumpBackend]

-- Information about the crash:
Recently KWin has been crashing consistently when I disconnect my laptop from a Thunderbolt 4 dock (with two 4K displays attached to the dock).

STEPS TO REPRODUCE
1. Start with laptop connected to Thunderbolt dock with two 4K displays attached. The internal screen of the laptop is disabled and both of the external screens are enabled.
2. Disconnect Thunderbolt dock by removing the cable.

OBSERVED BEHAVIOUR
Internal display re-enables and KWin crashes bringing down most desktop application windows with it

EXPECTED BEHAVIOUR
Internal display re-enables and KWin does not crash

The crash can be reproduced every time.

-- Backtrace (Reduced):
#5  0x00007fd84cdd7569 in KWin::ColorManagementOutputV1::ColorManagementOutputV1 (this=0x557db5408c50, client=<optimized out>, id=<optimized out>, version=<optimized out>, output=0x0) at /usr/src/debug/kwin-6.4.4-1.fc42.x86_64/src/wayland/colormanagement_v1.cpp:580
#6  KWin::ColorManagerV1::wp_color_manager_v1_get_output (this=<optimized out>, resource=<optimized out>, id=<optimized out>, output=<optimized out>) at /usr/src/debug/kwin-6.4.4-1.fc42.x86_64/src/wayland/colormanagement_v1.cpp:63
#7  0x00007fd847eb0056 in ffi_call_unix64 () at ../src/x86/unix64.S:104
#8  0x00007fd847eabd08 in ffi_call_int (cif=cif@entry=0x7fffed24fba0, fn=fn@entry=0x7fd84ceeed30 <QtWaylandServer::wp_color_manager_v1::handle_get_output(wl_client*, wl_resource*, unsigned int, wl_resource*)>, rvalue=<optimized out>, rvalue@entry=0x0, avalue=avalue@entry=0x7fffed24fc70, closure=closure@entry=0x0) at ../src/x86/ffi64.c:673
#9  0x00007fd847eae70e in ffi_call (cif=cif@entry=0x7fffed24fba0, fn=0x7fd84ceeed30 <QtWaylandServer::wp_color_manager_v1::handle_get_output(wl_client*, wl_resource*, unsigned int, wl_resource*)>, rvalue=rvalue@entry=0x0, avalue=avalue@entry=0x7fffed24fc70) at ../src/x86/ffi64.c:710
#10 0x00007fd84ae12440 in wl_closure_invoke (closure=closure@entry=0x557db6aab360, target=<optimized out>, target@entry=0x557db53934c0, opcode=opcode@entry=1, data=<optimized out>, data@entry=0x557db5550760, flags=2) at ../src/connection.c:1241
#11 0x00007fd84ae17aa0 in wl_client_connection_data (fd=<optimized out>, mask=<optimized out>, data=<optimized out>) at ../src/wayland-server.c:483
#12 0x00007fd84ae15f42 in wl_event_loop_dispatch (loop=0x7fd830008f00, timeout=<optimized out>) at ../src/event-loop.c:1059
#13 0x00007fd84cde3c29 in KWin::Display::dispatchEvents (this=<optimized out>) at /usr/src/debug/kwin-6.4.4-1.fc42.x86_64/src/wayland/display.cpp:138
#14 0x00007fd849d657ba in QtPrivate::QSlotObjectBase::call (this=0x557db47e5d30, r=0x557db354d490, a=0x7fffed250280) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qobjectdefs_impl.h:461
#15 doActivate<false> (sender=0x557db475f9f0, signal_index=3, argv=argv@entry=0x7fffed250280) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qobject.cpp:4146
[...]
#18 QSocketNotifier::activated (this=this@entry=0x557db475f9f0, _t1=..., _t2=<optimized out>, _t3=...) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/redhat-linux-build/src/corelib/Core_autogen/include/moc_qsocketnotifier.cpp:161
#19 0x00007fd849d74d6b in QSocketNotifier::event (this=0x557db475f9f0, e=<optimized out>) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qsocketnotifier.cpp:327
#20 0x00007fd84b03d97f in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x557db475f9f0, e=0x7fffed2503d0) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/widgets/kernel/qapplication.cpp:3303
#21 0x00007fd849cf9f38 in QCoreApplication::notifyInternal2 (receiver=0x557db475f9f0, event=0x7fffed2503d0) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qcoreapplication.cpp:1106
#22 0x00007fd849cfa19d in QCoreApplication::sendEvent (receiver=<optimized out>, event=<optimized out>) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qcoreapplication.cpp:1546


Reported using DrKonqi
Comment 1 Miren Radia 2025-08-22 22:11:42 UTC
Created attachment 184364 [details]
New crash information added by DrKonqi

DrKonqi auto-attaching complete backtrace.
Comment 2 TraceyC 2025-08-25 17:22:34 UTC
Searchable backtrace


Thread 1 (Thread 0x7fd843809300 (LWP 27977)):
[KCrash Handler]
#5  0x00007fd84cdd7569 in KWin::ColorManagementOutputV1::ColorManagementOutputV1 (this=0x557db5408c50, client=<optimized out>, id=<optimized out>, version=<optimized out>, output=0x0) at /usr/src/debug/kwin-6.4.4-1.fc42.x86_64/src/wayland/colormanagement_v1.cpp:580
#6  KWin::ColorManagerV1::wp_color_manager_v1_get_output (this=<optimized out>, resource=<optimized out>, id=<optimized out>, output=<optimized out>) at /usr/src/debug/kwin-6.4.4-1.fc42.x86_64/src/wayland/colormanagement_v1.cpp:63
#7  0x00007fd847eb0056 in ffi_call_unix64 () at ../src/x86/unix64.S:104
#8  0x00007fd847eabd08 in ffi_call_int (cif=cif@entry=0x7fffed24fba0, fn=fn@entry=0x7fd84ceeed30 <QtWaylandServer::wp_color_manager_v1::handle_get_output(wl_client*, wl_resource*, unsigned int, wl_resource*)>, rvalue=<optimized out>, rvalue@entry=0x0, avalue=avalue@entry=0x7fffed24fc70, closure=closure@entry=0x0) at ../src/x86/ffi64.c:673
#9  0x00007fd847eae70e in ffi_call (cif=cif@entry=0x7fffed24fba0, fn=0x7fd84ceeed30 <QtWaylandServer::wp_color_manager_v1::handle_get_output(wl_client*, wl_resource*, unsigned int, wl_resource*)>, rvalue=rvalue@entry=0x0, avalue=avalue@entry=0x7fffed24fc70) at ../src/x86/ffi64.c:710
#10 0x00007fd84ae12440 in wl_closure_invoke (closure=closure@entry=0x557db6aab360, target=<optimized out>, target@entry=0x557db53934c0, opcode=opcode@entry=1, data=<optimized out>, data@entry=0x557db5550760, flags=2) at ../src/connection.c:1241
#11 0x00007fd84ae17aa0 in wl_client_connection_data (fd=<optimized out>, mask=<optimized out>, data=<optimized out>) at ../src/wayland-server.c:483
#12 0x00007fd84ae15f42 in wl_event_loop_dispatch (loop=0x7fd830008f00, timeout=<optimized out>) at ../src/event-loop.c:1059
#13 0x00007fd84cde3c29 in KWin::Display::dispatchEvents (this=<optimized out>) at /usr/src/debug/kwin-6.4.4-1.fc42.x86_64/src/wayland/display.cpp:138
#14 0x00007fd849d657ba in QtPrivate::QSlotObjectBase::call (this=0x557db47e5d30, r=0x557db354d490, a=0x7fffed250280) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qobjectdefs_impl.h:461
#15 doActivate<false> (sender=0x557db475f9f0, signal_index=3, argv=argv@entry=0x7fffed250280) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qobject.cpp:4146
#16 0x00007fd849d5c089 in QMetaObject::activate (sender=sender@entry=0x557db31b1150, m=m@entry=0x7fd84a2a3f00, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fffed250280) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qobject.cpp:4206
#17 0x00007fd849d74593 in QMetaObject::activate<void, QSocketDescriptor, QSocketNotifier::Type, QSocketNotifier::QPrivateSignal> (sender=0x557db31b1150, mo=0x7fd84a2a3f00, local_signal_index=0, ret=0x0) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qobjectdefs.h:306
#18 QSocketNotifier::activated (this=this@entry=0x557db475f9f0, _t1=..., _t2=<optimized out>, _t3=...) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/redhat-linux-build/src/corelib/Core_autogen/include/moc_qsocketnotifier.cpp:161
#19 0x00007fd849d74d6b in QSocketNotifier::event (this=0x557db475f9f0, e=<optimized out>) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qsocketnotifier.cpp:327
#20 0x00007fd84b03d97f in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x557db475f9f0, e=0x7fffed2503d0) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/widgets/kernel/qapplication.cpp:3303
#21 0x00007fd849cf9f38 in QCoreApplication::notifyInternal2 (receiver=0x557db475f9f0, event=0x7fffed2503d0) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qcoreapplication.cpp:1106
#22 0x00007fd849cfa19d in QCoreApplication::sendEvent (receiver=<optimized out>, event=<optimized out>) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qcoreapplication.cpp:1546
#23 0x00007fd849ec8447 in QEventDispatcherUNIXPrivate::activateSocketNotifiers (this=this@entry=0x557db31b10b0) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qeventdispatcher_unix.cpp:254
#24 0x00007fd849ec8d79 in QEventDispatcherUNIX::processEvents (this=<optimized out>, flags=...) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qeventdispatcher_unix.cpp:470
#25 0x00007fd84aae0442 in QUnixEventDispatcherQPA::processEvents (this=<optimized out>, flags=...) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/gui/platform/unix/qunixeventdispatcher.cpp:27
#26 0x00007fd849d07b03 in QEventLoop::exec (this=this@entry=0x7fffed2505a0, flags=..., flags@entry=...) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/global/qflags.h:77
#27 0x00007fd849d03419 in QCoreApplication::exec () at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qcoreapplication.cpp:1449
#28 0x00007fd84a4ddbad in QGuiApplication::exec () at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/gui/kernel/qguiapplication.cpp:1986
#29 0x00007fd84b03d8e9 in QApplication::exec () at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/widgets/kernel/qapplication.cpp:2570
#30 0x0000557d947116db in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/kwin-6.4.4-1.fc42.x86_64/src/main_wayland.cpp:635
Comment 3 TraceyC 2025-08-25 17:28:38 UTC
Thank you for the bug report. Based on the backtrace this looks like a duplicate of bug 504959. This was fixed in Plasma version 6.4.5. The fix will reach your system when it updates to that version.

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