Bug 513710

Summary: kwin_wayland consistently crashes on bootup in KWin::OutputScreenCastSource::render()
Product: [Plasma] kwin Reporter: Holmes <social.calamari468>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: REPORTED ---    
Severity: crash CC: info, nate
Priority: NOR    
Version First Reported In: 6.5.4   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=475296
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: kwin_wayland.kcrash saved by crash handler

Description Holmes 2025-12-22 16:07:39 UTC
Created attachment 187874 [details]
kwin_wayland.kcrash saved by crash handler

SUMMARY
After every boot up, kwin_wayland crashes. It happens consistently on every boot or reboot. This bug happens since KDE Plasma 6.5.4 was introduced.

STEPS TO REPRODUCE
1. Boot
2. kwin crashes

OBSERVED RESULT
Kwin crashes.

EXPECTED RESULT
Kwin should not crash.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.5.4
KDE Frameworks Version: 6.21.0
Qt Version: 6.10.1
Kernel Version: 6.18.1-zen1-2-zen (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 9700X 8-Core Processor
Memory: 64 GiB of RAM (60.5 GiB usable)
Graphics Processor 1: AMD Radeon RX 9070 XT
Graphics Processor 2: AMD Ryzen 7 9700X 8-Core Processor
Manufacturer: ASUS
Comment 1 Nate Graham 2025-12-22 18:01:24 UTC
Thread 1 (Thread 0x7f5c3d72bb80 (LWP 5134)):
[KCrash Handler]
#5  0x00007f5c449d500b in std::__atomic_base<QObjectPrivate::ConnectionData*>::load (this=0x6320b1bbe17320d0, __m=std::memory_order_relaxed) at /usr/include/c++/15.2.1/bits/atomic_base.h:830
#6  std::atomic<QObjectPrivate::ConnectionData*>::load (this=0x6320b1bbe17320d0, __m=std::memory_order_relaxed) at /usr/include/c++/15.2.1/atomic:587
#7  QAtomicOps<QObjectPrivate::ConnectionData*>::loadRelaxed<QObjectPrivate::ConnectionData*> (_q_value=<error reading variable: Cannot access memory at address 0x6320b1bbe17320d0>) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qatomic_cxx11.h:203
#8  QBasicAtomicPointer<QObjectPrivate::ConnectionData>::loadRelaxed (this=0x6320b1bbe17320d0) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qbasicatomic.h:171
#9  QObjectPrivate::removeConnection (c=0x7f5c380194d0) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:5646
#10 0x00007f5c449c5704 in QObject::disconnect (connection=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:5449
#11 0x00007f5c44a2add4 in QTextStreamPrivate::disconnectFromDevice (this=0x56232162f680) at /usr/src/debug/qt6-base/qtbase/src/corelib/serialization/qtextstream.cpp:338
#12 QTextStreamPrivate::~QTextStreamPrivate (this=<optimized out>, this=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/serialization/qtextstream.cpp:272
#13 std::default_delete<QTextStreamPrivate>::operator() (this=<optimized out>, __ptr=0x56232162f680) at /usr/include/c++/15.2.1/bits/unique_ptr.h:92
#14 std::unique_ptr<QTextStreamPrivate, std::default_delete<QTextStreamPrivate> >::~unique_ptr (this=<optimized out>, this=<optimized out>) at /usr/include/c++/15.2.1/bits/unique_ptr.h:398
#15 QTextStream::~QTextStream (this=<optimized out>, this=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/serialization/qtextstream.cpp:1065
#16 0x00007f5c44a2af15 in QTextStream::~QTextStream (this=<optimized out>, this=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/serialization/qtextstream.cpp:1065
#17 0x00007f5c2413b705 in KWin::OutputScreenCastSource::render (this=this@entry=0x562320a118c0, target=0x562322bd2fd0, bufferRepair=...) at /usr/src/debug/kwin/kwin-6.5.4/src/plugins/screencast/outputscreencastsource.cpp:95
#18 0x00007f5c2414da70 in KWin::ScreenCastStream::record (this=0x562320c7f630, contents=...) at /usr/include/c++/15.2.1/bits/unique_ptr.h:192
#19 0x00007f5c2414dc64 in operator() (__closure=0x562323494f90) at /usr/src/debug/kwin/kwin-6.5.4/src/plugins/screencast/screencaststream.cpp:353
#20 operator() (__closure=<optimized out>) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:116
#21 QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::integer_sequence<long unsigned int>, QtPrivate::List<>, void, KWin::ScreenCastStream::ScreenCastStream(KWin::ScreenCastSource*, std::shared_ptr<KWin::PipeWireCore>, QObject*)::<lambda()> >::call(KWin::ScreenCastStream::ScreenCastStream(KWin::ScreenCastSource*, std::shared_ptr<KWin::PipeWireCore>, QObject*)::<lambda()>&, void**)::<lambda()> > (args=<optimized out>, fn=...) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:65
#22 QtPrivate::FunctorCall<std::integer_sequence<long unsigned int>, QtPrivate::List<>, void, KWin::ScreenCastStream::ScreenCastStream(KWin::ScreenCastSource*, std::shared_ptr<KWin::PipeWireCore>, QObject*)::<lambda()> >::call (f=..., arg=<optimized out>) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:115
#23 QtPrivate::FunctorCallable<KWin::ScreenCastStream::ScreenCastStream(KWin::ScreenCastSource*, std::shared_ptr<KWin::PipeWireCore>, QObject*)::<lambda()> >::call<QtPrivate::List<>, void> (f=..., arg=<optimized out>) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:337
#24 QtPrivate::QCallableObject<KWin::ScreenCastStream::ScreenCastStream(KWin::ScreenCastSource*, std::shared_ptr<KWin::PipeWireCore>, QObject*)::<lambda()>, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=<optimized out>, this_=0x562323494f80, r=<optimized out>, a=<optimized out>, ret=<optimized out>) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:547
#25 0x00007f5c449d734f in QtPrivate::QSlotObjectBase::call (this=<optimized out>, r=<optimized out>, a=<optimized out>, this=<optimized out>, r=<optimized out>, a=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobjectdefs_impl.h:461
#26 doActivate<false> (sender=<optimized out>, signal_index=<optimized out>, argv=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:4257
#27 0x00007f5c449dee5c in QMetaObject::activate<void, QTimer::QPrivateSignal> (sender=<optimized out>, mo=<optimized out>, local_signal_index=0, ret=0x0) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobjectdefs.h:319
#28 QTimer::timeout (this=<optimized out>, _t1=...) at /usr/src/debug/qt6-base/build/src/corelib/Core_autogen/include/moc_qtimer.cpp:182
#29 QTimer::timerEvent (e=<optimized out>, this=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qtimer.cpp:331
#30 QTimer::timerEvent (this=<optimized out>, e=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qtimer.cpp:325
#31 0x00007f5c449c4936 in QObject::event (this=<optimized out>, e=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:1388
#32 0x00007f5c45b021c0 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x562320c7f7f0, e=0x7ffd7bfc98a0) at /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qapplication.cpp:3305
#33 0x00007f5c4496a958 in QCoreApplication::notifyInternal2 (receiver=0x562320c7f7f0, event=0x7ffd7bfc98a0) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1109
#34 0x00007f5c44b2c9af in QCoreApplication::sendEvent (receiver=<optimized out>, event=0x7ffd7bfc98a0) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1549
#35 QTimerInfoList::activateTimers (this=this@entry=0x5623205771d8) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qtimerinfo_unix.cpp:426
#36 0x00007f5c44b2e549 in QEventDispatcherUNIXPrivate::activateTimers (this=0x562320577100) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventdispatcher_unix.cpp:221
#37 QEventDispatcherUNIX::processEvents (this=<optimized out>, flags=..., flags@entry=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventdispatcher_unix.cpp:503
#38 0x00007f5c45734b73 in QUnixEventDispatcherQPA::processEvents (this=<optimized out>, flags=...) at /usr/src/debug/qt6-base/qtbase/src/gui/platform/unix/qunixeventdispatcher.cpp:28
#39 0x00007f5c44975786 in QEventLoop::processEvents (this=0x7ffd7bfc9a80, flags=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventloop.cpp:104
#40 QEventLoop::exec (this=0x7ffd7bfc9a80, flags=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventloop.cpp:186
#41 0x00007f5c4496f3f1 in QCoreApplication::exec () at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1452
#42 0x00007f5c45afd32a in QApplication::exec () at /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qapplication.cpp:2575
#43 0x0000562308dedaa4 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/kwin/kwin-6.5.4/src/main_wayland.cpp:635