Bug 506067 - Spectacle fails when trying to Export > Share when in rectangle selection mode
Summary: Spectacle fails when trying to Export > Share when in rectangle selection mode
Status: RESOLVED FIXED
Alias: None
Product: Spectacle
Classification: Applications
Component: General (other bugs)
Version First Reported In: 6.4.0
Platform: Arch Linux Linux
: HI normal
Target Milestone: ---
Assignee: Noah Davis
URL:
Keywords:
: 510231 (view as bug list)
Depends on:
Blocks:
 
Reported: 2025-06-23 18:05 UTC by Paul Brown
Modified: 2025-11-04 22:16 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.5.1
Sentry Crash Report:


Attachments
A screenshot of Specatacle rectangular selection interface with the Export > Share meny unfolded (146.00 KB, image/png)
2025-06-23 18:05 UTC, Paul Brown
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Brown 2025-06-23 18:05:49 UTC
Created attachment 182570 [details]
A screenshot of Specatacle rectangular selection interface with the Export > Share meny unfolded

Spectacle fails when you select a rectangle and try to export and then try and export and share it directly from the rectangle defining interface (I have added an attachment to clarify what I mean).

STEPS TO REPRODUCE

1. Choose  New Screenshot > Rectangular Region
2. Select a rectangle and press "Export" in the lower right hand corner
3. From "Share" choose "Send via Email|via Telegram|via Bluetooth|to Device", or "Upload Publicly to Imgur"

OBSERVED RESULT

The app fails with an error saying that the image to be shared does not exist:

/tmp/Spectacle.nvNrmb/Screenshot_20250623_194559.png does not exist

EXPECTED RESULT

That the screenshot is shared.

SOFTWARE/OS VERSIONS

Operating System: Arch Linux 
KDE Plasma Version: 6.4.0
KDE Frameworks Version: 6.15.0
Qt Version: 6.9.1
Kernel Version: 6.15.3-arch1-1 (64-bit)
Graphics Platform: Wayland
Comment 1 Nate Graham 2025-06-25 18:30:16 UTC
Can reproduce. Looks like it fails to generate a temporary file for the export action, or else misplaces it or something.
Comment 2 Nate Graham 2025-06-25 18:32:47 UTC
Perhaps related to Bug 506047.
Comment 3 Nate Graham 2025-10-07 18:49:18 UTC
*** Bug 510231 has been marked as a duplicate of this bug. ***
Comment 4 Nate Graham 2025-10-07 18:50:29 UTC
Raising priority due to it being a basic feature that's broken.
Comment 5 Bug Janitor Service 2025-10-22 10:41:39 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/spectacle/-/merge_requests/482
Comment 6 Noah Davis 2025-10-22 16:12:31 UTC
Git commit ab1b9187c1bf18357ba10f74e4648ab3a3158124 by Noah Davis.
Committed on 22/10/2025 at 10:52.
Pushed by ndavis into branch 'master'.

Set export image and update timestamp when entering the rectangle screenshot mode

I think there was a reason why I didn't do this before. It may have had something to do with what should happen when canceling a rectangle screenshot. It seems like there isn't any reason not to do it now since there isn't any way to undo the base image change when doing a new rectangle screenshot.
Related: bug 506047

M  +3    -1    src/SpectacleCore.cpp

https://invent.kde.org/plasma/spectacle/-/commit/ab1b9187c1bf18357ba10f74e4648ab3a3158124
Comment 7 Noah Davis 2025-10-22 16:12:44 UTC
Git commit e2c66f2e54b797300fb320ebd43dfe09e219f0d9 by Noah Davis.
Committed on 22/10/2025 at 16:12.
Pushed by ndavis into branch 'Plasma/6.5'.

Set export image and update timestamp when entering the rectangle screenshot mode

I think there was a reason why I didn't do this before. It may have had something to do with what should happen when canceling a rectangle screenshot. It seems like there isn't any reason not to do it now since there isn't any way to undo the base image change when doing a new rectangle screenshot.
Related: bug 506047


(cherry picked from commit ab1b9187c1bf18357ba10f74e4648ab3a3158124)

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

M  +3    -1    src/SpectacleCore.cpp

https://invent.kde.org/plasma/spectacle/-/commit/e2c66f2e54b797300fb320ebd43dfe09e219f0d9
Comment 8 fivenineplusr 2025-11-04 22:16:51 UTC
This bug still is happening in 6.5.1... I can't upload directly to imgur and it's the same root cause regarding the filename not existing if I run it from the command line.