Skip to content

PipeWireBaseEncodedStream::refresh stop running produceThread unconditionnaly

Méven Car requested to merge work/meven/fix-crash into master

If there is a productively running m_produceThread, it must stopped before starting a new one.

BUG: 476935

Fix crash in https://crash-reports.kde.org/organizations/kde/issues/3315/?alert_rule_id=34&alert_timestamp=1700997390360&alert_type=email&notification_uuid=e6b8e2cd-d112-4efc-b898-16aabb7dd6d5&project=40&referrer=alert_email

OS Version: KDE neon 22.04 ()
Report Version: 104

Exception Type: Unknown (Aborted)
Crashed Thread: 7477

Application Specific Information:
Aborted

Thread 7477 Crashed:
0   libc.so.6                       0x7f95148969fc      [inlined] __pthread_kill_implementation (pthread_kill.c:44)
1   libc.so.6                       0x7f95148969fc      [inlined] __pthread_kill_internal (pthread_kill.c:78)
2   libc.so.6                       0x7f95148969fc      pthread_kill (pthread_kill.c:89)
3   libc.so.6                       0x7f95148969fb      [inlined] __pthread_kill_implementation (pthread_kill.c:43)
4   libc.so.6                       0x7f95148969fb      [inlined] __pthread_kill_internal (pthread_kill.c:78)
5   libc.so.6                       0x7f95148969fb      [inlined] pthread_kill (pthread_kill.c:89)
6   libc.so.6                       0x7f95148969fb      [inlined] __pthread_kill_implementation (pthread_kill.c:43)
7   libc.so.6                       0x7f95148969fb      [inlined] __pthread_kill_internal (pthread_kill.c:78)
8   libc.so.6                       0x7f95148969fb      pthread_kill (pthread_kill.c:89)
9   libc.so.6                       0x7f9514842475      raise (raise.c:26)
10  libc.so.6                       0x7f95148287f2      abort (abort.c:79)
11  libQt6Core.so.6.6.0             0x7f95154d6fb6      qAbort (qglobal.cpp:161)
12  libQt6Core.so.6.6.0             0x7f95154d2464      [inlined] qt_message_fatal<T> (qlogging.cpp:2030)
13  libQt6Core.so.6.6.0             0x7f95154d2464      qt_message (qlogging.cpp:378)
14  libQt6Core.so.6.6.0             0x7f95154d79e2      QMessageLogger::fatal (qlogging.cpp:901)
15  libQt6Core.so.6.6.0             0x7f95153a3df8      QThread::~QThread (qthread.cpp:466)
16  libQt6Core.so.6.6.0             0x7f951539da9c      QThread::~QThread (qthread.cpp:470)
17  libKPipeWireRecord.so.5.81.80   0x7f9518450d0d      [inlined] std::default_delete<T>::operator() (unique_ptr.h:85)
18  libKPipeWireRecord.so.5.81.80   0x7f9518450d0d      [inlined] std::__uniq_ptr_impl<T>::reset (unique_ptr.h:182)
19  libKPipeWireRecord.so.5.81.80   0x7f9518450d0d      [inlined] std::__uniq_ptr_impl<T>::operator= (unique_ptr.h:167)
20  libKPipeWireRecord.so.5.81.80   0x7f9518450d0d      [inlined] std::__uniq_ptr_data<T>::operator= (unique_ptr.h:212)
21  libKPipeWireRecord.so.5.81.80   0x7f9518450d0d      [inlined] std::unique_ptr<T>::operator= (unique_ptr.h:371)
22  libKPipeWireRecord.so.5.81.80   0x7f9518450d0d      PipeWireBaseEncodedStream::refresh (pipewirebaseencodedstream.cpp:144)
23  libKPipeWireRecord.so.5.81.80   0x7f951845514f      PipeWireRecord::setOutput (pipewirerecord.cpp:73)
24  spectacle                       0x55f52595d840      [inlined] VideoPlatformWayland::setupOutput (VideoPlatformWayland.cpp:242)
25  spectacle                       0x55f52595d840      VideoPlatformWayland::startRecording (VideoPlatformWayland.cpp:201)
26  spectacle                       0x55f5259581d1      const (VideoPlatformWayland.cpp:324)
27  libQt6Core.so.6.6.0             0x7f9515426b9d      [inlined] ? (qobjectdefs_impl.h:433)
28  libQt6Core.so.6.6.0             0x7f9515426b9d      doActivate<T> (qobject.cpp:4021)
29  libQt6DBus.so.6.6.0             0x7f9516db17f2      QDBusPendingCallWatcher::finished (moc_qdbuspendingcall.cpp:200)
30  libQt6Core.so.6.6.0             0x7f95153c70d1      QObject::event (qobject.cpp:1437)
31  libQt6Widgets.so.6.6.0          0x7f95173f079a      QApplicationPrivate::notify_helper (qapplication.cpp:3290)
32  libQt6Core.so.6.6.0             0x7f951545e827      QCoreApplication::notifyInternal2 (qcoreapplication.cpp:1118)
33  libQt6Core.so.6.6.0             0x7f951545ef3f      QCoreApplicationPrivate::sendPostedEvents (qcoreapplication.cpp:1898)
34  libQt6Core.so.6.6.0             0x7f9515263086      postEventSourceDispatch (qeventdispatcher_glib.cpp:243)
35  libglib-2.0.so.0.7200.4         0x7f9512d1bd3a      [inlined] g_main_dispatch (gmain.c:3419)
36  libglib-2.0.so.0.7200.4         0x7f9512d1bd3a      g_main_context_dispatch (gmain.c:4137)
37  libglib-2.0.so.0.7200.4         0x7f9512d71257      g_main_context_iterate.constprop.0 (gmain.c:4213)
38  libglib-2.0.so.0.7200.4         0x7f9512d193e2      g_main_context_iteration (gmain.c:4278)
39  libQt6Core.so.6.6.0             0x7f951525de5f      QEventDispatcherGlib::processEvents (qeventdispatcher_glib.cpp:393)
40  libQt6Core.so.6.6.0             0x7f9515460a5a      QEventLoop::exec (qeventloop.cpp:182)
41  libQt6Core.so.6.6.0             0x7f951546268b      QCoreApplication::exec (qcoreapplication.cpp:1439)
42  spectacle                       0x55f5258fdd56      main (Main.cpp:131)
43  libc.so.6                       0x7f9514829d8f      __libc_start_call_main (libc_start_call_main.h:58)
44  libc.so.6                       0x7f9514829e3f      __libc_start_main_alias_1 (libc-start.c:392)
45  spectacle                       0x55f5258ffbf4      _start
Edited by Méven Car

Merge request reports