Bug 391791

Summary: Animation won't play because of updating cache
Product: [Applications] krita Reporter: Scott Petrovic <scottpetrovic>
Component: AnimationAssignee: Dmitry Kazakov <dimula73>
Status: RESOLVED FIXED    
Severity: normal CC: ahab.greybeard, halla
Priority: NOR    
Version: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:

Description Scott Petrovic 2018-03-13 02:26:51 UTC
I was just playing around with the animation in a newer Windows build and noticed that after animating for a while, I tried to hit play and Krita just keeps telling me it is "regenerating the cache". It gets done, I try to hit play again, then it tries to update the cache again.

Here is the file I am using.
https://drive.google.com/open?id=188nnwNdy9VpT-5dX8H8p6lleMT07Cmyr

Open the file, and try to hit the play button. It seems to happen every time with my build (git 31b943f).

After playing with this file a while I think it has something to do with the onion skins. Turning the onion skins off it appears to eventually let me play again.
Comment 1 Halla Rempt 2018-03-13 09:08:01 UTC
I can confirm this bug: it only seems to happen on Windows, though.
Comment 2 Ahab Greybeard 2018-03-14 09:34:23 UTC
It also happens with krita-4.1.0-pre-alpha-d0e6714-x86_64.appimage on Debian 9.
I did this with a total configuration refresh to give a clean start using the file link provided by Scott Petrovic.

For me, it wasn't related to use of onion skins. If you keep pressing the Play button, the progress bar eventually moves forward to the end of the animation frames and it plays normally.

The problem repeats if you make any changes to the animation content.

It may be related to this bug: https://bugs.kde.org/show_bug.cgi?id=391847
Comment 3 Dmitry Kazakov 2018-03-14 10:20:41 UTC
Yes, it is also reproducible in my build on Linux
Comment 4 Dmitry Kazakov 2018-03-14 11:46:40 UTC
Git commit aeb753e41d1a59c4138913a5798f78f5029588ec by Dmitry Kazakov.
Committed on 14/03/2018 at 11:44.
Pushed by dkazakov into branch 'master'.

Fix animation cache regeneration being stuck in the middle of recalculation

The patch for animation cache leak broke normal recalculation:
KisAsyncAnimationCacheRenderer::clearFrameRegenerationState()
resets the state after each frame recalculation, so we should
initialize it manually every time.

M  +13   -3    libs/ui/dialogs/KisAsyncAnimationCacheRenderDialog.cpp
M  +2    -0    libs/ui/dialogs/KisAsyncAnimationCacheRenderDialog.h
M  +6    -0    libs/ui/dialogs/KisAsyncAnimationFramesSaveDialog.cpp
M  +2    -0    libs/ui/dialogs/KisAsyncAnimationFramesSaveDialog.h
M  +2    -0    libs/ui/dialogs/KisAsyncAnimationRenderDialogBase.cpp
M  +3    -0    libs/ui/dialogs/KisAsyncAnimationRenderDialogBase.h

https://commits.kde.org/krita/aeb753e41d1a59c4138913a5798f78f5029588ec
Comment 5 Halla Rempt 2018-03-14 11:48:24 UTC
Git commit ac99805e84121e9377d23558c615af506cd7441d by Boudewijn Rempt, on behalf of Dmitry Kazakov.
Committed on 14/03/2018 at 11:48.
Pushed by rempt into branch 'krita/4.0'.

Fix animation cache regeneration being stuck in the middle of recalculation

The patch for animation cache leak broke normal recalculation:
KisAsyncAnimationCacheRenderer::clearFrameRegenerationState()
resets the state after each frame recalculation, so we should
initialize it manually every time.

M  +13   -3    libs/ui/dialogs/KisAsyncAnimationCacheRenderDialog.cpp
M  +2    -0    libs/ui/dialogs/KisAsyncAnimationCacheRenderDialog.h
M  +6    -0    libs/ui/dialogs/KisAsyncAnimationFramesSaveDialog.cpp
M  +2    -0    libs/ui/dialogs/KisAsyncAnimationFramesSaveDialog.h
M  +2    -0    libs/ui/dialogs/KisAsyncAnimationRenderDialogBase.cpp
M  +3    -0    libs/ui/dialogs/KisAsyncAnimationRenderDialogBase.h

https://commits.kde.org/krita/ac99805e84121e9377d23558c615af506cd7441d