Bug 462761 - Krita sometimes segfaults when rendering an animation.
Summary: Krita sometimes segfaults when rendering an animation.
Status: RESOLVED WORKSFORME
Alias: None
Product: krita
Classification: Applications
Component: Animation (show other bugs)
Version: 5.1.3
Platform: Microsoft Windows Microsoft Windows
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-07 23:49 UTC by rebex80148
Modified: 2023-08-13 03:45 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Krash Log. (26.46 KB, text/plain)
2022-12-07 23:49 UTC, rebex80148
Details
GDBsegmentationfault (12.30 KB, text/plain)
2022-12-08 21:04 UTC, rebex80148
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rebex80148 2022-12-07 23:49:51 UTC
Created attachment 154412 [details]
Krash Log.

SUMMARY

STEPS TO REPRODUCE
(Only tested so far on Microsoft Windows. Not GNU/Linux or MacOS yet.
1. Open a new project.
2.  Draw two frames
3.  Render

OBSERVED RESULT
Krita crashes and quits silently with nothing messaging back from the OS after done rendering. The video still renders, but it simply quits/crashes after it's done. It rendered in my Pictures directory and I could still play it. I'm using ffmpeg from msys2 if that makes any difference. Because it's a Qt related crash, this might be difficult to figure out.

EXPECTED RESULT
To not crash.
Comment 1 rebex80148 2022-12-08 00:01:33 UTC
Just an update. I tested the same thing on Krita 5.0.0 for Microsoft Windows, it did not crash at all. It crashes on 5.1.3 however.
Comment 2 Emmet O'Neill 2022-12-08 03:58:38 UTC
Thanks for reporting and sorry that you ran into the bug. Hopefully you managed to get your work rendered eventually.

I'll take a look at trying to fix this one when I get time.
Emmet
Comment 3 Halla Rempt 2022-12-08 11:09:30 UTC
I cannot reproduce the crash on Windows 11 with a two frame animation, ffmpeg 5.1.2 and Krita 5.1.3, but since Emmet assigned himself to the issue, I'm setting the status to assigned.
Comment 4 rebex80148 2022-12-08 15:15:17 UTC
Halla, Emmet, I think a very important detail I forgot to mention was that the version from MSYS2 (Where I got ffmpeg) is at 4.4.3-3, NOT 5.1.2. I think an older version of ffmpeg is what could have caused it. If it's caused by 4.x, then it should be mentioned somewhere in the docs to NOT use anything older than 5.0.
Comment 5 rebex80148 2022-12-08 15:36:17 UTC
I'm pretty stumped why it was crashing earlier. It wants to work now. I'll take the assumption it's a very very situational bug that may be not possible to reproduce my circumstances I was in. The issues existed as noted in the attachment, but to replicate it? I have no idea.
Comment 6 rebex80148 2022-12-08 21:04:25 UTC
Created attachment 154445 [details]
GDBsegmentationfault

I decided to download the debug info and ran krita through gdb. It was very inconsistent, but I (sometimes) got a segmentation fault when rendering an animation. Sometimes it happened and sometimes it didn't. Either way, it's definitely something that happens for me.
Comment 7 Alvin Wong 2022-12-09 09:04:54 UTC
Let's see... if you want to get some useful information out of gdb, you should run the command `thread apply all bt` when stopped at the trap / fault, at least that's what applies usually. However, the debug output does indicate it is a heap use-after-free, so usual debugging techniques aren't going to be too useful.

I have an automated Krita build with ASan^ which would do a lot more to help diagnose this issue. You can get it from https://github.com/alvinhochun/krita-build/actions (select the latest build, then click on "krita-packages" under "Artifacts"; you need to be logged in.) If you manage to trigger the crash in it, there will be detailed log output in DebugView (krita.exe) or the console (krita.com). This can help pinpoint the actual error.

(If you want to try this, let's talk on IRC.)

^ ASan = address sanitizer, which is a tool to help catch memory errors such as use-after-free.
Comment 8 Dmitry Kazakov 2023-07-14 07:44:03 UTC
Hi, rebex80148!

Could you make a backtrace once again, but type 'bt' or 'backtrace' in the debugger when Krita actually crashes. Your log doesn't contain the backtrace I'm afraid :(
Comment 9 Bug Janitor Service 2023-07-29 03:44:55 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 10 Bug Janitor Service 2023-08-13 03:45:17 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!