Bug 490995

Summary: Copying a layer twice to a second document crashes Krita
Product: [Applications] krita Reporter: Ralek Kolemios <info>
Component: Layer StackAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: crash    
Priority: NOR    
Version: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Ralek Kolemios 2024-07-29 19:28:44 UTC
If you copy and paste a layer twice into a new document, Krita immediately crashes with this in the log:

SAFE ASSERT (krita): "!nodes.isEmpty()" in file /builds/graphics/krita/libs/image/kis_layer_utils.cpp, line 1624
Segmentation fault (core dumped)

To reproduce:
- Create a document
- Create a new layer of any type, or use the default background layer
- Copy the layer
- Paste it into a second new document
- Delete the new pasted layer
- In the original document, copy the same layer again
- Paste it in the second document again
- Krita crashes to desktop

Weird things of note:
- The pasted layer must be deleted in between pastes or it won't crash
- It crashes for most (all?) layer types

0e92a775c0
Comment 1 Ralek Kolemios 2024-07-30 01:02:35 UTC

*** This bug has been marked as a duplicate of bug 490636 ***