Summary: | xdg-desktop-portal-kde crashes in ScreenCastSession::setStreams() | ||
---|---|---|---|
Product: | [Plasma] xdg-desktop-portal-kde | Reporter: | APTX <marek321> |
Component: | general | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | aleixpol, bugs.kde.org.crop588, kde, luigi.mantellini+kde, nate, postix, sitter |
Priority: | NOR | Keywords: | drkonqi |
Version First Reported In: | 6.3.1 | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/commit/011d08c340bab468eec6aa347ae138e40c6332cf | Version Fixed In: | 6.4.0 |
Sentry Crash Report: | https://crash-reports.kde.org/organizations/kde/issues/134233/events/6d519efd4a1642069eccd1ffe76e5cf3/ |
Description
APTX
2025-02-22 14:36:29 UTC
*** Bug 504099 has been marked as a duplicate of this bug. *** *** Bug 504099 has been marked as a duplicate of this bug. *** As in #504099, this only happens to me on teams.microsoft.com in Chromium 136 (but there might be more versions affected). Other sites, like jitbit.com/screensharing/ work perfectly fine with the same browser and same OS setup. Can confirm on Operating System: Fedora Linux 42 KDE Plasma Version: 6.3.5 KDE Frameworks Version: 6.14.0 Qt Version: 6.9.0 Kernel Version: 6.14.7-301.fc42.x86_64 (64-bit) Graphics Platform: Wayland Crash happened for me after I've added a Firefox 138 Wayland window for capturing in OBS Studio 31.0.3 Here's my stacktrace: ``` (gdb) bt #0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=11, no_tid=no_tid@entry=0) at pthread_kill.c:44 #1 0x00007fb39ac811e3 in __pthread_kill_internal (threadid=<optimized out>, signo=11) at pthread_kill.c:89 #2 0x00007fb39ac27afe in __GI_raise (sig=11) at ../sysdeps/posix/raise.c:26 #3 0x00007fb39de25ef1 in KCrash::defaultCrashHandler (sig=11) at /usr/src/debug/kf6-kcrash-6.14.0-1.fc42.x86_64/src/kcrash.cpp:605 #4 0x00007fb39ac27c30 in <signal handler called> () at /lib64/libc.so.6 #5 0x0000000000000000 in ??? () #6 0x00007fb39b353809 in QObjectPrivate::connectImpl (sender=sender@entry=0x55b10fabf0e0, signal_index=<optimized out>, receiver=receiver@entry=0x55b10f9f81c0, slot=slot@entry=0x7ffeb00fcad0, slotObjRaw=slotObjRaw@entry=0x55b10fbd4ab0, type=<optimized out>, types=<optimized out>, senderMetaObject=<optimized out>) at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/corelib/kernel/qobject.cpp:5332 #7 0x00007fb39b353b10 in QObject::connectImpl (sender=sender@entry=0x55b10fabf0e0, signal=signal@entry=0x7ffeb00fcaf0, receiver=receiver@entry=0x55b10f9f81c0, slot=slot@entry=0x7ffeb00fcad0, slotObjRaw=0x55b10fbd4ab0, type=Qt::AutoConnection, types=0x0, senderMetaObject=<optimized out>) at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/corelib/kernel/qobject.cpp:5244 #8 0x000055b0e10ad70e in QObject::connect<void (ScreencastingStream::*)(), void (ScreenCastSession::*)()> (type=Qt::AutoConnection, sender=0x55b10fabf0e0, signal=(void (ScreencastingStream::*)(class ScreencastingStream * const)) 0x55b0e10318f0 <ScreencastingStream::closed()>, context=0x55b10f9f81c0, slot=@0x7ffeb00fcad0: (void (ScreenCastSession::*)(class ScreenCastSession * const)) 0x55b0e10a96c0 <ScreenCastSession::streamClosed()>) at /usr/include/qt6/QtCore/qobject.h:272 #9 ScreenCastSession::setStreams (this=0x55b10f9f81c0, streams=<optimized out>) at /usr/src/debug/xdg-desktop-portal-kde-6.3.5-1.fc42.x86_64/src/session.cpp:309 #10 0x000055b0e10a5950 in ScreenCastPortal::Start (this=<optimized out>, handle=<optimized out>, session_handle=<optimized out>, app_id=..., parent_window=<optimized out>, options=<optimized out>, results=...) at /usr/src/debug/xdg-desktop-portal-kde-6.3.5-1.fc42.x86_64/src/screencast.cpp:335 #11 0x000055b0e1033565 in ScreenCastPortal::qt_static_metacall (_o=_o@entry=0x55b10f5eb610, _c=_c@entry=QMetaObject::InvokeMetaMethod, _id=_id@entry=2, _a=_a@entry=0x7ffeb00fd0d8) at /usr/src/debug/xdg-desktop-portal-kde-6.3.5-1.fc42.x86_64/redhat-linux-build/src/xdg-desktop-portal-kde_autogen/EWIEGA46WW/moc_screencast.cpp:147 #12 0x000055b0e10374e7 in ScreenCastPortal::qt_metacall (this=0x55b10f5eb610, _c=<optimized out>, _id=2, _a=0x7ffeb00fd0d8) at /usr/src/debug/xdg-desktop-portal-kde-6.3.5-1.fc42.x86_64/redhat-linux-build/src/xdg-desktop-portal-kde_autogen/EWIEGA46WW/moc_screencast.cpp:212 #13 0x00007fb39b95b9f6 in QDBusConnectionPrivate::deliverCall (this=this@entry=0x7fb380001690, object=object@entry=0x55b10f5eb610, msg=..., metaTypes=<optimized out>, slotIdx=6) at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/dbus/qdbusintegrator.cpp:1007 #14 0x00007fb39b95f8cd in QDBusConnectionPrivate::activateCall (this=this@entry=0x7fb380001690, object=0x55b10f5eb610, flags=..., flags@entry=..., msg=...) at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/dbus/qdbusintegrator.cpp:916 #15 0x00007fb39b960600 in QDBusConnectionPrivate::activateObject (this=0x7fb380001690, node=..., msg=..., pathStartPos=<optimized out>) at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/dbus/qdbusintegrator.cpp:1484 #16 0x00007fb39b9637ca in QDBusActivateObjectEvent::placeMetaCall (this=0x7fb380033100) at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/dbus/qdbusintegrator.cpp:1604 #17 0x00007fb39b350fec in QObject::event (this=<optimized out>, e=<optimized out>) at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/corelib/kernel/qobject.cpp:1431 #18 0x00007fb39c43d7af in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x55b10f5f1fa0, e=0x7fb380033100) at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/widgets/kernel/qapplication.cpp:3301 #19 0x00007fb39b2f5fa8 in QCoreApplication::notifyInternal2 (receiver=0x55b10f5f1fa0, event=0x7fb380033100) at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/corelib/kernel/qcoreapplication.cpp:1106 #20 0x00007fb39b2f620d in QCoreApplication::sendEvent (receiver=<optimized out>, event=<optimized out>) at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/corelib/kernel/qcoreapplication.cpp:1546 #21 0x00007fb39b2f9cd6 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x55b10f1fc7c0) at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/corelib/kernel/qcoreapplication.cpp:1879 #22 0x00007fb39b5ffd2f in postEventSourceDispatch (s=0x55b10f201bc0) at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/corelib/kernel/qeventdispatcher_glib.cpp:246 #23 0x00007fb3993ef880 in g_main_dispatch (context=0x7fb380000f00) at ../glib/gmain.c:3398 #24 g_main_context_dispatch_unlocked (context=0x7fb380000f00) at ../glib/gmain.c:4249 #25 0x00007fb3993f87a8 in g_main_context_iterate_unlocked (context=context@entry=0x7fb380000f00, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) --Type <RET> for more, q to quit, c to continue without paging--c at ../glib/gmain.c:4314 #26 0x00007fb3993f8953 in g_main_context_iteration (context=0x7fb380000f00, may_block=1) at ../glib/gmain.c:4379 #27 0x00007fb39b5ff56d in QEventDispatcherGlib::processEvents (this=0x55b10f202d70, flags=...) at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/corelib/kernel/qeventdispatcher_glib.cpp:399 #28 0x00007fb39b303783 in QEventLoop::exec (this=this@entry=0x7ffeb00fd9d0, flags=..., flags@entry=...) at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/corelib/global/qflags.h:77 #29 0x000055b0e10cacd2 in WaylandIntegration::WaylandIntegrationPrivate::startStreaming (this=0x55b0e1147a40 <_ZZN13QGlobalStaticIN14QtGlobalStatic6HolderIN12_GLOBAL__N_130Q_QGS_globalWaylandIntegrationEEEE8instanceEvE6holder.lto_priv.0>, stream=<optimized out>, streamOptions=...) at /usr/src/debug/xdg-desktop-portal-kde-6.3.5-1.fc42.x86_64/src/waylandintegration.cpp:358 #30 0x000055b0e10c1b01 in WaylandIntegration::WaylandIntegrationPrivate::startStreamingOutput (this=0x55b0e1147a40 <_ZZN13QGlobalStaticIN14QtGlobalStatic6HolderIN12_GLOBAL__N_130Q_QGS_globalWaylandIntegrationEEEE8instanceEvE6holder.lto_priv.0>, screen=<optimized out>, mode=Screencasting::Metadata) at /usr/src/debug/xdg-desktop-portal-kde-6.3.5-1.fc42.x86_64/src/waylandintegration.cpp:287 #31 0x000055b0e10a476e in WaylandIntegration::startStreamingOutput (screen=0x55b10f219440, mode=Screencasting::Metadata) at /usr/src/debug/xdg-desktop-portal-kde-6.3.5-1.fc42.x86_64/src/waylandintegration.cpp:126 #32 ScreenCastPortal::Start (this=<optimized out>, handle=<optimized out>, session_handle=<optimized out>, app_id=..., parent_window=<optimized out>, options=<optimized out>, results=...) at /usr/src/debug/xdg-desktop-portal-kde-6.3.5-1.fc42.x86_64/src/screencast.cpp:303 #33 0x000055b0e1033565 in ScreenCastPortal::qt_static_metacall (_o=_o@entry=0x55b10f5eb610, _c=_c@entry=QMetaObject::InvokeMetaMethod, _id=_id@entry=2, _a=_a@entry=0x7ffeb00fe0d8) at /usr/src/debug/xdg-desktop-portal-kde-6.3.5-1.fc42.x86_64/redhat-linux-build/src/xdg-desktop-portal-kde_autogen/EWIEGA46WW/moc_screencast.cpp:147 #34 0x000055b0e10374e7 in ScreenCastPortal::qt_metacall (this=0x55b10f5eb610, _c=<optimized out>, _id=2, _a=0x7ffeb00fe0d8) at /usr/src/debug/xdg-desktop-portal-kde-6.3.5-1.fc42.x86_64/redhat-linux-build/src/xdg-desktop-portal-kde_autogen/EWIEGA46WW/moc_screencast.cpp:212 #35 0x00007fb39b95b9f6 in QDBusConnectionPrivate::deliverCall (this=this@entry=0x7fb380001690, object=object@entry=0x55b10f5eb610, msg=..., metaTypes=..., slotIdx=6) at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/dbus/qdbusintegrator.cpp:1007 #36 0x00007fb39b95fe51 in QDBusConnectionPrivate::activateCall (this=this@entry=0x7fb380001690, object=0x55b10f5eb610, flags=..., flags@entry=..., msg=...) at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/dbus/qdbusintegrator.cpp:909 #37 0x00007fb39b960600 in QDBusConnectionPrivate::activateObject (this=0x7fb380001690, node=..., msg=..., pathStartPos=<optimized out>) at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/dbus/qdbusintegrator.cpp:1484 #38 0x00007fb39b9637ca in QDBusActivateObjectEvent::placeMetaCall (this=0x7fb380032a80) at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/dbus/qdbusintegrator.cpp:1604 #39 0x00007fb39b350fec in QObject::event (this=<optimized out>, e=<optimized out>) at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/corelib/kernel/qobject.cpp:1431 #40 0x00007fb39c43d7af in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x55b10f5f1fa0, e=0x7fb380032a80) at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/widgets/kernel/qapplication.cpp:3301 #41 0x00007fb39b2f5fa8 in QCoreApplication::notifyInternal2 (receiver=0x55b10f5f1fa0, event=0x7fb380032a80) at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/corelib/kernel/qcoreapplication.cpp:1106 #42 0x00007fb39b2f620d in QCoreApplication::sendEvent (receiver=<optimized out>, event=<optimized out>) at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/corelib/kernel/qcoreapplication.cpp:1546 #43 0x00007fb39b2f9cd6 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x55b10f1fc7c0) at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/corelib/kernel/qcoreapplication.cpp:1879 #44 0x00007fb39b5ffd2f in postEventSourceDispatch (s=0x55b10f201bc0) at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/corelib/kernel/qeventdispatcher_glib.cpp:246 #45 0x00007fb3993ef880 in g_main_dispatch (context=0x7fb380000f00) at ../glib/gmain.c:3398 #46 g_main_context_dispatch_unlocked (context=0x7fb380000f00) at ../glib/gmain.c:4249 #47 0x00007fb3993f87a8 in g_main_context_iterate_unlocked (context=context@entry=0x7fb380000f00, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4314 #48 0x00007fb3993f8953 in g_main_context_iteration (context=0x7fb380000f00, may_block=1) at ../glib/gmain.c:4379 #49 0x00007fb39b5ff56d in QEventDispatcherGlib::processEvents (this=0x55b10f202d70, flags=...) at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/corelib/kernel/qeventdispatcher_glib.cpp:399 #50 0x00007fb39b303783 in QEventLoop::exec (this=this@entry=0x7ffeb00fe990, flags=..., flags@entry=...) at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/corelib/global/qflags.h:77 #51 0x00007fb39b2ff229 in QCoreApplication::exec () at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/corelib/kernel/qcoreapplication.cpp:1449 #52 0x00007fb39badac3d in QGuiApplication::exec () at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/gui/kernel/qguiapplication.cpp:1993 #53 0x00007fb39c43d719 in QApplication::exec () at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/widgets/kernel/qapplication.cpp:2568 #54 0x000055b0e102fc0d in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/xdg-desktop-portal-kde-6.3.5-1.fc42.x86_64/src/xdg-desktop-portal-kde.cpp:63 ``` ``` bt full #6 0x00007fb39b353809 in QObjectPrivate::connectImpl (sender=sender@entry=0x55b10fabf0e0, signal_index=<optimized out>, receiver=receiver@entry=0x55b10f9f81c0, slot=slot@entry=0x7ffeb00fcad0, slotObjRaw=slotObjRaw@entry=0x55b10fbd4ab0, type=<optimized out>, types=<optimized out>, senderMetaObject=<optimized out>) at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/corelib/kernel/qobject.cpp:5332 slotObj = std::unique_ptr<QtPrivate::QSlotObjectBase> = {get() = 0x0} s = 0x55b10fabf0e0 r = 0x55b10f9f81c0 locker = {mtx1 = 0x7fb39b8ac260 <_q_ObjectMutexPool+128>, mtx2 = 0x7fb39b8ac430 <_q_ObjectMutexPool+592>, locked = false} isSingleShot = <optimized out> c = std::unique_ptr<QObjectPrivate::Connection> = {get() = 0x0} td = <optimized out> ret = {d_ptr = 0x55b1101709f0} method = {mobj = 0x55b0e113c100 <ScreencastingStream::staticMetaObject>, data = {d = 0x55b0e110a028 <_ZN19ScreencastingStream32qt_staticMetaObjectStaticContentIN12_GLOBAL__N_138qt_meta_tag_ZN19ScreencastingStreamE_tEEE.lto_priv.0+104>}} #7 0x00007fb39b353b10 in QObject::connectImpl (sender=sender@entry=0x55b10fabf0e0, signal=signal@entry=0x7ffeb00fcaf0, receiver=receiver@entry=0x55b10f9f81c0, slot=slot@entry=0x7ffeb00fcad0, slotObjRaw=0x55b10fbd4ab0, type=Qt::AutoConnection, types=0x0, senderMetaObject=<optimized out>) at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/corelib/kernel/qobject.cpp:5244 slotObj = std::unique_ptr<QtPrivate::QSlotObjectBase> = {get() = 0x0} signal_index = 5 args = {0x7ffeb00fc9ec, 0x7ffeb00fcaf0} #8 0x000055b0e10ad70e in QObject::connect<void (ScreencastingStream::*)(), void (ScreenCastSession::*)()> (type=Qt::AutoConnection, sender=0x55b10fabf0e0, signal=(void (ScreencastingStream::*)(class ScreencastingStream * const)) 0x55b0e10318f0 <ScreencastingStream::closed()>, context=0x55b10f9f81c0, slot=@0x7ffeb00fcad0: (void (ScreenCastSession::*)(class ScreenCastSession * const)) 0x55b0e10a96c0 <ScreenCastSession::streamClosed()>) at /usr/include/qt6/QtCore/qobject.h:272 types = 0x0 pSlot = 0x7ffeb00fcad0 #9 ScreenCastSession::setStreams (this=0x55b10f9f81c0, streams=<optimized out>) at /usr/src/debug/xdg-desktop-portal-kde-6.3.5-1.fc42.x86_64/src/session.cpp:309 s = @0x55b110163280: {stream = 0x55b10fabf0e0, nodeId = 111, map = {d = {d = {ptr = 0x55b10f8b27a0}}}} #10 0x000055b0e10a5950 in ScreenCastPortal::Start (this=<optimized out>, handle=<optimized out>, session_handle=<optimized out>, app_id=..., parent_window=<optimized out>, options=<optimized out>, results=...) at /usr/src/debug/xdg-desktop-portal-kde-6.3.5-1.fc42.x86_64/src/screencast.cpp:335 outputs = {<QListSpecialMethods<QVariant>> = {<QListSpecialMethodsBase<QVariant>> = {<No data fields>}, <No data fields>}, d = {d = 0x55b10f5fad50, ptr = 0x55b10f5fad60, size = 1}} windows = {<QListSpecialMethods<WindowRestoreInfo>> = {<QListSpecialMethodsBase<WindowRestoreInfo>> = {<No data fields>}, <No data fields>}, d = {d = 0x0, ptr = 0x0, size = 0}} streams = {<QListSpecialMethods<WaylandIntegration::Stream>> = {<QListSpecialMethodsBase<WaylandIntegration::Stream>> = {<No data fields>}, <No data fields>}, d = {d = 0x55b110163270, ptr = 0x55b110163280, size = 1}} cursorMode = Screencasting::Metadata session = {wp = {d = 0x55b10f682590, value = 0x55b10f9f81c0}} persist = ScreenCastPortal::PersistUntilRevoked valid = <optimized out> selectedOutputs = {<QListSpecialMethods<Output>> = {<QListSpecialMethodsBase<Output>> = {<No data fields>}, <No data fields>}, d = {d = 0x55b10f9f2cc0, ptr = 0x55b10f9f2cd0, size = 1}} selectedWindows = {<QListSpecialMethods<KWayland::Client::PlasmaWindow*>> = {<QListSpecialMethodsBase<KWayland::Client::PlasmaWindow*>> = {<No data fields>}, <No data fields>}, d = {d = 0x0, ptr = <optimized out>, size = <optimized out>}} selectedRegion = {x1 = 0, y1 = 0, x2 = -1, y2 = -1} allowRestore = <optimized out> ``` ^ some additional note: The window preview in OBS was frozen, when/after the crashed happened, thus I had to remove and add it again. A possibly relevant merge request was started @ https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/merge_requests/396 Git commit 13a19d1db5562d45477c6fa2cb53c3f40d7c60ed by David Redondo. Committed on 03/06/2025 at 09:34. Pushed by davidre into branch 'master'. screencast: Guard against session closing while creating stream Starting a stream runs an event loop during which the session can be closed. For now use a QPointer to guard against that until we make it not use an event loop anymore. FIXED-IN:6.4 M +5 -0 src/screencast.cpp https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/commit/13a19d1db5562d45477c6fa2cb53c3f40d7c60ed Git commit 011d08c340bab468eec6aa347ae138e40c6332cf by David Redondo. Committed on 03/06/2025 at 10:10. Pushed by davidre into branch 'Plasma/6.4'. screencast: Guard against session closing while creating stream Starting a stream runs an event loop during which the session can be closed. For now use a QPointer to guard against that until we make it not use an event loop anymore. FIXED-IN:6.4 (cherry picked from commit 13a19d1db5562d45477c6fa2cb53c3f40d7c60ed) Co-authored-by: David Redondo <kde@david-redondo.de> M +5 -0 src/screencast.cpp https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/commit/011d08c340bab468eec6aa347ae138e40c6332cf |