Bug 410668 - Internal Error SAFE ASSERT (krita): "!sanityCheckPointer.isValid()" in KisDocument.cpp line 545
Summary: Internal Error SAFE ASSERT (krita): "!sanityCheckPointer.isValid()" in KisDoc...
Status: RESOLVED WORKSFORME
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-06 19:13 UTC by Tyson Tan
Modified: 2020-05-06 10:57 UTC (History)
1 user (show)

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


Attachments
Krita internal error (1.28 MB, image/png)
2019-08-06 19:13 UTC, Tyson Tan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tyson Tan 2019-08-06 19:13:50 UTC
Created attachment 121977 [details]
Krita internal error

Krita crashed when I was editing 2 files and closed one of them. Showing messages like:

Krita: Internal Error
Krita has encountered an internal error:
SAFE ASSERT (krita): "!sanityCheckPointer.isValid()" in file ......KisDocument.cpp, line 545

Clicked Ignore and this message kept popping up. Clicked Abort then Krita crashed silently.

This type of crashes has been happening from time to time and they are responsible for roughly 50% of my data loss using Krita. (The other 50% were caused by Crop/Transform)

I notice a pattern:
1) They only happened when multiple documents are opened in the same session;
2) Contents were copied from the 2nd document to the 1st one;
3) If Krita considers the 2nd document changed (something has to be selected before copying), the "change" was never saved before the error occurred;
4) Error happened either when switching between document tabs, or while saving, or closing the one of them.

Yesterday this error happened to me again and the situation was like:
1) All Krita settings were just deleted minutes ago, 4.2.5 appimage was integrated and used first, only shortcuts were customized, then I removed 4.2.5 and integraed 4.3.0-prealpha (gitb7872b8);
2) I created a new document in that session;
3) I opened an existed document later that session, selected a text shape; pressed Ctrl+C to copy and Ctrl+V to paste it into the first document;
4) I continued to edit in the first document for awhile;
5) I closed the first document, the error occurred. When it happened, the text shape was still selected in the second document.

Hopefully we can hunt this error down someday.
Comment 1 Halla Rempt 2019-08-10 09:16:21 UTC
I haven't been able to reproduce this, I'm afraid. The 5.2.5 appimage should have these warning popups disabled, actually.
Comment 2 Tyson Tan 2019-08-12 09:13:36 UTC
I use nightly versions a lot, so that could be the case.

(In reply to Boudewijn Rempt from comment #1)
> I haven't been able to reproduce this, I'm afraid. The 5.2.5 appimage should
> have these warning popups disabled, actually.
Comment 3 Halla Rempt 2019-08-12 09:17:42 UTC
Ah, yes, they are enabled in the nightlies.
Comment 4 Dmitry Kazakov 2020-05-06 10:42:45 UTC
Hi, Tyson!

I didn't manage to reproduce the bug in the modern builds. I guess I have fixed that in the meantime, when making shapes rendering multithreaded.

If you see this bug either in master (Krita 5.0)  or in krita/4.3, please reopen that :)
Comment 5 Tyson Tan 2020-05-06 10:57:42 UTC
(In reply to Dmitry Kazakov from comment #4)
> Hi, Tyson!
> 
> I didn't manage to reproduce the bug in the modern builds. I guess I have
> fixed that in the meantime, when making shapes rendering multithreaded.
> 
> If you see this bug either in master (Krita 5.0)  or in krita/4.3, please
> reopen that :)

Hi, Dmitry! It was perhaps only happening at that point. I haven't seen this bug for a long while now, so it must have been fixed. Thank you and feel free to mark it as fixed! :D