Bug 506502

Summary: alt+tabbing out of full screen game (Diablo 4) with LibreWolf running crashes KWin
Product: [Plasma] kwin Reporter: Dave Gregory <offspring>
Component: generic-crashAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: kde, nate
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 6.4.4
Sentry Crash Report:
Attachments: journalctl entry for crash

Description Dave Gregory 2025-07-02 20:43:35 UTC
SUMMARY
When playing Diablo 4, and alt+tabbing out of game while LibreWolf is running, KWin will crash. Running on CachyOS, with an RTX 2080 Ti. Diablo 4 is running via Steam

STEPS TO REPRODUCE
1. Start Steam
2. Login
3. Launch LibreWolf
4. Launch Diablo 4
5. Go into game
6. Alt+tab out of game

OBSERVED RESULT
KDE Plasma DE crashes before showing black TTY screen, then Plasma recovers.

EXPECTED RESULT
Expected Plasma to not crash.

SOFTWARE/OS VERSIONS
Operating System: CachyOS Linux 
KDE Plasma Version: 6.4.2
KDE Frameworks Version: 6.15.0
Qt Version: 6.9.1
Kernel Version: 6.15.4-4-cachyos (64-bit)
Graphics Platform: Wayland
Processors: 32 × AMD Ryzen 9 5950X 16-Core Processor
Memory: 64 GiB of RAM (62.7 GiB usable)
Graphics Processor: NVIDIA GeForce RTX 2080 Ti


