A file that I have been working on now causes Krita to crash when attempting to open it from within the application as well as trying to open it via Windows Explorer. The .kra~ has the same issue. Reproducible: Couldn't Reproduce
Hi! Can you please attach the file to the bug?
Probably, it was the recent openGL issue, which is fixed in master... Yes, we need the file to test it.
The file is linked above under URL.
I added a link to the files location in the bug because I didn't see how to attach it. I will attach it now.
Ah....
And I can confirm the crash....
Hm... There are three clone layers in the file, all of them referring to a layer no longer seems to exist. I'm not sure how Krita could have gotten in that state.
Created attachment 83563 [details] This is the file with the clone layers stripped out -- it at least opens now.
Thanks, I really appreciate the save! I will be sure to keep an eye out for this problem in the future.
You're welcome. I'm really sorry about the problems (and I'm a bit worried that I cannot figure out how krita could've gotten into this state...) I think we need a kind of sanity checker on save and an load...
I looked into the resulting XML file and it looks like the UUID of the clone layer sources are handled somehow wrongly. That is the source of the clones exist in the image, the clone has correct 'clonefrom' value, but 'clonefromuuid' is incorrect. Such situation might be caused either by the bug in the saving code, or some non-synchronized updates of the UUIDs when moving/creating/renaming. The relevant piece of XML: <layer opacity="194" x="115" nodetype="clonelayer" y="110" clonefrom="Skull" visible="1" collapsed="0" compositeop="overlay" locked="0" uuid="{5b873ac9-2873-4220-97f9-3b02622e6443}" name="Skull2" clonefromuuid="{c8eafad2-01fa-4efd-977b-651d03fb1019}" clonetype="0" filename="layer30" channelflags=""/> <layer opacity="82" x="106" channellockflags="1111" nodetype="paintlayer" y="101" colorspacename="RGBA" visible="1" collapsed="0" compositeop="normal" locked="0" uuid="{298953d9-6b84-44d5-a4c8-403e02195abe}" name="Skull" filename="layer31" channelflags="1111"/> You can see that the relevant source layer exists, but has different uuid.
Ok, I've managed to reproduce this bug. There are two actually: 1st bug: 1) Create a Group Layer, add a Paint Layer into it 2) Create a Clone of a Paint Layer and move it outside of the Group 3) Remove the Group Layer (the paint layer will be removed transitively) Now the Clone Layer points to nothing (technically, to the layer still stored in the undo information). The file can be saved, but will fail to open, obviously. 2nd bug: 1) Create a Group Layer. Add a Paint Layer and a clone to it. 2) Group Layer -> Duplicate Layer or Mask The clone in the newly created Group Layer will point to the source in the old Group Layer, which is actually not what we wanted to achieve. And due to the Bug1 deletion of the first Group will break clones of the second group.
I'll try to fix it.
Git commit 18140e5b26e6532f51ffdb459f1b0e426ec80c94 by Dmitry Kazakov. Committed on 27/11/2013 at 21:33. Pushed by dkazakov into branch 'master'. Fixed bugs in transitive reincarnation of the Clone Layers This patch fixes two problems: 1) The Duplicate of a Group Layer will reset links inside internal Clone Layers properly. 2) The removal of a group layer will reincarnate all the clone layers which were connected to the descendants of that layer. M +1 -0 krita/image/CMakeLists.txt M +3 -3 krita/image/commands/kis_image_command.cpp M +1 -1 krita/image/commands/kis_image_command.h M +20 -91 krita/image/commands/kis_image_layer_remove_command.cpp M +10 -23 krita/image/commands/kis_image_layer_remove_command.h C +38 -32 krita/image/commands/kis_image_layer_remove_command_impl.cpp [from: krita/image/commands/kis_image_layer_remove_command.cpp - 055% similarity] C +7 -12 krita/image/commands/kis_image_layer_remove_command_impl.h [from: krita/image/commands/kis_image_layer_remove_command.h - 071% similarity] M +72 -1 krita/image/kis_node.cpp M +86 -0 krita/image/tests/kis_clone_layer_test.cpp M +4 -0 krita/image/tests/kis_clone_layer_test.h M +2 -9 krita/sdk/tests/qimage_based_test.h M +12 -0 krita/sdk/tests/testutil.h M +1 -1 krita/ui/kra/kis_kra_loader.cpp http://commits.kde.org/calligra/18140e5b26e6532f51ffdb459f1b0e426ec80c94