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

            Bug ID: 483579
           Summary: Semi-random crash after switching focus to fullscreen
                    first-person game running under Xwayland.
    Classification: Plasma
           Product: kwin
           Version: 6.0.2
          Platform: Arch Linux
                OS: Linux
            Status: REPORTED
          Severity: crash
          Priority: NOR
         Component: wayland-generic
          Assignee: kwin-bugs-n...@kde.org
          Reporter: arttucas...@protonmail.com
  Target Milestone: ---

SUMMARY
After alt-tabbing to any(?) game running in Fullscreen and under Xwayland that
locks the mouse for camera control (and sometimes also moving the mouse quickly
after) sometimes crashes Kwin.

The crash seems to happen more consistently after alt-tabbing away during a
loading screen and then alt-tabbing back in after the game has loaded.

This has occured in Sons of the Forest, Lethal Company (both running via
Proton) and Portal 2 (native).

STEPS TO REPRODUCE
1. Launch any first-person game with Xwayland
2. Switch focus to another application during a loading screen without pausing
the game.
3. Switch focus back and quickly move the mouse in any direction.
4. kwin_wayland may crash after.

OBSERVED RESULT
kwin_wayland crashes and is automatically restarted.

EXPECTED RESULT
kwin_wayland doesn't crash.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.6.21-1-lts (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i9-9900K CPU @ 3.60GHz
Memory: 31.3 GiB of RAM
Graphics Processor: AMD Radeon RX 6700 XT

BACKTRACE
Lines #33 to #68315 have been cut as they are the same pattern as #30-#32

