Bug 520396 - [Wayland] kwin_wayland segfaults in KWin::Item::sortedChildItems via ScreenCastStream::record (Task Manager previews)
Summary: [Wayland] kwin_wayland segfaults in KWin::Item::sortedChildItems via ScreenCa...
Status: RESOLVED DUPLICATE of bug 521970
Alias: None
Product: kwin
Classification: Plasma
Component: screencasting (other bugs)
Version First Reported In: 6.6.5
Platform: CachyOS Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-05-19 10:04 UTC by Luca Auer
Modified: 2026-06-22 19:31 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report: https://crash-reports.kde.org/organizations/kde/issues/415549


Attachments
Crash trace (`coredumpctl info 1969`) and journal (`journalctl --user -u plasma-kwin_wayland.service -b -1) (23.16 KB, text/plain)
2026-05-19 10:04 UTC, Luca Auer
Details
coredump gdp session with all symbols (27.25 KB, text/plain)
2026-05-19 20:34 UTC, Luca Auer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luca Auer 2026-05-19 10:04:11 UTC
Created attachment 192453 [details]
Crash trace (`coredumpctl info 1969`) and journal (`journalctl --user -u plasma-kwin_wayland.service -b -1)

SUMMARY
kwin_wayland crashes with a SIGSEGV when the screencasting plugin attempts to record a frame via OpenGL rendering. This is most commonly triggered organically by Wayland's internal screencasting utilization, specifically when hovering over Task Manager items to generate window previews. 

This is not a GPU-specific driver issue. I have reproduced the exact same crash and stack trace on two completely separate machines running CachyOS (Arch-based):
1. ThinkPad E14 Gen 7 (Intel Meteor Lake integrated graphics / Mesa)
2. Desktop PC (AMD Ryzen 9 5950X + Radeon RX 9070 XT / Mesa)

STEPS TO REPRODUCE
1. Run a Wayland session on Plasma 6.6.5.
2. Have "Show small window previews when hovering over tasks" enabled in Task Manager.
3. Hover over tasks. The crash happens seemingly randomly/intermittently.

OBSERVED RESULT
kwin_wayland segfaults, instantly tearing down the Wayland session. PipeWire logs a remote connection error simultaneously.

EXPECTED RESULT
kwin_wayland should not crash when querying child items for the screencast render node.

SOFTWARE/OS VERSIONS
Operating System: CachyOS (Arch Linux)
KDE Plasma Version: 6.6.5
Qt Version: 6.11.1-1.1
Graphics Platform: Wayland

ADDITIONAL INFORMATION
Stack trace from coredumpctl on the Intel machine:

#0  0x00007f466579710b _ZNK4KWin4Item16sortedChildItemsEv (libkwin.so.6 + 0x39710b)
#1  0x00007f46657a372b _ZN4KWin18ItemRendererOpenGL16createRenderNodeEPNS_4ItemEPNS0_13RenderContextERKSt8functionIFbS2_EES9_ (libkwin.so.6 + 0x3a372b)
#2  0x00007f46657a6a90 _ZN4KWin18ItemRendererOpenGL10renderItemERKNS_12RenderTargetERKNS_14RenderViewportEPNS_4ItemEiRKNS_6RegionERKNS_15WindowPaintDataERKSt8functionIFbS8_EESJ_ (libkwin.so.6 + 0x3a6a90)
#3  0x00007f46444fb743 n/a (screencast.so + 0x26743)
#4  0x00007f46444f9a3e _ZN4KWin16ScreenCastStream6recordE6QFlagsINS0_7ContentEE (screencast.so + 0x24a3e)
#5  0x00007f46444fa061 n/a (screencast.so + 0x25061)
#6  0x00007f466280fffb n/a (libQt6Core.so.6 + 0x20fffb)
#7  0x00007f46628260d4 _ZN6QTimer10timerEventEP11QTimerEvent (libQt6Core.so.6 + 0x2260d4)
...
Comment 1 Nate Graham 2026-05-19 19:26:08 UTC
Never seen this with an AMD GPU, FWIW.

