Kwin crashes if I press Caps Lock during logout
When I log out from a Wayland session, if I press the Caps Lock key before kwin_wayland has finished completely, I make it crash. I don't know if Caps Lock is the only key causing this, but it's easier to notice kwin has crashed with this key because the light indicator in the keyboard stops toggling.
Backtrace:
#0 0x00007f33a94b45bc in KWin::ModifierOnlyShortcuts::keyEvent(KWin::KeyEvent*) (event=0x7ffc79ab12e0, this=0x562f69ffd6e0) at /usr/src/debug/kwin/workspace.h:800
#1 KWin::ModifierOnlyShortcuts::keyEvent(KWin::KeyEvent*) (this=0x562f69ffd6e0, event=0x7ffc79ab12e0) at /usr/src/debug/kwin/modifier_only_shortcuts.cpp:42
#2 0x00007f33a94902b0 in std::__invoke_impl<void, void (KWin::InputEventSpy::*&)(KWin::KeyEvent*), KWin::InputEventSpy* const&, KWin::KeyEvent*&>(std::__invoke_memfun_deref, void (KWin::InputEventSpy::*&)(KWin::KeyEvent*), KWin::InputEventSpy* const&, KWin::KeyEvent*&) (__t=@0x562f6a8faa30: 0x562f69ffd6f0, __f=<optimized out>) at /usr/include/c++/9.3.0/bits/invoke.h:89
#3 std::__invoke<void (KWin::InputEventSpy::*&)(KWin::KeyEvent*), KWin::InputEventSpy* const&, KWin::KeyEvent*&>(void (KWin::InputEventSpy::*&)(KWin::KeyEvent*), KWin::InputEventSpy* const&, KWin::KeyEvent*&) (__fn=<optimized out>) at /usr/include/c++/9.3.0/bits/invoke.h:95
#4 std::_Bind<void (KWin::InputEventSpy::*(std::_Placeholder<1>, KWin::KeyEvent*))(KWin::KeyEvent*)>::__call<void, KWin::InputEventSpy* const&, 0ul, 1ul>(std::tuple<KWin::InputEventSpy* const&>&&, std::_Index_tuple<0ul, 1ul>) (__args=..., this=<optimized out>) at /usr/include/c++/9.3.0/functional:400
#5 std::_Bind<void (KWin::InputEventSpy::*(std::_Placeholder<1>, KWin::KeyEvent*))(KWin::KeyEvent*)>::operator()<KWin::InputEventSpy* const&, void>(KWin::InputEventSpy* const&) (this=<optimized out>) at /usr/include/c++/9.3.0/functional:484
#6 std::for_each<KWin::InputEventSpy* const*, std::_Bind<void (KWin::InputEventSpy::*(std::_Placeholder<1>, KWin::KeyEvent*))(KWin::KeyEvent*)> >(KWin::InputEventSpy* const*, KWin::InputEventSpy* const*, std::_Bind<void (KWin::InputEventSpy::*(std::_Placeholder<1>, KWin::KeyEvent*))(KWin::KeyEvent*)>) (__f=..., __last=0x562f6a8faa48, __first=0x562f6a8faa30) at /usr/include/c++/9.3.0/bits/stl_algo.h:3876
#7 KWin::InputRedirection::processSpies<std::_Bind<void (KWin::InputEventSpy::*(std::_Placeholder<1>, KWin::KeyEvent*))(KWin::KeyEvent*)> >(std::_Bind<void (KWin::InputEventSpy::*(std::_Placeholder<1>, KWin::KeyEvent*))(KWin::KeyEvent*)>) (function=..., this=<optimized out>) at /usr/src/debug/kwin/input.h:223
#8 KWin::KeyboardInputRedirection::processKey(unsigned int, KWin::InputRedirection::KeyboardKeyState, unsigned int, KWin::LibInput::Device*) (this=0x562f69ee3460, key=58, state=<optimized out>, time=36037282, device=0x562f6b869030) at /usr/src/debug/kwin/keyboard_input.cpp:227
#9 0x00007f33a854ccde in () at /usr/lib/libQt5Core.so.5
#10 0x00007f33a93c775a in KWin::LibInput::Connection::keyChanged(unsigned int, KWin::InputRedirection::KeyboardKeyState, unsigned int, KWin::LibInput::Device*) (this=this@entry=0x562f69ede140, _t1=<optimized out>, _t2=<optimized out>, _t2@entry=KWin::InputRedirection::KeyboardKeyReleased, _t3=<optimized out>, _t3@entry=36037282, _t4=<optimized out>, _t4@entry=0x562f6b869030) at /usr/src/debug/build/kwin_autogen/PCJB6APXE6/moc_connection.cpp:618
#11 0x00007f33a949f6d5 in KWin::LibInput::Connection::processEvents() (this=0x562f69ede140) at /usr/src/debug/kwin/libinput/connection.cpp:378
#12 0x00007f33a8544ada in QObject::event(QEvent*) () at /usr/lib/libQt5Core.so.5
#13 0x00007f33a8906352 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#14 0x00007f33a890f829 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#15 0x00007f33a85174f2 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#16 0x00007f33a8519d56 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/libQt5Core.so.5
#17 0x00007f33a856cc75 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#18 0x00007f33a194b15e in QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/qt/plugins/platforms/KWinQpaPlugin.so
#19 0x0000562f6943364b in KWin::Xwl::Xwayland::~Xwayland() (this=0x562f6a7c92f0, __in_chrg=<optimized out>) at /usr/include/qt/QtCore/qflags.h:118
#20 0x0000562f69433749 in KWin::Xwl::Xwayland::~Xwayland() (this=0x562f6a7c92f0, __in_chrg=<optimized out>) at /usr/src/debug/kwin/xwl/xwayland.cpp:89
#21 0x0000562f6941c72a in KWin::ApplicationWayland::~ApplicationWayland() (this=0x7ffc79ab1ce0, __in_chrg=<optimized out>) at /usr/src/debug/kwin/main_wayland.cpp:143
#22 0x0000562f69417785 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /usr/include/c++/9.3.0/bits/atomic_base.h:326
#0 0x00007fa32f230abf in poll () at /usr/lib/libc.so.6
#1 0x00007fa32f4f763b in poll (__timeout=-1, __nfds=1, __fds=0x7ffc4e0396c8) at /usr/include/bits/poll2.h:46
#2 _xcb_conn_wait (c=c@entry=0x55e814a88ed0, cond=cond@entry=0x7ffc4e0397e0, vector=vector@entry=0x0, count=count@entry=0x0) at xcb_conn.c:480
#3 0x00007fa32f4f908f in wait_for_reply (c=c@entry=0x55e814a88ed0, request=10064, e=e@entry=0x0) at xcb_in.c:516
#4 0x00007fa32f4f91a2 in xcb_wait_for_reply (c=0x55e814a88ed0, request=10064, e=e@entry=0x0) at xcb_in.c:532
#5 0x00007fa32f4fee86 in xcb_query_tree_reply (c=<optimized out>, cookie=..., e=e@entry=0x0) at xproto.c:3159
#6 0x00007fa33073b6bd in KWin::Xcb::AbstractWrapper<KWin::Xcb::TreeData>::getReply() (this=0x55e815159950) at /usr/src/debug/kwin/libkwineffects/kwinglobals.h:160
#7 KWin::Xcb::AbstractWrapper<KWin::Xcb::TreeData>::getReply() (this=0x55e815159950) at /usr/src/debug/kwin/xcbutils.h:330
#8 KWin::Xcb::AbstractWrapper<KWin::Xcb::TreeData>::isNull() (this=0x55e815159950) at /usr/src/debug/kwin/xcbutils.h:265
#9 KWin::Workspace::updateXStackingOrder() (this=0x55e814108e10) at /usr/src/debug/kwin/layers.cpp:747
#10 0x00007fa33073bc39 in KWin::Workspace::xStackingOrder() const (this=0x55e814108e10) at /usr/src/debug/kwin/layers.cpp:734
#11 0x00007fa3306bd458 in KWin::Compositor::performCompositing() (this=0x55e81418ed10) at /usr/src/debug/kwin/workspace.h:76
#12 0x00007fa32f7e79f5 in QObject::event(QEvent*) () at /usr/lib/libQt5Core.so.5
#13 0x00007fa32fba9352 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#14 0x00007fa32fbb2829 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#15 0x00007fa32f7ba4f2 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#16 0x00007fa32f811c22 in QTimerInfoList::activateTimers() () at /usr/lib/libQt5Core.so.5
#17 0x00007fa32f810009 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#18 0x00007fa328be815e in QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/qt/plugins/platforms/KWinQpaPlugin.so
#19 0x00007fa32f7b905c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#20 0x00007fa32f7c1066 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5
#21 0x000055e8126a0538 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/kwin/main_wayland.cpp:704
Software versions:
linux 5.6.11
mesa 20.0.6
Plasma 5.18.5
KF5 5.70.0
Qt 5.14.2
kscreenlocker v5.17.90.r20.gf2c89ed
libkscreen r1525.fe0bad4
wrapland 0.518.0.beta.0.r21.ge623d28
libwayland 1.18.0
wayland-egl 18.1.0
xwayland 1.20.8
libxkbcommon 0.10.0
libinput 1.15.5
libdrm 2.4.101
libxcb 1.14
libx11 1.6.9