https://bugs.kde.org/show_bug.cgi?id=511403

            Bug ID: 511403
           Summary: Crash disconnecting monitors:
                    Workspace::setActiveOutput "unknown active output"
    Classification: Plasma
           Product: kwin
      Version First unspecified
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: wayland-generic
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

SUMMARY
When disconnecting a dock station that had two monitors connected, kwin crashed
with
        qFatal("unknown active output");

in Workspace::setActiveOutput().

STEPS TO REPRODUCE
1. Connect two monitors to a dock station and the dockstation to the computer
2. Ensure all three screens are active
3. (Unsure if necessary) Lock the screen
4. Disconnect the dock station

I don't know what exactly caused the issue. It's probably related to the order
in which the outputs are disconnected by the OS/HW and how the events are
delivered. I have disconnected the dock station before with the two monitors
without observing this issue.

OBSERVED RESULT
kwin crashed

EXPECTED RESULT
kwin does not crash

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:
KDE Plasma Version: 6.5.0
KDE Frameworks Version: 6.19.0
Qt Version: 6.10.0
openSUSE Tumbleweed builds

ADDITIONAL INFORMATION
Backtrace:
#5  0x00007f933f2427b6 in raise () at /lib64/libc.so.6
#6  0x00007f933f22934b in abort () at /lib64/libc.so.6
#7  0x00007f933faf65e7 in qAbort () at
/usr/src/debug/qtbase-everywhere-src-6.10.0/src/corelib/global/qassert.cpp:46
#8  qt_maybe_message_fatal<QString&> (msgType=QtFatalMsg, context=<optimized
out>, message=...)
    at
/usr/src/debug/qtbase-everywhere-src-6.10.0/src/corelib/global/qlogging.cpp:2165
#9  qt_message(QtMsgType, const QMessageLogContext &, const char *, typedef
__va_list_tag __va_list_tag *)
    (msgType=msgType@entry=QtFatalMsg, context=...,
msg=msg@entry=0x7f9342ef613b "unknown active output",
ap=ap@entry=0x7ffe6c251248)
    at
/usr/src/debug/qtbase-everywhere-src-6.10.0/src/corelib/global/qlogging.cpp:412
#10 0x00007f933faf720d in QMessageLogger::fatal
(this=this@entry=0x7ffe6c251480, msg=msg@entry=0x7f9342ef613b "unknown active
output")
    at
/usr/src/debug/qtbase-everywhere-src-6.10.0/src/corelib/global/qlogging.cpp:901
#11 0x00007f9342a04f8c in KWin::Workspace::setActiveOutput (this=<optimized
out>, output=<optimized out>) at
/usr/src/debug/kwin-6.5.0/src/workspace.cpp:2441
#12 KWin::Workspace::setActiveOutput (this=<optimized out>, output=<optimized
out>) at /usr/src/debug/kwin-6.5.0/src/workspace.cpp:2438
#13 0x00007f9342a92eb4 in KWin::Workspace::takeActivity (this=0x5622fb63ad70,
window=<optimized out>, flags=...) at
/usr/src/debug/kwin-6.5.0/src/activation.cpp:423
#14 0x00007f9342a98c2a in KWin::Workspace::activateNextWindow
(this=0x5622fb63ad70, window=0x5622fffcb680) at
/usr/src/debug/kwin-6.5.0/src/activation.cpp:516
#15 0x00007f9342d13082 in KWin::Workspace::removeWaylandWindow
(this=0x5622fb63ad70, window=0x5622fffcb680) at
/usr/src/debug/kwin-6.5.0/src/workspace.cpp:813
#16 0x00007f933fc4c6d3 in QtPrivate::QSlotObjectBase::call
(this=0x5622fb699750, r=0x5622fb63ad70, a=0x7ffe6c251720)
    at
