Summary: | krita quits opening a specific psd file created with photopea. | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | Emmanuelpoirier34 |
Component: | File formats | Assignee: | amyspark <amy> |
Status: | RESOLVED FIXED | ||
Severity: | critical | CC: | amy, dimula73, ivan.kuckir |
Priority: | NOR | ||
Version: | 5.1.5 | ||
Target Milestone: | --- | ||
Platform: | Microsoft Windows | ||
OS: | Microsoft Windows | ||
Latest Commit: | https://invent.kde.org/graphics/krita/commit/8e83efca125a263dc993cf92e89c290f9339efe3 | Version Fixed In: | |
Bug Depends on: | 441605 | ||
Bug Blocks: | |||
Attachments: |
crashing_psd_on_krita.psd
lucasarts-scumm-outline.zip |
Description
Emmanuelpoirier34
2023-01-23 15:39:27 UTC
Hi, Emmanual! Could you please share the file that fails? The crash happens on the layer that has a "Stroke" layer style with the pattern applied to it. You can modify the file to keep only this specific layer, if the file is private. Hi! Please sends us the file (or just the layer, as Dmitry said) and I'll take a look into it. Could you also install DebugView (https://learn.microsoft.com/en-us/sysinternals/downloads/debugview) and see if Krita prints this warning in it when loading that file? "WARNING: failed to parse KisPatternData XML section!" If yes, then the problem is with the pattern compression format Created attachment 155675 [details] crashing_psd_on_krita.psd Hi All, did you get the file? It was in the archive. I add it here for convenience. Regards E. On 1/23/2023 4:07 PM, Dmitry Kazakov wrote: > https://bugs.kde.org/show_bug.cgi?id=464700 > > --- Comment #3 from Dmitry Kazakov <dimula73@gmail.com> --- > Could you also install DebugView > (https://learn.microsoft.com/en-us/sysinternals/downloads/debugview) and see if > Krita prints this warning in it when loading that file? > > "WARNING: failed to parse KisPatternData XML section!" > > If yes, then the problem is with the pattern compression format > Created attachment 155676 [details] lucasarts-scumm-outline.zip Hi again, the text entered is using the font I attached so you can test if it´s coming from the font. Regards E. On 1/26/2023 6:39 PM, emmanuel poirier wrote: > Hi All, > > did you get the file? It was in the archive. > > I add it here for convenience. > > Regards > > E. > > > On 1/23/2023 4:07 PM, Dmitry Kazakov wrote: >> https://bugs.kde.org/show_bug.cgi?id=464700 >> >> --- Comment #3 from Dmitry Kazakov <dimula73@gmail.com> --- >> Could you also install DebugView >> (https://learn.microsoft.com/en-us/sysinternals/downloads/debugview) >> and see if >> Krita prints this warning in it when loading that file? >> >> "WARNING: failed to parse KisPatternData XML section!" >> >> If yes, then the problem is with the pattern compression format >> > On 1/23/2023 4:07 PM, Dmitry Kazakov wrote: > https://bugs.kde.org/show_bug.cgi?id=464700 > > --- Comment #3 from Dmitry Kazakov <dimula73@gmail.com> --- > Could you also install DebugView > (https://learn.microsoft.com/en-us/sysinternals/downloads/debugview) and see if > Krita prints this warning in it when loading that file? > > "WARNING: failed to parse KisPatternData XML section!" > > If yes, then the problem is with the pattern compression format > Hi Dmitry, krita shows nothing with debugview launched. I attached the log generated. Crash occurred around 10:28 PM on 26/1/22. I found another file which produces a crash but as I can't say if it's the same cause, I'll send it into another email with a note to differentiate. Regards E. On 1/23/2023 4:07 PM, Dmitry Kazakov wrote: > https://bugs.kde.org/show_bug.cgi?id=464700 > > --- Comment #3 from Dmitry Kazakov <dimula73@gmail.com> --- > Could you also install DebugView > (https://learn.microsoft.com/en-us/sysinternals/downloads/debugview) and see if > Krita prints this warning in it when loading that file? > > "WARNING: failed to parse KisPatternData XML section!" > > If yes, then the problem is with the pattern compression format > File made it in one piece from the looks of Bugzilla. Let's see what's inside... Can confirm the crash happens here. After adding an early return to work around it, I get the following warnings: krita.general: Unhandled: "/null/FrFX/overprint" class QHash<class QString,class std::function<void __cdecl(bool)> > false krita.general: WARNING: ASL style contains non-existent pattern reference! Searching for uuid: "c7acb22a-47a6-11de-919a-bf574370eaaf" (name: "Default/orangeslices" ) krita.general: convertAndSetBlendMode: Curve conversion is not implemented yet krita.general: Unhandled: "/null/DrSh/Cntn" class QHash<class QString,class std::function<void __cdecl(bool)> > false SAFE ASSERT (krita): "!localResources.contains(KoResourceSP())" in file E:\krita-win\src\libs\resources\KisLocalStrokeResources.cpp, line 79 The "Unhandled" warnings refer to your use of drop shadows in the layer, we don't support those yet. But moving past that, this looks like the Photoshop file is incomplete. The layer references a missing pattern, which causes Krita to insert a null pattern into the list, then remove it, and finally access it outright. Digging further into this. So upon further checking, the "invalid" placeholder pattern we inject for these cases triggers the counterpart of bug 441605: these patterns were never pushed into the global resource server on layer style read completion. Pushing a hotfix in a few moments. Git commit 973acffa8a24c640e3a3c95007f99dfe4b4f5f48 by L. E. Segovia. Committed on 28/01/2023 at 01:29. Pushed by lsegovia into branch 'master'. KisAslLayerStyleSerializer: fix layer-local patterns This is the counterpart of bug 441605, we only found this one out because in 464700 Wolthera injects a placeholder pattern, which in turn was never put into global storage. For the sake of completionism, I've added several safe asserts in the path that the nullptr makes, so that we get breakpointable warnings for missing resources in the future. Related: bug 441605 CCMAIL:dimula73@gmail.com CCMAIL:tamtamy.tymona@gmail.com M +15 -5 libs/image/kis_asl_layer_style_serializer.cpp M +2 -0 libs/image/layerstyles/kis_ls_utils.cpp M +5 -0 libs/resources/KisLocalStrokeResources.cpp M +6 -0 libs/resources/KisRequiredResourcesOperators.cpp M +1 -0 libs/resources/KoResourceLoadResult.cpp M +8 -0 plugins/impex/psd/psd_loader.cpp https://invent.kde.org/graphics/krita/commit/973acffa8a24c640e3a3c95007f99dfe4b4f5f48 Git commit 8e83efca125a263dc993cf92e89c290f9339efe3 by L. E. Segovia. Committed on 28/01/2023 at 01:31. Pushed by lsegovia into branch 'krita/5.1'. KisAslLayerStyleSerializer: fix layer-local patterns This is the counterpart of bug 441605, we only found this one out because in 464700 Wolthera injects a placeholder pattern, which in turn was never put into global storage. For the sake of completionism, I've added several safe asserts in the path that the nullptr makes, so that we get breakpointable warnings for missing resources in the future. Related: bug 441605 CCMAIL:dimula73@gmail.com CCMAIL:tamtamy.tymona@gmail.com (cherry picked from commit 973acffa8a24c640e3a3c95007f99dfe4b4f5f48) M +15 -5 libs/image/kis_asl_layer_style_serializer.cpp M +2 -0 libs/image/layerstyles/kis_ls_utils.cpp M +5 -0 libs/resources/KisLocalStrokeResources.cpp M +6 -0 libs/resources/KisRequiredResourcesOperators.cpp M +1 -0 libs/resources/KoResourceLoadResult.cpp M +8 -0 plugins/impex/psd/psd_loader.cpp https://invent.kde.org/graphics/krita/commit/8e83efca125a263dc993cf92e89c290f9339efe3 The file should load now. For the missing pattern, it would be great if you could report it to the authors of Photopea; we cannot supply the patterns that come by default with Photoshop. Let us know if you find any more issues, and thanks for reporting this crash! Hi guys, I am a creator of Photopea and I have fixed the issue with producing PSD files without a default pattern. This issue says that you have fixed it, however, it is not clear to me how can I test it. I have downloaded Krita 5.1.5, but the PSD file attached here still makes Krita crash. Hi Ivan! We have Krita Plus for that. Please check out https://krita.org/en/download/krita-desktop/ and select your system from the list in "Nightly Builds". |