Bug 492011

Summary: Progress Reporting Seems to Crash the Application when Many Vector and Paint Layers are Animated with Transform Layers
Product: [Applications] krita Reporter: seabassten10
Component: GeneralAssignee: Krita Bugs <krita-bugs-null>
Status: REPORTED ---    
Severity: crash CC: dimula73, emmetoneill.pdx, halla
Priority: NOR Keywords: triaged
Version First Reported In: 5.2.3   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: KritaSystemInformation.txt
KritaUsageLog.txt
The Current Version of the File

Description seabassten10 2024-08-21 22:43:27 UTC
STEPS TO REPRODUCE
1. Turn on Progress Reporting in Advanced Performance Settings
2. Make a 4k resolution canvas
3. Make a bunch of Paint and Vector Layers (put some in nested folders)
4. Use Transform Masks to animate at least 1/3 of those layers
5. Keep animating until the Application unexpectedly dies
6. Reopen the Application and project
7. Repeat from step 5 until simply opening the project causes Krita to kill itself
8. Turn off Progress Reporting and watch as your project loads perfectly fine (albeit slowly) w/o crashing Krita
Optional: Increase maximum memory and swap memory to prolong your suffering

OBSERVED RESULT
Krita silently kills itself

EXPECTED RESULT
Krita does not silently kill itself

Software Specs:
Arch Linux
KDE Plasma 6.1.4
KDE Frameworks 6.5.0
Qt Version: whatever most recent Plasma is on

Important Hardware Specs:
CPU: Ryzen 5900X
GPU: RX 6700XT
RAM: 2x32GB (64GB) kit from Corsair 

ADDITIONAL INFORMATION
Performance log did not appear in project directory. I have no clue where else I could find such a useful file
Comment 1 Halla Rempt 2024-08-22 07:27:59 UTC
To be honest, t does sound a bit like your animation project is simply too big for your system, big as it is... At some point, something has to give. 

Also, is this the arch linux version of Krita? I also don't know how to make arch cough up a backtrace... It should do that automatically, of course, if you're running plasma the DrKongui crash reporter should show up. Just in case, does this also happen with the appimage? And could you attach the contents of help->system information and help->krita log to this report?

Finally, do you have a .kra file of your project so we can test with that?
Comment 2 seabassten10 2024-08-22 15:25:23 UTC
Created attachment 172858 [details]
KritaSystemInformation.txt
Comment 3 seabassten10 2024-08-22 15:26:19 UTC
Created attachment 172859 [details]
KritaUsageLog.txt
Comment 4 seabassten10 2024-08-22 15:57:11 UTC
Created attachment 172860 [details]
The Current Version of the File

