Bug 504535

Summary: Starting a second screen recording causes Spectacle to report an error message
Product: [Applications] Spectacle Reporter: altmail
Component: GeneralAssignee: Noah Davis <noahadvs>
Status: RESOLVED FIXED    
Severity: normal CC: altmail, bugseforuns, kde, nate, openmail+kde
Priority: HI Keywords: regression
Version First Reported In: 6.3.90   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 6.4.0
Sentry Crash Report:

Description altmail 2025-05-19 17:03:25 UTC
SUMMARY
When finishing a second screen recording in Spectacle after already having recorded previously, Spectacle reports an error saying "Failed to export video: Temporary file URL must be an existing local file". However, after closing the popup, nothing appears to broken (I can open the recorded video just fine).

Video demonstrating the issue: https://youtu.be/0yAweRdOscQ


STEPS TO REPRODUCE
1. Open Spectacle, make a screen recording.
2. After finishing recording, click the "New Recording" button in the new window previewing the first recording to start another recording, select a region and start the recording.
3. Stop the second recording.
4. Popup with the error message appears.

OBSERVED RESULT
An error message pops up after finishing the second recording.


EXPECTED RESULT
Spectacle should directly show the result without showing an error message.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora KDE 42
KDE Plasma Version: 6.3.90 (from the @kdesig/kde-beta copr)
KDE Frameworks Version: 6.14.0
Qt Version: 6.9.0

ADDITIONAL INFORMATION
Comment 1 Schlaefer 2025-05-19 17:22:49 UTC
Can confirm here. A second recording throws the same error after clicking the "stop recording" button.

Exact same steps as video of OP except I did fullscreen recording.

Operating System: Arch Linux 
KDE Plasma Version: 6.3.90
KDE Frameworks Version: 6.14.0
Qt Version: 6.9.0
Graphics Platform: Wayland
Comment 2 Nate Graham 2025-05-19 18:54:36 UTC
Can reproduce on git master too.
Comment 3 Patrick Silva 2025-05-20 13:19:09 UTC
*** Bug 504564 has been marked as a duplicate of this bug. ***
Comment 4 Bug Janitor Service 2025-05-23 07:39:00 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/spectacle/-/merge_requests/457
Comment 5 Noah Davis 2025-05-26 20:28:52 UTC
Git commit f4821f0d28fa4c87583a7055220d2e4330074ebd by Noah Davis.
Committed on 26/05/2025 at 11:24.
Pushed by ndavis into branch 'master'.

VideoPlatformWayland: fix double recordingSaved emissions

The if block that was supposed to prevent against unnecessary emissions didn't check if the recording state was already set to finished.

M  +1    -1    src/Platforms/VideoPlatformWayland.cpp

https://invent.kde.org/graphics/spectacle/-/commit/f4821f0d28fa4c87583a7055220d2e4330074ebd
Comment 6 Noah Davis 2025-05-26 20:29:34 UTC
Git commit 8cf823c47853a2061f73d69e0e72ba41587a445f by Noah Davis.
Committed on 26/05/2025 at 20:29.
Pushed by ndavis into branch 'Plasma/6.4'.

VideoPlatformWayland: fix double recordingSaved emissions

The if block that was supposed to prevent against unnecessary emissions didn't check if the recording state was already set to finished.

(cherry picked from commit f4821f0d28fa4c87583a7055220d2e4330074ebd)

Co-authored-by: Noah Davis <noahadvs@gmail.com>

M  +1    -1    src/Platforms/VideoPlatformWayland.cpp

https://invent.kde.org/graphics/spectacle/-/commit/8cf823c47853a2061f73d69e0e72ba41587a445f