/usr/src/debug/qtbase-everywhere-src-6.10.0/src/corelib/kernel/qobjectdefs_impl.h:461
#17 doActivate<false> (sender=0x5622fa4c46b0, signal_index=4,
argv=0x7ffe6c251720) at
/usr/src/debug/qtbase-everywhere-src-6.10.0/src/corelib/kernel/qobject.cpp:4255
#18 0x00007f9342cde6f7 in QMetaObject::activate<void, KWin::Window*>
    (sender=<optimized out>, mo=<optimized out>, local_signal_index=1, ret=0x0,
sender=<optimized out>, mo=<optimized out>, local_signal_index=<optimized out>,
ret=<optimized out>) at /usr/include/qt6/QtCore/qobjectdefs.h:319
#19 KWin::WaylandServer::windowRemoved (this=<optimized out>, _t1=<optimized
out>) at
/usr/src/debug/kwin-6.5.0/build/src/kwin_autogen/include/moc_wayland_server.cpp:155
#20 0x00007f9342ba9758 in KWin::LayerShellV1Window::destroyWindow
(this=0x5622fffcb680) at
/usr/src/debug/kwin-6.5.0/src/layershellv1window.cpp:213
#21 0x00007f933fc4c6d3 in QtPrivate::QSlotObjectBase::call
(this=0x5622fc104930, r=0x5622fffcb680, a=0x7ffe6c2518d0)
    at
/usr/src/debug/qtbase-everywhere-src-6.10.0/src/corelib/kernel/qobjectdefs_impl.h:461
#22 doActivate<false> (sender=0x5622fb63ad70, signal_index=19,
argv=0x7ffe6c2518d0) at
/usr/src/debug/qtbase-everywhere-src-6.10.0/src/corelib/kernel/qobject.cpp:4255
#23 0x00007f9342d20f67 in QMetaObject::activate<void, KWin::Output*>
    (sender=<optimized out>, mo=<optimized out>, local_signal_index=16,
ret=0x0, sender=<optimized out>, mo=<optimized out>,
local_signal_index=<optimized out>, ret=<optimized out>) at
/usr/include/qt6/QtCore/qobjectdefs.h:319
#24 KWin::Workspace::outputRemoved (this=<optimized out>, _t1=<optimized out>)
at
/usr/src/debug/kwin-6.5.0/build/src/kwin_autogen/include/moc_workspace.cpp:659
#25 0x00007f9342d194f5 in KWin::Workspace::updateOutputs (this=0x5622fb63ad70,
outputOrder=<optimized out>) at
/usr/src/debug/kwin-6.5.0/src/workspace.cpp:1228
#26 0x00007f9342d1187b in KWin::Workspace::applyOutputConfiguration
(this=this@entry=0x5622fb63ad70, config=..., outputOrder=std::optional = {...})
    at /usr/src/debug/kwin-6.5.0/src/workspace.cpp:442
#27 0x00007f9342d11ba2 in KWin::Workspace::updateOutputConfiguration
(this=this@entry=0x5622fb63ad70) at
/usr/src/debug/kwin-6.5.0/src/workspace.cpp:511
#28 0x00007f9342d12ba9 in KWin::Workspace::slotOutputBackendOutputsQueried
(this=0x5622fb63ad70) at /usr/src/debug/kwin-6.5.0/src/workspace.cpp:1148
#29 0x00007f933fc4c6d3 in QtPrivate::QSlotObjectBase::call
(this=0x5622fb7785d0, r=0x5622fb63ad70, a=0x7ffe6c2523e8)
    at