.kra file has been in the process of downsizing since the bug began. Original was going to be a walk cycle at 30fps. Now I'm partway to translating to 18fps.
Comment 5 seabassten10 2024-08-22 16:07:52 UTC
(In reply to Halla Rempt from comment #1)
> It should do that automatically, of course, if you're running plasma the DrKongui crash reporter should show up. 
Sometimes a full notification pops up immediately. Sometimes it's a silent notification. Sometimes the notification doesn't appear at all until I reopen Krita.

> Just in case, does this also happen with the appimage? 
Gonna try this out today.


> To be honest, t does sound a bit like your animation project is simply too big for your system, big as it is... At some point, something has to give. 
I would like to doubt this, but you probably know better than me how Krita works on hardware.
Comment 6 Bug Janitor Service 2024-08-23 03:47:44 UTC
๐Ÿ›๐Ÿงน Thanks for your comment!

Automatically switching the status to REPORTED so the team can perform further triage.

In the future you may also do this yourself when providing needed information.
Comment 7 seabassten10 2024-08-25 15:54:34 UTC
So far, the AppImage has crashed once in the past few days. I would like to assume that was simply because of how quickly I was making the Krita do things whilst it was trying to do background tasks. Still confirming tho
Comment 8 Halla Rempt 2024-08-26 14:29:17 UTC
Thanks for all the extra info!
Comment 9 Emmet O'Neill 2024-08-29 23:35:10 UTC
Hey seabassten10, thanks for the report.

I did some testing today as I've been working on a bug that we thought may have been related, but I haven't been able to reproduce your crash just yet. I have a pretty similar system to you too (5900x, rx 590 (because my brother is "borrowing" my 6650xt...), 64GB RAM). 

It's extremely slow to render out the animation cache when starting playback, but haven't had a crash yet when playing around with the layers. Since you're describing it getting progressively worse until it begins immediately crashing on document load, I'm guessing it is a memory/resource leak that gets worse and worse over time. But until I can reproduce the crash and get a proper backtrace from GDB it's impossible to know for sure. As such, I'm going to be setting this to "NEEDSINFO" until we can find out enough to start taking action towards fixing whatever is going on.

At any rate, sorry if this has been getting in the way of your ability to work. :(

As someone who dabbles in animation, I have a couple of recommendations workflow-wise when it comes to animating in Krita:

1. This kind of document is just too much for Krita to handle right now. Some combination of the 4k resolution, the number of layers, and the heavy use of Transform Masks is bringing Krita's frame regeneration (the part of the code that squashes all the layers down into final images to be stored in the cache) to a slow crawl. Hiding the Transform Mask layers brings the regeneration time down significantly, but because your animation depends entirely upon it that's not really an option. That's all to say that, for the "2D skeletal" style of animation that you're trying to do, Krita probably just isn't the right tool for the job right now. (I haven't done this type of animation much personally, but I think that Blender's "grease pencil" tool might be a better fit for the way you like to animate.)

2. Krita has limited support for vector art and animation, but in my opinion it's not our strong point--we're much better at "traditional" raster art and animation right now. When I have the time to practice animation in Krita I generally don't bother trying to create animations that look like final 4K show/movie quality footage right away. As of now, animation in Krita works best when you emulate the traditional pen-and-paper method: loose pencil sketches first to get the motion right, then going through and cleaning up every frame and background, then compositing them all together into a cut which you then edit together into a bigger project. 

That's probably not what you want to hear, and in a perfect world I'd love to say that Krita works equally well for all kinds of animation, but the reality right now is that it may not be the best tool for every job and I strongly recommend either finding a different tool that better fits your style or adjusting your workflow to better fit Krita's strengths.

Hopefully at some point we can make significant improvements to vectors and transform masks so that animators like you (and I've seen quite a few) don't have to compromise.

Thanks again.
Emmet
Comment 10 seabassten10 2024-08-30 14:20:32 UTC
Np. I've been thinking about taking a break from 2d animation anyway. Gonna try and learn Blender sculpting finally. Anyways, keep up the good work! Krita's got the best workflow environment I've used.
Comment 11 Bug Janitor Service 2024-08-31 03:48:03 UTC
๐Ÿ›๐Ÿงน Thanks for your comment!

Automatically switching the status to REPORTED so the team can perform further triage.

In the future you may also do this yourself when providing needed information.
Comment 12 Dmitry Kazakov 2024-09-11 10:20:36 UTC
Hi, Seabassten!

Could you please try the Krita Next nightly build from this link?

https://cdn.kde.org/ci-builds/graphics/krita/master/linux/

I have fixed a releated bug yesterday, so it could theoretically fix your issue as well :)

PS:
This commit: 
https://invent.kde.org/graphics/krita/-/commit/1e0e095b69513d9a9d0a9b53c0512f50e3fc7977
Comment 13 Bug Janitor Service 2024-09-26 03:47:23 UTC
๐Ÿ›๐Ÿงน โš ๏ธ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 14 seabassten10 2024-09-29 03:52:00 UTC
(In reply to Dmitry Kazakov from comment #12)

Sorry for the long wait. I was busy fiddling with Blender. Anyway, the build is definitely faster than what was going on before. Haven't tried turning on progress reporting yet, but so far there have been no crashes and only one infinite image process hang.
Comment 15 Bug Janitor Service 2024-09-30 03:46:48 UTC
๐Ÿ›๐Ÿงน Thanks for your comment!

Automatically switching the status to REPORTED so the team can perform further triage.

In the future you may also do this yourself when providing needed information.