Bug 390584 - Opening a .psd, then saving as .psd, then opening file again creates internal error
Summary: Opening a .psd, then saving as .psd, then opening file again creates internal...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: File formats (show other bugs)
Version: 3.3.3
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords: triaged
: 366343 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-02-16 20:59 UTC by Peter Mueller
Modified: 2018-02-20 21:39 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Example psd which crashes after save and open (40 bytes, text/plain)
2018-02-16 21:13 UTC, Peter Mueller
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Mueller 2018-02-16 20:59:22 UTC
Good day,

with the attached file: Open in krita, then save (no changes). Then trying to open the file again leads to internal error.

I'm on Windows 10, 64bit. Let me know, if you need more info.

BR

Peter
Comment 1 Peter Mueller 2018-02-16 21:13:52 UTC
Created attachment 110734 [details]
Example psd which crashes after save and open

My steps:

(1) Start Krita and open this file
(2) Save-as <new>.psd
(3) Close Krita.
(4) Start Krita and open <new>.psd leads to internal error
Comment 2 Peter Mueller 2018-02-16 22:10:42 UTC
Just found out, that the problem comes with having layers in the .psd which have an empty name. When you load the provided image, all layer names are blank. It works, if you give every layer a name.

Hope this helps. Seems that writing cannot cope with layers with no name.

BR

Peter
Comment 3 Halla Rempt 2018-02-17 12:45:38 UTC
Hi Peter,

I can confirm the issue.
Comment 4 Halla Rempt 2018-02-17 13:27:20 UTC
*** Bug 366343 has been marked as a duplicate of this bug. ***
Comment 5 Halla Rempt 2018-02-20 07:12:03 UTC
Looks like I cannot create layers with an empty name in Photoshop itself...
Comment 6 Halla Rempt 2018-02-20 07:12:45 UTC
Or Gimp...
Comment 7 Halla Rempt 2018-02-20 07:18:29 UTC
Git commit 4c31962dd75f0087824ce4c0eace5cabfc0d2098 by Boudewijn Rempt.
Committed on 20/02/2018 at 07:17.
Pushed by rempt into branch 'master'.

PSD: save layers with an empty name as "Unnamed Layer"

Photoshop does not support layers with no names; you cannot
even create them in Photoshop. Saving layers to PSD with an
empty name results in an invalid PSD file, so subsitute
"Unnamed Layer".

M  +1    -1    plugins/impex/psd/psd_layer_section.cpp

https://commits.kde.org/krita/4c31962dd75f0087824ce4c0eace5cabfc0d2098
Comment 8 Peter Mueller 2018-02-20 21:39:53 UTC
Thanks for the prompt reply. I've also raised a respective issue to the author of the App which produced these .psd files. So issue is addressed on both sides: krita is made more robust, artflow (the other app) is made more correct :-)

Best Regards

Peter