Bug 508762

Summary: Spectacle's screen recording feature fails silently due to Spectacle crashing in PipeWireSourceStream::stateChanged()
Product: [Frameworks and Libraries] KPipeWire Reporter: Nico <lan5432>
Component: generalAssignee: Plasma Bugs List <plasma-bugs-null>
Status: REPORTED ---    
Severity: crash CC: aleixpol, kde, nate, noahadvs, sam
Priority: NOR    
Version First Reported In: 6.3.4   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Logs retrieved from the KSystemLog app
CoreDump from the apport .crash unpack

Description Nico 2025-08-26 13:20:28 UTC
Created attachment 184463 [details]
Logs retrieved from the KSystemLog app

SUMMARY
Finishing a recording with Spectacle doesn't work, this happens both when starting via the shortcut as well as the GUI's recording button.

Also, even if I have the setting to keep the rectangular selection after capturing, it doesn't update.

STEPS TO REPRODUCE
1. Start a recording with Spectacle
2. Stop the recording using the taskbar recording icon.

OBSERVED RESULT
- No result message appears.
- No file is created.
- Rectangular region is updated as per the associated setting.

EXPECTED RESULT
- Success notification sent to the system tray.
- File created in my specified folder.
- Rectangular region updated.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kubuntu 25.04
KDE Plasma Version: 6.3.4
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.3

ADDITIONAL INFORMATION
See attached logs.

Sometimes when I try to reproduce this, I'll get the same error as observed in https://bugs.kde.org/show_bug.cgi?id=502860
Comment 1 Nate Graham 2025-08-26 19:50:47 UTC
> 22/8/25 13:24	systemd	app-org.kde.spectacle.service: Main process exited, code=dumped, status=11/SEGV

The app crashed. We need a backtrace of it so we can figure out what's going on. Can you please attach a backtrace of the crash using the `coredumpctl` command-line program, as detailed in https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports#Retrieving_a_backtrace_using_coredumpctl?

Thanks!
Comment 2 Nico 2025-08-27 11:07:59 UTC
Hi, yeah, I figured the systemd line didn't say much, but I'm not too knowledgeable in this ecosystem. I've attached the backtrace from GDB, my installation is using apport, so I unpackaged the .crash file for Spectacle and used GDB to read the CoreDump file.

Just mentioning it in case it matters or means I've done something wrong, specially cause the backtrace doesn't mean much to me, but again I'm not used to these programs.
Comment 3 Nico 2025-08-27 11:09:17 UTC
Created attachment 184496 [details]
CoreDump from the apport .crash unpack
Comment 4 Nate Graham 2025-08-27 16:14:15 UTC
Thanks. Pasting it inline for searchability:


#0  0x00007cb1a1b59f8f in ?? () from /lib/x86_64-linux-gnu/libavcodec.so.61
#1  0x00007cb1a19408cc in ?? () from /lib/x86_64-linux-gnu/libavcodec.so.61
#2  0x00007cb1a1940b6f in avcodec_send_frame () from /lib/x86_64-linux-gnu/libavcodec.so.61
#3  0x00007cb1a7c0630a in ?? () from /lib/x86_64-linux-gnu/libKPipeWireRecord.so.6
#4  0x00007cb1a39e2129 in ?? () from /lib/x86_64-linux-gnu/libQt6Core.so.6
#5  0x00007cb1a464e118 in PipeWireSourceStream::stateChanged(pw_stream_state, pw_stream_state) () from /lib/x86_64-linux-gnu/libKPipeWire.so.6
#6  0x00007cb1a46501c6 in PipeWireSourceStream::onStreamStateChanged(void*, pw_stream_state, pw_stream_state, char const*) () from /lib/x86_64-linux-gnu/libKPipeWire.so.6
#7  0x00007cb19db9b159 in ?? () from /lib/x86_64-linux-gnu/libpipewire-0.3.so.0
#8  0x00007cb19db9ba20 in ?? () from /lib/x86_64-linux-gnu/libpipewire-0.3.so.0
#9  0x00007cb19db7d5ef in ?? () from /lib/x86_64-linux-gnu/libpipewire-0.3.so.0
#10 0x00007cb19db89bf0 in pw_impl_node_set_state () from /lib/x86_64-linux-gnu/libpipewire-0.3.so.0
#11 0x00007cb179fb90fb in ?? () from /usr/lib/x86_64-linux-gnu/pipewire-0.3/libpipewire-module-client-node.so
#12 0x00007cb179fcaa4c in ?? () from /usr/lib/x86_64-linux-gnu/pipewire-0.3/libpipewire-module-client-node.so
#13 0x00007cb15799b770 in ?? () from /usr/lib/x86_64-linux-gnu/pipewire-0.3/libpipewire-module-protocol-native.so
#14 0x00007cb15799bee8 in ?? () from /usr/lib/x86_64-linux-gnu/pipewire-0.3/libpipewire-module-protocol-native.so
#15 0x00007cb18cdd96c6 in ?? () from /usr/lib/x86_64-linux-gnu/spa-0.2/support/libspa-support.so
#16 0x00007cb1a4643cc9 in ?? () from /lib/x86_64-linux-gnu/libKPipeWire.so.6
#17 0x00007cb1a39e2129 in ?? () from /lib/x86_64-linux-gnu/libQt6Core.so.6
#18 0x00007cb1a39e6dad in QSocketNotifier::activated(QSocketDescriptor, QSocketNotifier::Type, QSocketNotifier::QPrivateSignal) () from /lib/x86_64-linux-gnu/libQt6Core.so.6
#19 0x00007cb1a39e79f3 in QSocketNotifier::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt6Core.so.6
#20 0x00007cb1a63980c8 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#21 0x00007cb1a39813f0 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt6Core.so.6
#22 0x00007cb1a3befdef in ?? () from /lib/x86_64-linux-gnu/libQt6Core.so.6
#23 0x00007cb19f0f7de2 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x00007cb19f1691f8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
--Type <RET> for more, q to quit, c to continue without paging--
#25 0x00007cb19f0f8223 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#26 0x00007cb1a3be6c63 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt6Core.so.6
#27 0x00007cb1a398bd5b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt6Core.so.6
#28 0x00007cb1a3a8356d in QThread::exec() () from /lib/x86_64-linux-gnu/libQt6Core.so.6
#29 0x00007cb1a3afc0b0 in ?? () from /lib/x86_64-linux-gnu/libQt6Core.so.6
#30 0x00007cb1a30a27f1 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:448
#31 0x00007cb1a3133c9c in __GI___clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
Comment 5 Nate Graham 2025-08-27 16:48:21 UTC
It looks to me like this is *probably* an issue in your graphics drivers or the part of the PipeWire stack that interfaces with them, but I also see frames in KDE code (PipeWireSourceStream::stateChanged) so I'll move this to KPipeWire for now so folks there can see if we're doing anything wrong on our side.