Bug 484907

Summary: Wayland: Rectangular region: Pressing "Copy" multiple times results in corrupted image in clipboard or nothing being copied
Product: [Applications] Spectacle Reporter: Dmitrii Chermnykh <chermnykh2001>
Component: GeneralAssignee: Noah Davis <noahadvs>
Status: REPORTED ---    
Severity: normal CC: chermnykh2001, fella, kde, tesfabpel
Priority: NOR    
Version First Reported In: 24.02.1   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=480448
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Dmitrii Chermnykh 2024-04-02 07:14:09 UTC
SUMMARY


STEPS TO REPRODUCE
1. Use Wayland
2. Press a shortcut for taking a rectangular region screenshot (reproduces better on big screenshot area on a high resolution screen)
3. Press "ctrl+C" shortcut multiple times quickly

OBSERVED RESULT
The screenshot is copied multiple times resulting in broken clipboard image or empty image; spectacle floods with notifications about the screenshot being copied for each "ctrl+c" keypress 

EXPECTED RESULT
The screenshot should be copied only once

SOFTWARE/OS VERSIONS
kinfo
Operating System: Arch Linux
KDE Plasma Version: 6.0.3
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.8.2-zen2-1-zen (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 5800H with Radeon Graphics
Memory: 23.1 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 3050 Ti Laptop GPU/PCIe/SSE2

spectacle --version
spectacle 24.02.1
Comment 1 Noah Davis 2024-04-02 18:03:59 UTC
I can't reproduce this on git master
Comment 2 Noah Davis 2024-04-07 05:19:49 UTC
Can't reproduce on the 24.02 branch either.
Comment 3 Dmitrii Chermnykh 2024-04-07 08:55:14 UTC
(In reply to Noah Davis from comment #2)
> Can't reproduce on the 24.02 branch either.

Can you reproduce it under high system load (with something like s-tui)?