Krita freezes repeatedly while animating

I am on Windows, my drawing tablet is a Huion H610PRO(8192), and the version of Krita I’m using is 5.2.2. I have 8 GB of RAM and have given Krita a memory limit of 7.7 GB (I had expanded it for my previous animation project).

My animation has around 13 layers (including masks) and is about just a minute long (with 1203 frames in total), but I’ve had to slice it up into many smaller files because I thought it would make the freezing stop. The freezing doesn’t seem to have a particular trigger, it can happen anytime. However, it does seem to get aggravated due to larger file sizes, other programs running simultaneously, or transform animations panning across large images. I have tried reinstalling krita, updating my tablet drivers, but the issue continues to persist. This issue does not happen with non-animation pieces.

What is strange to me is that my previous animation which I made last year on version 5.1.0 (not entirely sure which version it was, but if it helps, that animation was completed on August 7, 2023) didn’t experience such extensive crashing, and it consists of around 33 layers and is 3.4 GB in size. The only hurdle for that project was the canvas size being too large (It cleared up when I chose 1920x1080, and I’m using the same resolution for my current animation too). Back then, Krita gave me clear warnings about memory running out, but now it just freezes without warning and the only thing I can do is repeatedly press the red X button at the top right corner until a popup tells me Krita is not responding which then lets me close the program (I can’t close the program any other way :sweat_smile:). It then runs smoothly for a while but will keep crashing depending on the size (if it’s really bad it’s almost every 5 min, but can be as low as every 15 min).

Is there anything else I can do apart from breaking the animation into smaller chunks? I haven’t even started coloring :sweat_smile:. It’s just a minute long but is already in 6 parts :frowning: It’s getting a little unsustainable.

Hi

The crash occurs during rendering animation, or while you’re drawing?
Do yu have error message or log information about crash?

A tip I use: if you have black&white line art layers, convert these layers to Greyscale/Alpha instead of RGBA (then, use 2bytes per pixels in memory instead of 4bytes)

Concerning other performances tips while drawing:

  • If you have filter mask, try do deactivate them while drawing
  • If you have transform mask, try to deactivate the one you don’t need at the time you’re drawing (not always possible especially if they’re used as reference…)
  • In settings, disable background cache generation

For rendering animation:

  • In settings, limit frame rendering clone limit to 50%
  • In settings, increase frame rendering timeout
  • In settings, set cache on disk instead of in memory

Grum999

3 Likes

Windows needs between 2GB and 3GB of RAM to exist and do its work depending on how it’s configured and what permanent utilities you have running.
Also, you may have anti-virus or other ‘security’ utilities running.
When your computer has been running a while, close all user applications and use the Task Manager to see how much RAM is being used when you’re ‘doing nothing’.

If your krita settings and use of krita causes it to use RAM that is needed for Windows then there will be freezes or crashes.

Your use of other applications at the same time will make this problem more likely to happen.

For safety, I’d suggest that you allocate only 5GB of RAM to krita and do not run any other applications at the same time.

If you are working on a large and/or complex animation then it is a good idea to regularly Save then Quit then restart krita.

If you are wondering how much RAM krita is using, you can use the Windows Task Manager to find out.
As time goes by and you do more work in krita, it uses more and more RAM.

3 Likes