Also, could you improve the backtrace a bit? Basically follow the instructions at https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports#Retrieving_a_backtrace_using_coredumpctl *exactly*. Thanks!
Comment 2 Luca Auer 2026-05-19 20:33:25 UTC
(In reply to Nate Graham from comment #1)
> Never seen this with an AMD GPU, FWIW.
> 
> Also, could you improve the backtrace a bit? Basically follow the
> instructions at
> https://community.kde.org/Guidelines_and_HOWTOs/Debugging/
> How_to_create_useful_crash_reports#Retrieving_a_backtrace_using_coredumpctl
> *exactly*. Thanks!

My apologies, it appears I didn't read that guide! It took a bit of time to load the symbols from the arch server, but here it is:

```
#0  0x00007f466579710b in KWin::Item::sortedChildItems() const () at /usr/lib/libkwin.so.6
#1  0x00007f46657a372b in KWin::ItemRendererOpenGL::createRenderNode(KWin::Item*, KWin::ItemRendererOpenGL::RenderContext*, std::function<bool (KWin::Item*)> const&, std::function<bool (KWin::Item*)> const&) () at /usr/lib/libkwin.so.6
#2  0x00007f46657a6a90 in KWin::ItemRendererOpenGL::renderItem(KWin::RenderTarget const&, KWin::RenderViewport const&, KWin::Item*, int, KWin::Region const&, KWin::WindowPaintData const&, std::function<bool (KWin::Item*)> const&, std::function<bool (KWin::Item*)> const&) () at /usr/lib/libkwin.so.6
#3  0x00007f46444fb743 in ??? () at /usr/lib/qt6/plugins/kwin/plugins/screencast.so
#4  0x00007f46444f9a3e in KWin::ScreenCastStream::record(QFlags<KWin::ScreenCastStream::Content>) () at /usr/lib/qt6/plugins/kwin/plugins/screencast.so
#5  0x00007f46444fa061 in ??? () at /usr/lib/qt6/plugins/kwin/plugins/screencast.so
#6  0x00007f466280fffb in ??? () at /usr/lib/libQt6Core.so.6
#7  0x00007f46628260d4 in QTimer::timerEvent(QTimerEvent*) () at /usr/lib/libQt6Core.so.6
#8  0x00007f4662805ba9 in QObject::event(QEvent*) () at /usr/lib/libQt6Core.so.6
#9  0x00007f4663b04c1b in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt6Widgets.so.6
#10 0x00007f4662798a48 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt6Core.so.6
#11 0x00007f46629a8f6a in QTimerInfoList::activateTimers() () at /usr/lib/libQt6Core.so.6
#12 0x00007f46629b56a5 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt6Core.so.6
#13 0x00007f4663800672 in QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt6Gui.so.6
#14 0x00007f46627a78b4 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt6Core.so.6
#15 0x00007f466279c8f4 in QCoreApplication::exec() () at /usr/lib/libQt6Core.so.6
#16 0x000055b7e2adb692 in ??? ()
#17 0x00007f4661e27c8e in __libc_start_call_main (main=main@entry=0x55b7e2ad93a0, argc=argc@entry=14, argv=argv@entry=0x7ffefe0f0f98) at ../sysdeps/nptl/libc_start_call_main.h:59
        self = <optimized out>
        result = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {0, -2894104533507202108, 14, 94248271696280, 139940336263168, 140733160820752, -2894104533476793404, -2979363595814394940}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x7ffefe0f1010, 0x7ffefe0f0f98}, data = {prev = 0x0, cleanup = 0x0, canceltype = -32567280}}}
        not_first_call = <optimized out>
#18 0x00007f4661e27dcb in __libc_start_main_impl (main=0x55b7e2ad93a0, argc=14, argv=0x7ffefe0f0f98, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffefe0f0f88) at ../csu/libc-start.c:360
#19 0x000055b7e2ae2205 in ??? ()
```

Is this more helpful? I also added the full session as another attachment.
Comment 3 Luca Auer 2026-05-19 20:34:05 UTC
Created attachment 192466 [details]
coredump gdp session with all symbols
Comment 4 Akseli Lahtinen 2026-05-20 10:56:07 UTC
Looks like dupe of 513710, since the backtrace has mentions of screencasting, though it is missing symbols for that

#3  0x00007f46444fb743 in ??? () at /usr/lib/qt6/plugins/kwin/plugins/screencast.so
#4  0x00007f46444f9a3e in KWin::ScreenCastStream::record(QFlags<KWin::ScreenCastStream::Content>) () at /usr/lib/qt6/plugins/kwin/plugins/screencast.so
#5  0x00007f46444fa061 in ??? () at /usr/lib/qt6/plugins/kwin/plugins/screencast.so
#6  0x00007f466280fffb in ??? () at /usr/lib/libQt6Core.so.6

*** This bug has been marked as a duplicate of bug 513710 ***
Comment 5 Nate Graham 2026-05-20 13:17:12 UTC
Not sure it's a duplicate of Bug 513710. That was marked as being fixed in 6.6.5, which is the version reported for this one. Also, the backtrace for that one doesn't have KWin::Item::sortedChildItems() in it.

So either they're different crashes, or Bug 513710 isn't actually fixed yet.
Comment 6 Luca Auer 2026-05-20 20:45:43 UTC
I just freshly had that happen on my PC (same OS etc. but with the RX 9070 XT). It happened exactly when I was hovering with my mouse over the Anki icon. I guess that would be the preview opening. It then happened again when I was trying to close Anki (just to be clear, Anki is a very normal user space app with no privileges).

Trace for the first crash:

```
ore was generated by `/usr/bin/kwin_wayland --wayland-fd 7 --socket wayland-0 --xwayland-fd 8 --xwayl'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f4a8ef9710b in KWin::Item::sortedChildItems() const () from /usr/lib/libkwin.so.6
[Current thread is 1 (Thread 0x7f4a84689c80 (LWP 3580))]
(gdb) set debuginfod enabled on
bt full
❌ Junk after item "on": bt full
(gdb) bt
#0  0x00007f4a8ef9710b in KWin::Item::sortedChildItems() const () from /usr/lib/libkwin.so.6
#1  0x00007f4a8efa372b in KWin::ItemRendererOpenGL::createRenderNode(KWin::Item*, KWin::ItemRendererOpenGL::RenderContext*, std::function<bool (KWin::Item*)> const&, std::function<bool (KWin::Item*)> const&) () from /usr/lib/libkwin.so.6
#2  0x00007f4a8efa6a90 in KWin::ItemRendererOpenGL::renderItem(KWin::RenderTarget const&, KWin::RenderViewport const&, KWin::Item*, int, KWin::Region const&, KWin::WindowPaintData const&, std::function<bool (KWin::Item*)> const&, std::function<bool (KWin::Item*)> const&) () from /usr/lib/libkwin.so.6
#3  0x00007f4a80093743 in ?? () from /usr/lib/qt6/plugins/kwin/plugins/screencast.so
#4  0x00007f4a80091a3e in KWin::ScreenCastStream::record(QFlags<KWin::ScreenCastStream::Content>) () from /usr/lib/qt6/plugins/kwin/plugins/screencast.so
#5  0x00007f4a80092061 in ?? () from /usr/lib/qt6/plugins/kwin/plugins/screencast.so
#6  0x00007f4a8c20fffb in ?? () from /usr/lib/libQt6Core.so.6
#7  0x00007f4a8c2260d4 in QTimer::timerEvent(QTimerEvent*) () from /usr/lib/libQt6Core.so.6
#8  0x00007f4a8c205ba9 in QObject::event(QEvent*) () from /usr/lib/libQt6Core.so.6
#9  0x00007f4a8d504c1b in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt6Widgets.so.6
#10 0x00007f4a8c198a48 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt6Core.so.6
#11 0x00007f4a8c3a8f6a in QTimerInfoList::activateTimers() () from /usr/lib/libQt6Core.so.6
#12 0x00007f4a8c3b56a5 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt6Core.so.6
#13 0x00007f4a8d200672 in QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt6Gui.so.6
#14 0x00007f4a8c1a78b4 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt6Core.so.6
#15 0x00007f4a8c19c8f4 in QCoreApplication::exec() () from /usr/lib/libQt6Core.so.6
#16 0x000055e7c5785692 in ?? ()
#17 0x00007f4a8b827c8e in __libc_start_call_main (main=main@entry=0x55e7c57833a0, argc=argc@entry=14, argv=argv@entry=0x7fff310d5958) at ../sysdeps/nptl/libc_start_call_main.h:59
#18 0x00007f4a8b827dcb in __libc_start_main_impl (main=0x55e7c57833a0, argc=14, argv=0x7fff310d5958, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff310d5948) at ../csu/libc-start.c:360
#19 0x000055e7c578c205 in ?? ()
```

Second crash:

```
Core was generated by `/usr/bin/kwin_wayland --wayland-fd 7 --socket wayland-0 --xwayland-fd 8 --xwayl'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f41c5d9710b in KWin::Item::sortedChildItems() const () from /usr/lib/libkwin.so.6
[Current thread is 1 (Thread 0x7f41bb372c80 (LWP 625495))]
(gdb) bt
#0  0x00007f41c5d9710b in KWin::Item::sortedChildItems() const () from /usr/lib/libkwin.so.6
#1  0x00007f41c5da372b in KWin::ItemRendererOpenGL::createRenderNode(KWin::Item*, KWin::ItemRendererOpenGL::RenderContext*, std::function<bool (KWin::Item*)> const&, std::function<bool (KWin::Item*)> const&) () from /usr/lib/libkwin.so.6
#2  0x00007f41c5da6a90 in KWin::ItemRendererOpenGL::renderItem(KWin::RenderTarget const&, KWin::RenderViewport const&, KWin::Item*, int, KWin::Region const&, KWin::WindowPaintData const&, std::function<bool (KWin::Item*)> const&, std::function<bool (KWin::Item*)> const&) () from /usr/lib/libkwin.so.6
#3  0x00007f41a40d7743 in ?? () from /usr/lib/qt6/plugins/kwin/plugins/screencast.so
#4  0x00007f41a40d5a3e in KWin::ScreenCastStream::record(QFlags<KWin::ScreenCastStream::Content>) () from /usr/lib/qt6/plugins/kwin/plugins/screencast.so
#5  0x00007f41a40d6061 in ?? () from /usr/lib/qt6/plugins/kwin/plugins/screencast.so
#6  0x00007f41c300fffb in ?? () from /usr/lib/libQt6Core.so.6
#7  0x00007f41c30260d4 in QTimer::timerEvent(QTimerEvent*) () from /usr/lib/libQt6Core.so.6
#8  0x00007f41c3005ba9 in QObject::event(QEvent*) () from /usr/lib/libQt6Core.so.6
#9  0x00007f41c4104c1b in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt6Widgets.so.6
#10 0x00007f41c2f98a48 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt6Core.so.6
#11 0x00007f41c31a8f6a in QTimerInfoList::activateTimers() () from /usr/lib/libQt6Core.so.6
#12 0x00007f41c31b56a5 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt6Core.so.6
#13 0x00007f41c3e00672 in QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt6Gui.so.6
#14 0x00007f41c2fa78b4 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt6Core.so.6
#15 0x00007f41c2f9c8f4 in QCoreApplication::exec() () from /usr/lib/libQt6Core.so.6
#16 0x0000557956b15692 in ?? ()
#17 0x00007f41c2627c8e in __libc_start_call_main (main=main@entry=0x557956b133a0, argc=argc@entry=14, argv=argv@entry=0x7fff2c52a048) at ../sysdeps/nptl/libc_start_call_main.h:59
#18 0x00007f41c2627dcb in __libc_start_main_impl (main=0x557956b133a0, argc=14, argv=0x7fff2c52a048, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff2c52a038) at ../csu/libc-start.c:360
#19 0x0000557956b1c205 in ?? ()
```

I don't think that is the same bug, especially since it is supposed to be fixed.
Comment 7 Luca Auer 2026-05-22 20:24:26 UTC
It happened a couple of times now on both of my devices and it happens almost exclusively when I move my mouse over a app icon in the taskbar. I am fairly certain that the preview is causing it.
Comment 8 Luca Auer 2026-06-09 13:15:53 UTC
It is still happening, but I was able to suppress it recently by turning off previews on the task manager. So when I hover, I only see the window title. This is not ideal, but it fixed the bug.
Comment 9 Ben 2026-06-16 10:38:54 UTC
I also experience this issue. I was trying to open an app pinned in the taskbar, and KWin crashed suddenly. It's occurred several times for the past few weeks.

Specs:
- KWin 6.6.5-4
- Nvidia 580.159.04 (proprietary)
- Kernel 7.0.12-arch1-1
- Plasma 6 Wayland

Backtrace from coredump:
#4  KWin::Item::sortedChildItems() (libkwin.so.6 + 0x34f09a)
#5  KWin::ItemRendererOpenGL::createRenderNode(...) (libkwin.so.6 + 0x35a950)
#6  KWin::ItemRendererOpenGL::renderItem(...) (libkwin.so.6 + 0x35d9c9)
#8  KWin::ScreenCastStream::record(...) (screencast.so + 0x1fa47)
Comment 10 TraceyC 2026-06-22 19:31:49 UTC
There's a newer report with the same backtrace, which is more complete. I'll merge this report in with that one.

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