Bug 481099 - Inserted hold frame(s) will never update in the cache and halts playback (git 3ad80aa)
Summary: Inserted hold frame(s) will never update in the cache and halts playback (git...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Animation (show other bugs)
Version: nightly build (please specify the git hash!)
Platform: Microsoft Windows Microsoft Windows
: NOR major
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-08 23:39 UTC by Cade Martinez
Modified: 2024-02-28 18:09 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
System info dumped by Krita (7.74 KB, text/plain)
2024-02-08 23:39 UTC, Cade Martinez
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cade Martinez 2024-02-08 23:39:35 UTC
Created attachment 165683 [details]
System info dumped by Krita

SUMMARY
After inserting a hold frame, it will remain "uncached" and playback halts when the frame is encountered.

STEPS TO REPRODUCE
1. Create a new project with a paint layer
2. Draw anything (a dot or line is ok)
3. Create a new keyframe and draw on it
4. Play and stop animation (to ensure the cache gets filled)
5. Insert one or more hold frames between the key frames
6. Do not scrub the playhead
7. Play the animation

OBSERVED RESULT
The new hold frame will not be cached (indicated in the timeline UI).
Playback will halt next time the hold frame is reached, and cache must be cleared/updated by other means.

EXPECTED RESULT
Playback will not halt. Frame will be cached (if applicable)

SOFTWARE/OS VERSIONS
Windows: 10 (10.0.19044 Build 19044)
Qt Version: 5.15.7

ADDITIONAL INFORMATION
- This bug affects both Krita 5.2.2 and 5.3.0-prealpha (git 3ad80aa)
- Detailed system information attached
- Cache settings are default
Comment 1 Emmet O'Neill 2024-02-09 02:35:49 UTC
Hi Cade, thanks for the detailed report. I can easily reproduce this bug with your instructions.

For the time being, I think the quickest workaround is to right-click on the frame time header bar (at the top, where you drag to scrub) and select "clear cache" from the context menu. This rebuilds the animation cache and seems to solve the broken playback.

I'm setting this to "confirmed", and hopefully we'll get this fixed by the next released.
Comment 2 Bug Janitor Service 2024-02-27 14:47:02 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/2082
Comment 3 Dmitry Kazakov 2024-02-27 15:54:43 UTC
Git commit f02235137f409b1b42545f790b49f7852c46bca0 by Dmitry Kazakov.
Committed on 27/02/2024 at 14:46.
Pushed by dkazakov into branch 'master'.

Fix cache being stuck whe adding hold frames

When a hold frame is inserted we should just extend the existing
cached frame duration to cover this period of time.

The patch implements that in a form of a gluer that extends/glues the
frames on the next dirty frame generation.

M  +2    -0    libs/ui/dialogs/KisAsyncAnimationCacheRenderDialog.cpp
M  +99   -0    libs/ui/kis_animation_frame_cache.cpp
M  +2    -0    libs/ui/kis_animation_frame_cache.h
A  +26   -0    libs/ui/kis_animation_frame_cache_p.h     [License: GPL(v2.0+)]
M  +236  -0    libs/ui/tests/kis_animation_frame_cache_test.cpp
M  +3    -0    libs/ui/tests/kis_animation_frame_cache_test.h

https://invent.kde.org/graphics/krita/-/commit/f02235137f409b1b42545f790b49f7852c46bca0
Comment 4 Dmitry Kazakov 2024-02-28 18:09:44 UTC
Git commit 7411566d1c3b43e7976c2c614c2d6c641755a6ec by Dmitry Kazakov.
Committed on 28/02/2024 at 13:01.
Pushed by dkazakov into branch 'kazakov/for-5.2'.

Fix cache being stuck whe adding hold frames

When a hold frame is inserted we should just extend the existing
cached frame duration to cover this period of time.

The patch implements that in a form of a gluer that extends/glues the
frames on the next dirty frame generation.

M  +2    -0    libs/ui/dialogs/KisAsyncAnimationCacheRenderDialog.cpp
M  +99   -0    libs/ui/kis_animation_frame_cache.cpp
M  +2    -0    libs/ui/kis_animation_frame_cache.h
A  +26   -0    libs/ui/kis_animation_frame_cache_p.h     [License: GPL(v2.0+)]
M  +236  -0    libs/ui/tests/kis_animation_frame_cache_test.cpp
M  +3    -0    libs/ui/tests/kis_animation_frame_cache_test.h

https://invent.kde.org/graphics/krita/-/commit/7411566d1c3b43e7976c2c614c2d6c641755a6ec