SUMMARY Spectacle crashes after ending a recording. STEPS TO REPRODUCE 1. Open Spectacle 2. Go to the Recording tab 3. Click on one of "Rectangular Region", "Full Screen", "Window" 4. Select the recording area to start the recording 5. After a few seconds, press the red circle in the system tray to end the recording OBSERVED RESULT Recording properly ends and is saved to the user's Videos/Screencasts directory. EXPECTED RESULT Spectacle segfaults. SOFTWARE/OS VERSIONS Linux/KDE Plasma: KDE neon 6.0.3 KDE Plasma Version: 6.0.3 KDE Frameworks Version: 6.0.0 Qt Version: 6.6.2 ADDITIONAL INFORMATION The crash can be reproduced every time. DrKonqi doesn't pop up after the crash, so the backtrace was gathered using gdb. Thread 172 "PipeWireProduce" received signal SIGSEGV, Segmentation fault. PipeWireRecordProduce::cleanup (this=0x55555622be40) at ./src/pipewirerecord.cpp:199 (gdb) backtrace #0 PipeWireRecordProduce::cleanup (this=0x55555622be40) at ./src/pipewirerecord.cpp:199 #1 0x00007ffff7e2948d in PipeWireProduce::deactivate (this=0x55555622be40) at ./src/pipewireproduce.cpp:134 #2 PipeWireProduce::deactivate (this=0x55555622be40) at ./src/pipewireproduce.cpp:129 #3 0x00007ffff4dcc9b2 in QObject::event (this=0x55555622be40, e=0x555555efd9c0) at ./src/corelib/kernel/qobject.cpp:1437 #4 0x00007ffff6df181b in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x55555622be40, e=0x555555efd9c0) at ./src/widgets/kernel/qapplication.cpp:3296 #5 0x00007ffff4e75e08 in QCoreApplication::notifyInternal2 (receiver=0x55555622be40, event=event@entry=0x555555efd9c0) at ./src/corelib/kernel/qcoreapplication.cpp:1121 #6 0x00007ffff4e75e4d in QCoreApplication::sendEvent (receiver=<optimized out>, event=event@entry=0x555555efd9c0) at ./src/corelib/kernel/qcoreapplication.cpp:1539 #7 0x00007ffff4e76000 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x555555e89c50) at ./src/corelib/kernel/qcoreapplication.cpp:1901 #8 0x00007ffff4c584f7 in postEventSourceDispatch (s=0x7fff2c003600) at ./src/corelib/kernel/qeventdispatcher_glib.cpp:243 #9 0x00007ffff231bd3b in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #10 0x00007ffff2371258 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #11 0x00007ffff23193e3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #12 0x00007ffff4c55c30 in QEventDispatcherGlib::processEvents (this=0x7fff2c005220, flags=...) at ./src/corelib/kernel/qeventdispatcher_glib.cpp:393 #13 0x00007ffff4e7fceb in QEventLoop::exec (this=0x7fff3bffe0a0, flags=...) at ./src/corelib/global/qflags.h:34 #14 0x00007ffff4d98388 in QThread::exec (this=<optimized out>) at ./src/corelib/global/qflags.h:74 #15 0x00007ffff4d5ce7d in operator() (__closure=<optimized out>) at ./src/corelib/thread/qthread_unix.cpp:324 #16 (anonymous namespace)::terminate_on_exception<QThreadPrivate::start(void*)::<lambda()> > (t=...) at ./src/corelib/thread/qthread_unix.cpp:260 #17 QThreadPrivate::start (arg=0x55555613bce0) at ./src/corelib/thread/qthread_unix.cpp:283 #18 0x00007ffff4294ac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442 #19 0x00007ffff4326850 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
this seems to happen because of a null pointer dereference here https://invent.kde.org/plasma/kpipewire/-/blob/master/src/pipewirerecord.cpp?ref_type=heads#L195 so i moved it to kpipewire instead
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kpipewire/-/merge_requests/136
Git commit eb21912e7e0ce5a70c6f906c6e5a20f56cc6783e by Fabian Vogt. Committed on 05/04/2024 at 08:42. Pushed by fvogt into branch 'master'. Fix nullptr check It made sure to only dereference nullptrs. M +1 -1 src/pipewirerecord.cpp https://invent.kde.org/plasma/kpipewire/-/commit/eb21912e7e0ce5a70c6f906c6e5a20f56cc6783e
Git commit 248988134e859143292aa907d9464fd2f8dcfa07 by Fabian Vogt. Committed on 05/04/2024 at 08:44. Pushed by fvogt into branch 'Plasma/6.0'. Fix nullptr check It made sure to only dereference nullptrs. (cherry picked from commit eb21912e7e0ce5a70c6f906c6e5a20f56cc6783e) M +1 -1 src/pipewirerecord.cpp https://invent.kde.org/plasma/kpipewire/-/commit/248988134e859143292aa907d9464fd2f8dcfa07
while this is now fixed, another error still occurs, which i've reported in #485733