Bug 457080 - Crash when cloning documents and adding a view for them.
Summary: Crash when cloning documents and adding a view for them.
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Scripting (show other bugs)
Version: 5.0.8
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-24 15:42 UTC by wolthera
Modified: 2022-07-26 12:25 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description wolthera 2022-07-24 15:42:09 UTC
SUMMARY

The following script keeps crashing because of a safe assert:

```

from krita import *

doc = Krita.instance().activeDocument()
newDoc = doc.clone()
Krita.instance().activeWindow().addView(newDoc)

```

I am testing this in the 5.1 beta 2 appimage, but the person who found this was in 5.0.8

The safe assert is:
SAFE ASSERT (krita): "!sanityCheckPointer.isValid()" in file /home/appimage/workspace/Krita_Nightly_Appimage_Build/krita/libs/ui/KisDocument.cpp, line 676
Comment 1 Dmitry Kazakov 2022-07-26 12:25:00 UTC
Git commit 2b1c570f36caa46c829e7d3abb747aa8bce8fbdf by Dmitry Kazakov.
Committed on 26/07/2022 at 12:24.
Pushed by dkazakov into branch 'master'.

Fix a crash when tring to clone document via Python plugin

M  +5    -2    libs/libkis/Document.cpp
M  +4    -9    plugins/dockers/advancedcolorselector/kis_color_selector_container.cpp

https://invent.kde.org/graphics/krita/commit/2b1c570f36caa46c829e7d3abb747aa8bce8fbdf
Comment 2 Dmitry Kazakov 2022-07-26 12:25:03 UTC
Git commit 578ee9e068a460c5944759c016073d34a3073802 by Dmitry Kazakov.
Committed on 26/07/2022 at 12:24.
Pushed by dkazakov into branch 'krita/5.1'.

Fix a crash when tring to clone document via Python plugin

M  +5    -2    libs/libkis/Document.cpp
M  +4    -9    plugins/dockers/advancedcolorselector/kis_color_selector_container.cpp

https://invent.kde.org/graphics/krita/commit/578ee9e068a460c5944759c016073d34a3073802