Bug 459134

Summary: Animation Cache displays black frame when "limit cached frame size" is active.
Product: [Applications] krita Reporter: Emmet O'Neill <emmetoneill.pdx>
Component: AnimationAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: dimula73, ghevan
Priority: NOR    
Version: 5.0.6   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Emmet O'Neill 2022-09-15 04:11:00 UTC
SUMMARY

On my system at least, my animation cache is displaying totally black frames when the configuration setting "Performance > Animation > Limit Cached Frame Size" is active. If that box is checked, and if the size of the current frame is >= the setting's limit value, then the cached frame will appear completely black rending the program functionally unusable.

I haven't yet determined whether this is a regression or simply a bug that is difficult to find due to needing a specific configuration, but it's pretty bad.

For some reason this bug is consistently reproducible in my source build, as well as in any appimage (including stable), but I cannot make it happen with the flatpak binary via flathub. I thought that might hint at a driver issue, since I recently updated my system, but the same behavior appears on both the proprietary nvidia GPU driver as well as the open source nouveau driver...  

STEPS TO REPRODUCE
1. Go to "Configure Krita > Performance > Animation" and enable Limit Cached Frame Size checkbox with a value that is <= the size of your current canvas. ("Display > Canvas Graphics Acceleration" must also be enabled to see results of caching in general.)
2. Try to play back your animation and watch the cache markers appear at the top of the timeline.

OBSERVED RESULT
After the cache generates the canvas will go pitch black, and it will stay that way until the cache is cleared. While the canvas is dark there seems to be nothing that can cause it to function properly.

EXPECTED RESULT
You should see the proper cached frame!!!

SOFTWARE/OS VERSIONS
Linux: Fedora 36
GPU: NVidia GTX 1060 3GB vram version. Tested with both `nvidia` and `nouveau` drivers.
Comment 1 Emmet O'Neill 2022-09-15 04:25:33 UTC
Edit: Ah, Eoin and I managed to find out the source of the bug, and it is now 100% reproducible in every version that we've tested on. It looks like this bug occurs when "Configure Krita > Display > Canvas Graphics Acceleration > Scaling Mode" is set to either "nearest neighbor" or "bilinear interpolation" modes.

Still important to fix soon, but bringing the importance level back down to normal since it's not something that will happen without a specific configuration.
Comment 2 vanyossi 2022-09-27 02:18:50 UTC
Setting to confirmed
Comment 3 Dmitry Kazakov 2024-08-21 12:27:32 UTC
The issue is caused by improper use of tile-mipmaps, which was fixed in bug 486417

*** This bug has been marked as a duplicate of bug 486417 ***
Comment 4 Dmitry Kazakov 2024-08-21 12:27:58 UTC
The issue is caused by improper use of tile-mipmaps, which was fixed in bug 486417