Bug 493830

Summary: Krita freezes when trying to save a removed layer in a folder
Product: [Applications] krita Reporter: Bogdan Costisor <bogdancostisor>
Component: Layer StackAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: major CC: penguinflyer2222
Priority: NOR    
Version: 5.2.5   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: File with problem

Description Bogdan Costisor 2024-09-29 13:08:25 UTC
Created attachment 174202 [details]
File with problem

SUMMARY
It looks like Krita has some issues with trying to remove or move a layer inside a folder. After removing a layer and trying to save I get a "Remove Node" message that seems to never end.
I've attached a file for testing where I reproduce 100% all the time.

STEPS TO REPRODUCE
1. Open the attached file
2. Try to remove layer "Ivy Angles" (the one that is hidden)
3. Save 

OBSERVED RESULT
Krita displays a message "Waiting for operation to complete..." and in the middle of the message box "Remove Nodes" is displayed. At this stage, nothing can be done.

EXPECTED RESULT
Save The file

SOFTWARE/OS VERSIONS
Windows: Windows 11

ADDITIONAL INFORMATION
I'm using the following plugins: Shortcut composer v1.5.4
Comment 1 Freya Lupen 2024-09-29 13:57:04 UTC
It only happens in the attached file when the group has passthrough enabled and the vector layer above it isn't removed. It appears to have the same cause as bug 493774 (layer in a passthrough group with an unusual layer above it gets stuck in an infinite loop in KisImage::refreshGraphAsync), so I'm marking this report as a duplicate of that one.

*** This bug has been marked as a duplicate of bug 493774 ***
Comment 2 Bogdan Costisor 2024-09-29 17:16:38 UTC
Thank you for the workaround. If I disable passthrough temporarily I can save :)
Comment 3 Dmitry Kazakov 2024-09-30 09:07:39 UTC
Git commit dcaf7fe2abf349dad8f5ba625060f979b3a26c8e by Dmitry Kazakov.
Committed on 30/09/2024 at 09:07.
Pushed by dkazakov into branch 'master'.

Fix stupid infinite loop when trying to update pass-through nodes
Related: bug 493774, bug 493837

M  +4    -4    libs/image/kis_image.cc

https://invent.kde.org/graphics/krita/-/commit/dcaf7fe2abf349dad8f5ba625060f979b3a26c8e
Comment 4 Dmitry Kazakov 2024-09-30 09:09:00 UTC
Git commit 7d1c63c3169cbd474272f2eb7cc17707f9ef266b by Dmitry Kazakov.
Committed on 30/09/2024 at 09:08.
Pushed by dkazakov into branch 'krita/5.2'.

Fix stupid infinite loop when trying to update pass-through nodes
Related: bug 493774, bug 493837

M  +4    -4    libs/image/kis_image.cc

https://invent.kde.org/graphics/krita/-/commit/7d1c63c3169cbd474272f2eb7cc17707f9ef266b
Comment 5 Dmitry Kazakov 2024-09-30 09:09:42 UTC
Git commit 206214621b4a416ca92808cf8f04dd372912ef68 by Dmitry Kazakov.
Committed on 30/09/2024 at 09:09.
Pushed by dkazakov into branch 'release/5.2.5'.

Fix stupid infinite loop when trying to update pass-through nodes
Related: bug 493774, bug 493837

M  +4    -4    libs/image/kis_image.cc

https://invent.kde.org/graphics/krita/-/commit/206214621b4a416ca92808cf8f04dd372912ef68