ADDITIONAL INFORMATION
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `/usr/bin/kwin_wayland --wayland-fd 7 --socket wayland-0 --xwayland-fd 8 --xwayland-fd 9 --xwayland-display :0 --xwayland-xauthority /run/user/1000/xauth_ueilfa --xwayland'.
Program terminated with signal SIGABRT, Aborted.
#0  0x00007f3143aa8f2b in pthread_kill () from /usr/lib/libc.so.6
[Current thread is 1 (Thread 0x7f313db41a40 (LWP 1495))]
Function(s) ^std::(move|forward|as_const|(__)?addressof) will be skipped when stepping.
Function(s) ^std::(shared|unique)_ptr<.*>::(get|operator) will be skipped when stepping.
Function(s) ^std::(basic_string|vector|array|deque|(forward_)?list|(unordered_|flat_)?(multi)?(map|set)|span)<.*>::(c?r?(begin|end)|front|back|data|size|empty) will be skipped when stepping.
Function(s) ^std::(basic_string|vector|array|deque|span)<.*>::operator.] will be skipped when stepping.
(gdb) backtrace
#0  0x00007f3143aa8f2b in pthread_kill () from /usr/lib/libc.so.6
#1  0x00007f3143a44568 in raise () from /usr/lib/libc.so.6
#2  0x00007f3143a2560d in abort () from /usr/lib/libc.so.6
#3  0x00007f31442917f4 in ?? () from /usr/lib/libQt6Core.so.6
#4  0x00007f31442927ed in QMessageLogger::fatal(char const*, ...) const () from /usr/lib/libQt6Core.so.6
#5  0x00007f31465415ad in ?? () from /usr/lib/libQt6Quick.so.6
#6  0x00007f3146723d59 in ?? () from /usr/lib/libQt6Quick.so.6
#7  0x00007f31467275f5 in ?? () from /usr/lib/libQt6Quick.so.6
#8  0x00007f3144c23b54 in QWindow::event(QEvent*) () from /usr/lib/libQt6Gui.so.6
#9  0x00007f3145701769 in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /usr/lib/libQt6Widgets.so.6
#10 0x00007f314437b0d8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) ()
   from /usr/lib/libQt6Core.so.6
#11 0x00007f3144bb3f97 in QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::ExposeEvent*) () from /usr/lib/libQt6Gui.so.6
#12 0x00007f3144c39472 in ?? () from /usr/lib/libQt6Gui.so.6
#13 0x00007f3144c24eb9 in bool QWindowSystemInterface::handleExposeEvent<QWindowSystemInterface::DefaultDelivery>(QWindow*, QRegion const&) () from /usr/lib/libQt6Gui.so.6
#14 0x0000558bf2591d4f in ?? ()
#15 0x00007f3109ad2df1 in non-virtual thunk to PlasmaQuick::Dialog::componentComplete() ()
   from /usr/lib/libPlasmaQuick.so.6
#16 0x00007f314613d46e in QQmlObjectCreator::finalize(QQmlInstantiationInterrupt&) ()
   from /usr/lib/libQt6Qml.so.6
#17 0x00007f3146103def in QQmlIncubatorPrivate::incubate(QQmlInstantiationInterrupt&) ()
   from /usr/lib/libQt6Qml.so.6
#18 0x00007f314610486e in QQmlEnginePrivate::incubate(QQmlIncubator&, QQmlRefPointer<QQmlContextData> const&)
    () from /usr/lib/libQt6Qml.so.6
#19 0x00007f31434a4176 in ?? () from /usr/lib/libQt6QmlModels.so.6
#20 0x00007f314345f26b in QQmlInstantiatorPrivate::regenerate() () from /usr/lib/libQt6QmlModels.so.6
#21 0x00007f314607f996 in ?? () from /usr/lib/libQt6Qml.so.6
--Type <RET> for more, q to quit, c to continue without paging--c
#22 0x00007f314609f1cf in ?? () from /usr/lib/libQt6Qml.so.6
#23 0x00007f314609b035 in QQmlBinding::doUpdate(QQmlJavaScriptExpression::DeleteWatcher const&, QFlags<QQmlPropertyData::WriteFlag>, QV4::Scope&) () from /usr/lib/libQt6Qml.so.6
#24 0x00007f314609cfc9 in QQmlBinding::update(QFlags<QQmlPropertyData::WriteFlag>) ()
   from /usr/lib/libQt6Qml.so.6
#25 0x00007f314612f11d in QQmlNotifier::emitNotify(QQmlNotifierEndpoint*, void**) ()
   from /usr/lib/libQt6Qml.so.6
#26 0x00007f31443e9c8a in ?? () from /usr/lib/libQt6Core.so.6
#27 0x00007f31474a33cf in KWin::TabBox::TabBox::show() () from /usr/lib/libkwin.so.6
#28 0x00007f31443e9e94 in ?? () from /usr/lib/libQt6Core.so.6
#29 0x00007f31443fbbe4 in QTimer::timerEvent(QTimerEvent*) () from /usr/lib/libQt6Core.so.6
#30 0x00007f31443d8339 in QObject::event(QEvent*) () from /usr/lib/libQt6Core.so.6
#31 0x00007f3145701769 in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /usr/lib/libQt6Widgets.so.6
#32 0x00007f314437b0d8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) ()
   from /usr/lib/libQt6Core.so.6
#33 0x00007f31445498b0 in QTimerInfoList::activateTimers() () from /usr/lib/libQt6Core.so.6
#34 0x00007f3144555948 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/libQt6Core.so.6
#35 0x00007f31451a7d62 in QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/libQt6Gui.so.6
#36 0x00007f3144388d76 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/libQt6Core.so.6
#37 0x00007f314438000c in QCoreApplication::exec() () from /usr/lib/libQt6Core.so.6
#38 0x0000558bf2556e53 in ?? ()
#39 0x00007f3143a27bcb in ?? () from /usr/lib/libc.so.6
#40 0x00007f3143a27c8b in __libc_start_main () from /usr/lib/libc.so.6
#41 0x0000558bf255e115 in ?? ()
Comment 1 David Edmundson 2025-07-04 08:27:49 UTC
Next time it happens can you get the error it's printing via

journalctl --user -u plasma-kwin_wayland -r


It's throwing an error here #4  0x00007f31442927ed in QMessageLogger::fatal(char const*, ...) const () from /usr/lib/libQt6Core.so.6 to stderr, but we have no idea what, which makes this unactionable
Comment 2 Dave Gregory 2025-07-05 20:16:37 UTC
Created attachment 182986 [details]
journalctl entry for crash
Comment 3 Vlad Zahorodnii 2025-07-07 11:54:28 UTC
QtQuick fails to create an OpenGL context, which then crashes kwin...
Comment 4 Bug Janitor Service 2025-07-07 13:02:36 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/libplasma/-/merge_requests/1333
Comment 5 Bug Janitor Service 2025-07-07 13:03:02 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kdeplasma-addons/-/merge_requests/875
Comment 6 Bug Janitor Service 2025-07-07 13:03:17 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/7884
Comment 7 Marco Martin 2025-07-07 15:01:35 UTC
Git commit 51949fb931fa723ea8b4b247c16a28088cd5641a by Marco Martin, on behalf of Vlad Zahorodnii.
Committed on 07/07/2025 at 14:50.
Pushed by vladz into branch 'master'.

declarativeimports: Register QQuickWindow with revision 2

So it is possible to connect the sceneGraphError signal on a Plasma dialog.

M  +1    -0    src/declarativeimports/core/corebindingsplugin.cpp

https://invent.kde.org/plasma/libplasma/-/commit/51949fb931fa723ea8b4b247c16a28088cd5641a
Comment 8 Bug Janitor Service 2025-07-07 15:02:07 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/libplasma/-/merge_requests/1334
Comment 9 Vlad Zahorodnii 2025-07-07 15:09:49 UTC
Git commit 1b8b582538906ba00d0b1e6b1fb45212e1eb78f7 by Vlad Zahorodnii.
Committed on 07/07/2025 at 15:01.
Pushed by vladz into branch 'Plasma/6.4'.

declarativeimports: Register QQuickWindow with revision 2

So it is possible to connect the sceneGraphError signal on a Plasma dialog.


(cherry picked from commit 51949fb931fa723ea8b4b247c16a28088cd5641a)

Co-authored-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>

M  +1    -0    src/declarativeimports/core/corebindingsplugin.cpp

https://invent.kde.org/plasma/libplasma/-/commit/1b8b582538906ba00d0b1e6b1fb45212e1eb78f7
Comment 10 Vlad Zahorodnii 2025-07-07 15:26:39 UTC
Git commit 344f25aef2803ee6b7419d131f9fceaed1a59783 by Vlad Zahorodnii.
Committed on 07/07/2025 at 13:04.
Pushed by vladz into branch 'master'.

tabbox/windowswitchers: Work around QtQuick crashing kwin

If the task switcher is shown when a graphics reset occurs, it'll crash
kwin. In order to prevent QtQuick from calling qFatal(), we need to
connect the QQuickWindow::sceneGraphError signal.

M  +4    -0    kwin/windowswitchers/big_icons/contents/ui/main.qml
M  +4    -0    kwin/windowswitchers/compact/contents/ui/main.qml
M  +4    -0    kwin/windowswitchers/coverswitch/contents/ui/main.qml
M  +4    -0    kwin/windowswitchers/flipswitch/contents/ui/main.qml
M  +4    -0    kwin/windowswitchers/sidebar/contents/ui/main.qml

https://invent.kde.org/plasma/kdeplasma-addons/-/commit/344f25aef2803ee6b7419d131f9fceaed1a59783
Comment 11 Bug Janitor Service 2025-07-07 15:27:08 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kdeplasma-addons/-/merge_requests/876
Comment 12 Vlad Zahorodnii 2025-07-07 16:21:02 UTC
Git commit 2912096c4a1c073128ade81dd39dee71412938ec by Vlad Zahorodnii.
Committed on 07/07/2025 at 15:39.
Pushed by vladz into branch 'master'.

tabbox: Work around QtQuick crashing kwin

If the task switcher is shown when a graphics reset occurs, it'll crash
kwin. In order to prevent QtQuick from calling qFatal(), we need to
connect the QQuickWindow::sceneGraphError signal.

M  +4    -0    src/tabbox/switchers/thumbnail_grid/contents/ui/main.qml

https://invent.kde.org/plasma/kwin/-/commit/2912096c4a1c073128ade81dd39dee71412938ec
Comment 13 Vlad Zahorodnii 2025-07-15 11:11:59 UTC
Git commit 3c79c1d9dbdba27dfc6d63153c2035408102c674 by Vlad Zahorodnii.
Committed on 15/07/2025 at 10:56.
Pushed by vladz into branch 'Plasma/6.4'.

tabbox/windowswitchers: Work around QtQuick crashing kwin

If the task switcher is shown when a graphics reset occurs, it'll crash
kwin. In order to prevent QtQuick from calling qFatal(), we need to
connect the QQuickWindow::sceneGraphError signal.


(cherry picked from commit 344f25aef2803ee6b7419d131f9fceaed1a59783)

Co-authored-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>

M  +4    -0    kwin/windowswitchers/big_icons/contents/ui/main.qml
M  +4    -0    kwin/windowswitchers/compact/contents/ui/main.qml
M  +4    -0    kwin/windowswitchers/coverswitch/contents/ui/main.qml
M  +4    -0    kwin/windowswitchers/flipswitch/contents/ui/main.qml
M  +4    -0    kwin/windowswitchers/sidebar/contents/ui/main.qml

https://invent.kde.org/plasma/kdeplasma-addons/-/commit/3c79c1d9dbdba27dfc6d63153c2035408102c674
Comment 14 Vlad Zahorodnii 2025-07-15 11:16:10 UTC
Git commit 44e91a01735b31c7b6db54f3abae809ef648d915 by Vlad Zahorodnii.
Committed on 15/07/2025 at 10:55.
Pushed by vladz into branch 'Plasma/6.4'.

tabbox: Work around QtQuick crashing kwin

If the task switcher is shown when a graphics reset occurs, it'll crash
kwin. In order to prevent QtQuick from calling qFatal(), we need to
connect the QQuickWindow::sceneGraphError signal.


(cherry picked from commit 2912096c4a1c073128ade81dd39dee71412938ec)

Co-authored-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>

M  +4    -0    src/tabbox/switchers/thumbnail_grid/contents/ui/main.qml

https://invent.kde.org/plasma/kwin/-/commit/44e91a01735b31c7b6db54f3abae809ef648d915