/usr/src/debug/qtbase-everywhere-src-6.10.0/src/corelib/kernel/qobjectdefs_impl.h:461
#30 doActivate<false> (sender=0x5622fa4ccd20, signal_index=3,
argv=0x7ffe6c2523e8) at
/usr/src/debug/qtbase-everywhere-src-6.10.0/src/corelib/kernel/qobject.cpp:4255
#31 0x00007f9342d83285 in KWin::DrmBackend::updateOutputs
(this=this@entry=0x5622fa4ccd20) at
/usr/src/debug/kwin-6.5.0/src/backends/drm/drm_backend.cpp:303
#32 0x00007f9342d84d24 in KWin::DrmBackend::handleUdevEvent
(this=0x5622fa4ccd20) at
/usr/src/debug/kwin-6.5.0/src/backends/drm/drm_backend.cpp:203
#33 0x00007f933fc4c6d3 in QtPrivate::QSlotObjectBase::call
(this=0x5622fa4d7430, r=0x5622fa4ccd20, a=0x7ffe6c252840)
    at
/usr/src/debug/qtbase-everywhere-src-6.10.0/src/corelib/kernel/qobjectdefs_impl.h:461
#34 doActivate<false> (sender=0x5622fa591890, signal_index=3,
argv=0x7ffe6c252840) at
/usr/src/debug/qtbase-everywhere-src-6.10.0/src/corelib/kernel/qobject.cpp:4255
#35 0x00007f933fc54e2d in QMetaObject::activate<void, QSocketDescriptor,
QSocketNotifier::Type, QSocketNotifier::QPrivateSignal>
    (sender=<optimized out>, mo=<optimized out>, local_signal_index=<optimized
out>, ret=<optimized out>)
    at
/usr/src/debug/qtbase-everywhere-src-6.10.0/src/corelib/kernel/qobjectdefs.h:319
#36 QSocketNotifier::activated (this=this@entry=0x5622fa591890, _t1=...,
_t2=<optimized out>, _t3=...)
    at
/usr/src/debug/qtbase-everywhere-src-6.10.0/build-x86-64-v4/src/corelib/Core_autogen/include/moc_qsocketnotifier.cpp:161
#37 0x00007f933fc55e3a in QSocketNotifier::event (this=0x5622fa591890,
e=<optimized out>)
    at
/usr/src/debug/qtbase-everywhere-src-6.10.0/src/corelib/kernel/qsocketnotifier.cpp:324
#38 0x00007f9340fe7918 in QApplicationPrivate::notify_helper(QObject*, QEvent*)
() at /lib64/libQt6Widgets.so.6
#39 0x00007f933fbdae78 in QCoreApplication::notifyInternal2
(receiver=0x5622fa591890, event=0x7ffe6c252990)
    at
/usr/src/debug/qtbase-everywhere-src-6.10.0/src/corelib/kernel/qcoreapplication.cpp:1109
#40 0x00007f933fdabe7b in QEventDispatcherUNIXPrivate::activateSocketNotifiers
(this=this@entry=0x5622fa3fd180)
    at
/usr/src/debug/qtbase-everywhere-src-6.10.0/src/corelib/kernel/qeventdispatcher_unix.cpp:276
--Type <RET> for more, q to quit, c to continue without paging--c
#41 0x00007f933fdac869 in QEventDispatcherUNIX::processEvents (this=<optimized
out>, flags=...)
    at
/usr/src/debug/qtbase-everywhere-src-6.10.0/src/corelib/kernel/qeventdispatcher_unix.cpp:498
#42 0x00007f9340a232e1 in
QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
() at /lib64/glibc-hwcaps/x86-64-v4/libQt6Gui.so.6.10.0
#43 0x00007f933fbe9fcb in QEventLoop::exec (this=0x7ffe6c252b60, flags=...) at
/usr/src/debug/qtbase-everywhere-src-6.10.0/src/corelib/global/qflags.h:77
#44 0x00007f933fbe00f4 in QCoreApplication::exec () at
/usr/src/debug/qtbase-everywhere-src-6.10.0/src/corelib/kernel/qcoreapplication.cpp:1452
#45 0x00005622c4fdf8c6 in main (argc=<optimized out>, argv=<optimized out>) at
/usr/src/debug/kwin-6.5.0/src/main_wayland.cpp:635

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to