Summary: | Krita crashes when an image used in a File Layer is updated outside of Krita | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | Ragnar Brynjúlsson <ragtag> |
Component: | Layer Stack | Assignee: | Dmitry Kazakov <dimula73> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | dimula73, ragtag, sven.langkamp |
Priority: | NOR | ||
Version: | git master (please specify the git hash!) | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/krita/40a1a0c0999a20744ae08244df10b679f172b724 | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: | File Layer bug GDB output |
Description
Ragnar Brynjúlsson
2013-10-06 01:11:39 UTC
Did you get a backtrace? Created attachment 82695 [details]
File Layer bug GDB output
I've attached the output from the terminal and gdb.
It seems like Krita starts reading the image in, before Gimp has finished writing it to disk.
This second test I did with Krita 2.7.3, using both .png and .jpg files, and both Gimp, Blender and another instance of Krita to save the image outside of Krita.
I have a very dirty patch for it. Now I just need to implement it cleanly and it'll work :) Git commit e4fc9d4ee891b075a1c70f06d7fce3ebbb59982f by Dmitry Kazakov. Committed on 17/12/2013 at 09:47. Pushed by dkazakov into branch 'master'. Fixed a concurrent File Layer source image change Now when the source image is changed we use an iterational algorithm which is usually applied to a SeqLock problem: 1) Save the size and lastModified tag of the image 2) Copy the image to the temporary directory 3) Check whether the image has changed during the copy operation 4) If everything is ok load the image from a temporary copy. If not, restart. M +1 -0 krita/ui/CMakeLists.txt M +14 -24 krita/ui/kis_file_layer.cpp M +3 -10 krita/ui/kis_file_layer.h A +172 -0 krita/ui/kis_safe_document_loader.cpp [License: GPL (v2+)] A +53 -0 krita/ui/kis_safe_document_loader.h [License: GPL (v2+)] http://commits.kde.org/calligra/e4fc9d4ee891b075a1c70f06d7fce3ebbb59982f Git commit 0e5a207a3d301860a5802d17a61ce9c4f5628790 by Boudewijn Rempt, on behalf of Dmitry Kazakov. Committed on 17/12/2013 at 09:47. Pushed by rempt into branch 'calligra/2.8'. Fixed a concurrent File Layer source image change Now when the source image is changed we use an iterational algorithm which is usually applied to a SeqLock problem: 1) Save the size and lastModified tag of the image 2) Copy the image to the temporary directory 3) Check whether the image has changed during the copy operation 4) If everything is ok load the image from a temporary copy. If not, restart. Conflicts: krita/ui/kis_file_layer.cpp M +1 -0 krita/ui/CMakeLists.txt M +13 -22 krita/ui/kis_file_layer.cpp M +3 -10 krita/ui/kis_file_layer.h A +172 -0 krita/ui/kis_safe_document_loader.cpp [License: GPL (v2+)] A +53 -0 krita/ui/kis_safe_document_loader.h [License: GPL (v2+)] http://commits.kde.org/calligra/0e5a207a3d301860a5802d17a61ce9c4f5628790 Git commit 6828f33fe3e92fd4ca151bd44ce1886118d01ed6 by Boudewijn Rempt. Committed on 05/06/2018 at 14:32. Pushed by rempt into branch 'krita/4.0'. Do not allow .kra files as file layers Nesting .kra files is dangerous, since a .kra file can contain file layers itself, which is not supported. Related: bug 386515, bug 394211 M +4 -1 libs/ui/dialogs/kis_dlg_file_layer.cpp https://commits.kde.org/krita/6828f33fe3e92fd4ca151bd44ce1886118d01ed6 Git commit 40a1a0c0999a20744ae08244df10b679f172b724 by Boudewijn Rempt. Committed on 05/06/2018 at 14:33. Pushed by rempt into branch 'master'. Do not allow .kra files as file layers Nesting .kra files is dangerous, since a .kra file can contain file layers itself, which is not supported. Related: bug 386515, bug 394211 (cherry picked from commit 6828f33fe3e92fd4ca151bd44ce1886118d01ed6) M +4 -1 libs/ui/dialogs/kis_dlg_file_layer.cpp https://commits.kde.org/krita/40a1a0c0999a20744ae08244df10b679f172b724 |