Hello @Grum999 and @AhabGreybeard, thanks for the tips. I followed the advice you both gave me but the problem still seems to be persisting : (

Grum, I was able to follow all your tips except for the Greyscale conversion part. Could you tell me a bit more about it?

The crash has occurred doing both these things; it seems to be quite random. Krita had even crashed a few seconds after I closed the animation file and on some occasions, even when it was idle. Should I send the log as a pastebin link here?

As for error messages, I just get this
Screenshot 2024-01-14 125950

What were the results of using Task Manager to check the total RAM usage while ‘doing nothing’ and regularly checking the total usage by krita?

Krita can manage different color space within the same document: in a RGBA/8bit document for example, you’ll have RGBA/8b layers created by default, but you can convert any raster layer to any color space (greyscale, CMYK, RGBA32 bit, …)

This is pretty useful for different case, and as lineart are probably black&white (not always the case but often) a greyscale layer let you save memory.

To do that, select your line art layer, and go in menu Layer > Convert > Convert Layer Colour Space…

Then in dialog box, choose model Greyscale/Alpha:

Can you show us the layer stack?
Especially I want to see filter mask and transform mask if any.

Or if you can share your document I can try on my side to check if have problems

Grum999

1 Like

Well, when Krita is closed and no other apps are open, the Memory usage is around 56%. When I opened a segment of the animation (which is about 200 MB), the Memory usage went up to 63%, and on the second try, 66%, and later, 70% (I don’t know if these increases are normal - they didn’t gradually increase as the program was left open, but rather seemed to just increase every time I reopened the application). The 200 MB file uses about 600 MB of Memory on average. My laptop’s available RAM is 7.7 MB (the total is actually 8 GB and 7.7 is the usable amount).

What I find interesting though, is when I tried opening the previous animation project (which is 3.4 GB), my laptop used 1.5 GB of memory. I’m not all too familiar with how RAM usage works, but I wonder why a 200 MB file would use 600 MB of memory, but a 3.4 GB file would use just 1.5 GB. I think it might possibly be due to my bigger file having many repeating frames.

here’s a few files, 2 of them have filter/transform masks.

Also, thanks for sharing the Grayscale tip! It made my files so much smaller :grin:

I’ve requested access to files

Grum999

Oh my bad, didn’t realize the barrier was on by default. I’ve given you access

Ok I’ve downloaded them

So at first look, files don’t consume so much memory.

Opening files was Ok
Rendering was Ok (the that one straw part 3 (ver 1).kra required more work for my computer but ok, rendered in ~36seconds without any special difficulties)

But now, I can’t explain why, my Krita is frozen too :upside_down_face:

So at least, I can confirm there’s something, it’s not only on your side, and it’s not only on Windows (I’m on Linux)

While being freezed, there’s no CPU consumption:

I’ll do some additional tests and try to check what happen with your documents, I’m able to reproduce the case…

Grum999

1 Like

Some additional tests:

  • Can reproduce problem in 5.3.0pa, 5.1.5
  • Can’t reproduce problem in 5.0.0, 5.0.6

Still looking and trying to understand what this file has special

Grum999

I think I found the origin of the problem :slight_smile:

I sent you a link to a “fixed” version of file.
Can you check on your side if everything is fine too with the fixed version?

If it solve the problem, I’ll “fix” the 2 others files too
And probably create a bug report

On my side, to reproduce the freeze, what I did was:

  1. open file that one straw part 3 (ver 1).kra
  2. create a new file
  3. go back to that one straw part 3 (ver 1).kra
  4. try to go back to new file

Krita systematically freeze

With fixed version of file that one straw part 3 (ver 1)--grum999.kra, it doesn’t freeze anymore

Grum999

2 Likes

What was the problem and what was the fix?

If it doesn’t solve the problem, then not sure what I did matters, but I had to unzip/modify/rezip the file :slight_smile:
if it solve the problem, I’ll explain what I did :slight_smile:

Grum999

1 Like

That is a lot for an ‘idle’ Windows system with 8GB of RAM.
It implies that there is only 3.38 GB free RAM for krita to use.
What is it immediately after a full power down restart?

Do you have any third party anti-virus application running or anything like that in the background?

That would require detailed examination and could depend on many things.

Well today it was about 70% :sweat_smile: I was able to get to 60% by shutting down some background apps. However, after trying some stuff I read online, I was able to cut it down to around 40%. I basically disabled some startup apps.

1 Like

Hi

First feedback from @macaron seems Ok; it still need to work on longer session to confirm the freeze doesn’t occurs anymore, but first feelings is the solution sounds Ok.

So what I did was:

  • rename .kra to .zip
  • unzip
  • delete directory xxxxxx/storyboard and its content
  • rezip
  • rename to .kra

Without the storyboard, the freeze doesn’t occurs anymore.

Now, the weird things is i tried to create an animation with a storyboard too and I don’t get freeze; I’m not sure why this file specifically put Krita in a freeze.

I have to do more tests to understand in which condition the storyboard generate this kind of problem before reporting a bug.

Grum999

3 Likes

I’ve created the bug: 479870 – Animation + Transform mask + Story board = Krita totally freeze

Note: I had difficulties to create a file from scratch that reproduce the bug, then file attached to bug has been made from @macaron file (I only kept combination of transform mask + storyboard from file, animation content drawn is mine)

If someone else can confirm the bug is reproducible with provided information+test file, could be a good thing :slight_smile:

Grum999

3 Likes

@macaron Would you be able to do that? Sign up and login is needed.