SUMMARY Spectacle gives me a black screenshot after take screenshot from retangular region. Even with Wayland the problem occur. STEPS TO REPRODUCE 1. Open Spectacle 2. Take a screenshot from part of the desktop 3. Black screenshot OBSERVED RESULT Black Screenshot EXPECTED RESULT Expect get a screenshot like before. SOFTWARE/OS VERSIONS Operating System: KDE neon Unstable Edition KDE Plasma Version: 6.0.80 KDE Frameworks Version: 6.0.0 Qt Version: 6.6.2 Kernel Version: 6.7.5-x64v4-xanmod1 (64-bit) Graphics Platform: X11 Processors: 4 × AMD A12-9720P RADEON R7, 12 COMPUTE CORES 4C+8G Memory: 15.1 GiB of RAM Graphics Processor: AMD Radeon R7 Graphics Manufacturer: Acer Product Name: Aspire A515-41G System Version: V1.09
I've seen this a few times over the past couple of days as well. The actual screenshot is fine; it's just the preview in the main window that's all black. I haven't figured out how to consistently reproduce it, though.
I've seen it for the first time just now, but I'm still trying to figure out why it happens. It seems like the black image only happens when the capture window on my right monitor has active window focus. It doesn't even matter whether the selected region is on the left or right, it's just the active window focus that seems to make the difference. Very strange.
I also checked the scene graph node textures in GammaRay. I can see that the screenshot and annotations are captured and rendered correctly in the texture even when the item that's supposed to display them is black.
A possibly relevant merge request was started @ https://invent.kde.org/graphics/spectacle/-/merge_requests/337
Git commit c03141f6cf5919cc670f1833589c1d54d7405d44 by Noah Davis. Committed on 04/03/2024 at 14:51. Pushed by ndavis into branch 'master'. AnnotationViewport: Don't use TextureCanUseAtlas It was the wrong thing to use with these textures and was likely causing the GPU to run out of memory. That caused the textures to sometimes render all black despite being perfectly fine internally. TextureCanUseAtlas is best used with lots of small static images. Atlas texture sizes are padded to powers of two, so adding a large image to the atlas makes the atlas use up far more space than necessary. We also use mipmaps with the screenshot textures, so that uses up even more GPU memory with the already massive atlas texture. I also removed the explicit TextureHasAlphaChannel option because it was redundant. M +2 -4 src/Gui/Annotations/AnnotationViewport.cpp https://invent.kde.org/graphics/spectacle/-/commit/c03141f6cf5919cc670f1833589c1d54d7405d44