Summary: | Preview of rectangular region screenshot in main window is sometimes all black | ||
---|---|---|---|
Product: | [Applications] Spectacle | Reporter: | Gilberto Ferreira <gilberto.nunes32> |
Component: | General | Assignee: | Noah Davis <noahadvs> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | bugseforuns, kde, nate |
Priority: | NOR | Keywords: | qt6 |
Version First Reported In: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Neon | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/graphics/spectacle/-/commit/c03141f6cf5919cc670f1833589c1d54d7405d44 | Version Fixed In: | |
Sentry Crash Report: |
Description
Gilberto Ferreira
2024-02-22 10:43:54 UTC
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 |