#1  0x0000707c47b68ad0 in operator() (__closure=0x61c1f899c5f0) at
/usr/src/debug/kwin/kwin-6.0.2/src/compositor_wayland.cpp:356
#2  QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void,
KWin::WaylandCompositor::addOutput(KWin::Output*)::<lambda()> >::call
(arg=<optimized out>, f=...) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:137
#3 
QtPrivate::Functor<KWin::WaylandCompositor::addOutput(KWin::Output*)::<lambda()>,
0>::call<QtPrivate::List<>, void> (arg=<optimized out>, f=...) at
/usr/include/qt6/QtCore/qobjectdefs_impl.h:339
#4 
QtPrivate::QCallableObject<KWin::WaylandCompositor::addOutput(KWin::Output*)::<lambda()>,
QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *,
void **, bool *) (which=<optimized out>, this_=0x61c1f899c5e0, r=<optimized
out>, a=<optimized out>, ret=<optimized out>) at
/usr/include/qt6/QtCore/qobjectdefs_impl.h:522
#5  0x0000707c45390ca9 in QtPrivate::QSlotObjectBase::call (a=0x7ffd9a16e4f0,
r=0x61c1f88b0160, this=0x61c1f899c5e0, this=<optimized out>, r=<optimized out>,
a=<optimized out>) at
/usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qobjectdefs_impl.h:433
#6  doActivate<false> (sender=0x61c1f8382640, signal_index=5,
argv=0x7ffd9a16e4f0) at
/usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qobject.cpp:4039
#7  0x0000707c47b8e60c in KWin::Cursors::positionChanged (this=<optimized out>,
_t1=<optimized out>, _t2=<optimized out>) at
/usr/src/debug/kwin/build/src/kwin_autogen/include/moc_cursor.cpp:534
#8  0x0000707c45390ca9 in QtPrivate::QSlotObjectBase::call (a=0x7ffd9a16e600,
r=0x61c1f8382640, this=0x61c1f837adc0, this=<optimized out>, r=<optimized out>,
a=<optimized out>) at
/usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qobjectdefs_impl.h:433
#9  doActivate<false> (sender=0x61c1f837b380, signal_index=3,
argv=0x7ffd9a16e600) at
/usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qobject.cpp:4039
#10 0x0000707c47b8e3d7 in KWin::Cursor::posChanged (this=<optimized out>,
_t1=<optimized out>) at
/usr/src/debug/kwin/build/src/kwin_autogen/include/moc_cursor.cpp:304
#11 0x0000707c47c9b833 in KWin::InputRedirectionCursor::slotPosChanged
(this=this@entry=0x61c1f837b380, pos=...) at
/usr/src/debug/kwin/kwin-6.0.2/src/pointer_input.cpp:1136
#12 0x0000707c47c9bcd2 in KWin::InputRedirectionCursor::doSetPos
(this=0x61c1f837b380) at
/usr/src/debug/kwin/kwin-6.0.2/src/pointer_input.cpp:1129
#13 0x0000707c47ccd622 in KWin::Edge::pushCursorBack (this=<optimized out>,
cursorPos=<optimized out>) at
/usr/src/debug/kwin/kwin-6.0.2/src/screenedge.cpp:537
#14 KWin::Edge::pushCursorBack (this=this@entry=0x61c1f9aca960, cursorPos=...)
at /usr/src/debug/kwin/kwin-6.0.2/src/screenedge.cpp:517
#15 0x0000707c47cd300f in KWin::Edge::check (this=this@entry=0x61c1f9aca960,
cursorPos=..., triggerTime=..., forceNoPushBack=forceNoPushBack@entry=false) at
/usr/src/debug/kwin/kwin-6.0.2/src/screenedge.cpp:325
#16 0x0000707c47cd3318 in KWin::ScreenEdges::isEntered (event=0x7ffd9a16e880,
this=0x61c1f83c4690) at /usr/src/debug/kwin/kwin-6.0.2/src/screenedge.cpp:1449
#17 KWin::ScreenEdges::isEntered (this=0x61c1f83c4690, event=0x7ffd9a16e880) at
/usr/src/debug/kwin/kwin-6.0.2/src/screenedge.cpp:1423
#18 0x0000707c47c0c2d4 in KWin::ScreenEdgeInputFilter::pointerEvent
(this=<optimized out>, event=0x7ffd9a16e880, nativeButton=<optimized out>) at
/usr/src/debug/kwin/kwin-6.0.2/src/input.cpp:1646
#19 0x0000707c47c96338 in std::__invoke_impl<bool, bool
(KWin::InputEventFilter::*&)(KWin::MouseEvent*, unsigned int),
KWin::InputEventFilter* const&, KWin::MouseEvent*&, int&> (__f=<optimized out>,
__t=@0x61c1f855ac08: 0x61c1f84cafa0) at
/usr/include/c++/13.2.1/bits/invoke.h:71
#20 std::__invoke<bool (KWin::InputEventFilter::*&)(KWin::MouseEvent*, unsigned
int), KWin::InputEventFilter* const&, KWin::MouseEvent*&, int&>
(__fn=<optimized out>) at /usr/include/c++/13.2.1/bits/invoke.h:96
#21 std::_Bind<bool (KWin::InputEventFilter::*(std::_Placeholder<1>,
KWin::MouseEvent*, int))(KWin::MouseEvent*, unsigned int)>::__call<bool,
KWin::InputEventFilter* const&, 0ul, 1ul,
2ul>(std::tuple<KWin::InputEventFilter* const&>&&, std::_Index_tuple<0ul, 1ul,
2ul>) (__args=<optimized out>, this=<optimized out>) at
/usr/include/c++/13.2.1/functional:506
#22 std::_Bind<bool (KWin::InputEventFilter::*(std::_Placeholder<1>,
KWin::MouseEvent*, int))(KWin::MouseEvent*, unsigned
int)>::operator()<KWin::InputEventFilter* const&, bool>(KWin::InputEventFilter*
const&) (this=<optimized out>) at /usr/include/c++/13.2.1/functional:591
#23 __gnu_cxx::__ops::_Iter_pred<std::_Bind<bool
(KWin::InputEventFilter::*(std::_Placeholder<1>, KWin::MouseEvent*,
int))(KWin::MouseEvent*, unsigned int)>
>::operator()<QList<KWin::InputEventFilter*>::const_iterator>(QList<KWin::InputEventFilter*>::const_iterator)
(__it=..., this=<optimized out>) at
/usr/include/c++/13.2.1/bits/predefined_ops.h:318
#24 std::__find_if<QList<KWin::InputEventFilter*>::const_iterator,
__gnu_cxx::__ops::_Iter_pred<std::_Bind<bool
(KWin::InputEventFilter::*(std::_Placeholder<1>, KWin::MouseEvent*,
int))(KWin::MouseEvent*, unsigned int)> >
>(QList<KWin::InputEventFilter*>::const_iterator,
QList<KWin::InputEventFilter*>::const_iterator,
__gnu_cxx::__ops::_Iter_pred<std::_Bind<bool
(KWin::InputEventFilter::*(std::_Placeholder<1>, KWin::MouseEvent*,
int))(KWin::MouseEvent*, unsigned int)> >, std::random_access_iterator_tag)
(__pred=..., __last=..., __first=...) at
/usr/include/c++/13.2.1/bits/stl_algobase.h:2080
#25 std::__find_if<QList<KWin::InputEventFilter*>::const_iterator,
__gnu_cxx::__ops::_Iter_pred<std::_Bind<bool
(KWin::InputEventFilter::*(std::_Placeholder<1>, KWin::MouseEvent*,
int))(KWin::MouseEvent*, unsigned int)> >
>(QList<KWin::InputEventFilter*>::const_iterator,
QList<KWin::InputEventFilter*>::const_iterator,
__gnu_cxx::__ops::_Iter_pred<std::_Bind<bool
(KWin::InputEventFilter::*(std::_Placeholder<1>, KWin::MouseEvent*,
int))(KWin::MouseEvent*, unsigned int)> >) (__pred=..., __last=...,
__first=...) at /usr/include/c++/13.2.1/bits/stl_algobase.h:2117
#26 std::find_if<QList<KWin::InputEventFilter*>::const_iterator,
std::_Bind<bool (KWin::InputEventFilter::*(std::_Placeholder<1>,
KWin::MouseEvent*, int))(KWin::MouseEvent*, unsigned int)>
>(QList<KWin::InputEventFilter*>::const_iterator,
QList<KWin::InputEventFilter*>::const_iterator, std::_Bind<bool
(KWin::InputEventFilter::*(std::_Placeholder<1>, KWin::MouseEvent*,
int))(KWin::MouseEvent*, unsigned int)>) (__pred=..., __last=..., __first=...)
at /usr/include/c++/13.2.1/bits/stl_algo.h:3923
#27 std::none_of<QList<KWin::InputEventFilter*>::const_iterator,
std::_Bind<bool (KWin::InputEventFilter::*(std::_Placeholder<1>,
KWin::MouseEvent*, int))(KWin::MouseEvent*, unsigned int)>
>(QList<KWin::InputEventFilter*>::const_iterator,
QList<KWin::InputEventFilter*>::const_iterator, std::_Bind<bool
(KWin::InputEventFilter::*(std::_Placeholder<1>, KWin::MouseEvent*,
int))(KWin::MouseEvent*, unsigned int)>) (__pred=..., __last=..., __first=...)
at /usr/include/c++/13.2.1/bits/stl_algo.h:477
#28 std::any_of<QList<KWin::InputEventFilter*>::const_iterator, std::_Bind<bool
(KWin::InputEventFilter::*(std::_Placeholder<1>, KWin::MouseEvent*,
int))(KWin::MouseEvent*, unsigned int)>
>(QList<KWin::InputEventFilter*>::const_iterator,
QList<KWin::InputEventFilter*>::const_iterator, std::_Bind<bool
(KWin::InputEventFilter::*(std::_Placeholder<1>, KWin::MouseEvent*,
int))(KWin::MouseEvent*, unsigned int)>) (__pred=..., __last=..., __first=...)
at /usr/include/c++/13.2.1/bits/stl_algo.h:496
#29 KWin::InputRedirection::processFilters<std::_Bind<bool
(KWin::InputEventFilter::*(std::_Placeholder<1>, KWin::MouseEvent*,
int))(KWin::MouseEvent*, unsigned int)> >(std::_Bind<bool
(KWin::InputEventFilter::*(std::_Placeholder<1>, KWin::MouseEvent*,
int))(KWin::MouseEvent*, unsigned int)>) (function=..., this=<optimized out>)
at /usr/src/debug/kwin/kwin-6.0.2/src/input.h:194
#30 KWin::PointerInputRedirection::processMotionInternal
(this=this@entry=0x61c1f8207fa0, pos=..., delta=..., deltaNonAccelerated=...,
time=std::chrono::duration = { <optimized out>us }, device=device@entry=0x0) at
/usr/src/debug/kwin/kwin-6.0.2/src/pointer_input.cpp:248
#31 0x0000707c47c965dd in KWin::PositionUpdateBlocker::~PositionUpdateBlocker
(this=<synthetic pointer>, this=<optimized out>) at
/usr/src/debug/kwin/kwin-6.0.2/src/pointer_input.cpp:186
#32 KWin::PositionUpdateBlocker::~PositionUpdateBlocker (this=<synthetic
pointer>, this=<optimized out>) at
/usr/src/debug/kwin/kwin-6.0.2/src/pointer_input.cpp:180
#68316 KWin::PointerInputRedirection::processMotionInternal
(this=this@entry=0x61c1f8207fa0, pos=..., delta=..., deltaNonAccelerated=...,
time=std::chrono::duration = { <optimized out>us }, device=device@entry=0x0) at
/usr/src/debug/kwin/kwin-6.0.2/src/pointer_input.cpp:249
#68317 0x0000707c47c965dd in
KWin::PositionUpdateBlocker::~PositionUpdateBlocker (this=<synthetic pointer>,
this=<optimized out>) at
/usr/src/debug/kwin/kwin-6.0.2/src/pointer_input.cpp:186
#68318 KWin::PositionUpdateBlocker::~PositionUpdateBlocker (this=<synthetic
pointer>, this=<optimized out>) at
/usr/src/debug/kwin/kwin-6.0.2/src/pointer_input.cpp:180
#68319 KWin::PointerInputRedirection::processMotionInternal
(this=0x61c1f8207fa0, pos=..., delta=<optimized out>,
deltaNonAccelerated=<optimized out>, time=std::chrono::duration = { <optimized
out>us }, device=<optimized out>) at
/usr/src/debug/kwin/kwin-6.0.2/src/pointer_input.cpp:249
#68320 0x0000707c47c97401 in KWin::PointerInputRedirection::processMotion
(this=<optimized out>, delta=<optimized out>, deltaNonAccelerated=<optimized
out>, time=std::chrono::duration = { <optimized out>us }, device=<optimized
out>) at /usr/src/debug/kwin/kwin-6.0.2/src/pointer_input.cpp:225
#68321 0x0000707c45390ca9 in QtPrivate::QSlotObjectBase::call
(a=0x7ffd9a96bc40, r=0x61c1f8207fa0, this=0x61c1f8725b40, this=<optimized out>,
r=<optimized out>, a=<optimized out>) at
/usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qobjectdefs_impl.h:433
#68322 doActivate<false> (sender=0x61c1f8725660, signal_index=6,
argv=0x7ffd9a96bc40) at
/usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qobject.cpp:4039
#68323 0x0000707c47b75786 in KWin::InputDevice::pointerMotion (this=<optimized
out>, _t1=<optimized out>, _t2=<optimized out>, _t3=std::chrono::duration = {
3140477316us }, _t4=<optimized out>) at
/usr/src/debug/kwin/build/src/kwin_autogen/include/moc_inputdevice.cpp:1049
#68324 0x0000707c47e03396 in KWin::LibInput::Connection::processEvents
(this=0x61c1f8359420) at
/usr/src/debug/kwin/kwin-6.0.2/src/backends/libinput/connection.cpp:373
#68325 0x0000707c4537c2c7 in QObject::event (this=0x61c1f805c2e0,
e=0x707c14019a80) at
/usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qobject.cpp:1437
#68326 0x0000707c464f438b in QApplicationPrivate::notify_helper
(this=<optimized out>, receiver=0x61c1f805c2e0, e=0x707c14019a80) at
/usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/widgets/kernel/qapplication.cpp:3296
#68327 0x0000707c45339818 in QCoreApplication::notifyInternal2
(receiver=0x61c1f805c2e0, event=event@entry=0x707c14019a80) at
/usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qcoreapplication.cpp:1121
#68328 0x0000707c45339b9b in QCoreApplication::sendEvent (event=0x707c14019a80,
receiver=<optimized out>) at
/usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qcoreapplication.cpp:1539
#68329 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0,
data=0x61c1f7f29430) at
/usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qcoreapplication.cpp:1901
#68330 0x0000707c4549f18f in QEventDispatcherUNIX::processEvents
(this=0x61c1f7f853a0, flags=flags@entry=...) at
/usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qeventdispatcher_unix.cpp:431
#68331 0x0000707c45db26e2 in QUnixEventDispatcherQPA::processEvents
(this=<optimized out>, flags=...) at
/usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/gui/platform/unix/qunixeventdispatcher.cpp:27
#68332 0x0000707c45343d6e in QEventLoop::processEvents (flags=...,
this=0x7ffd9a96c150) at
/usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qeventloop.cpp:100
#68333 QEventLoop::exec (this=0x7ffd9a96c150, flags=...) at
/usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qeventloop.cpp:182
#68334 0x0000707c4533c2b8 in QCoreApplication::exec () at
/usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/global/qflags.h:74
#68335 0x0000707c464f0f0a in QApplication::exec () at
/usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/widgets/kernel/qapplication.cpp:2574
#68336 0x000061c1f6db0dee in main (argc=<optimized out>, argv=<optimized out>)
at /usr/src/debug/kwin/kwin-6.0.2/src/main_wayland.cpp:609

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

Reply via email to