After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 167139 - PSD save plugin can create corrupt files
PSD save plugin can create corrupt files
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Plugins
2.2.x
Other All
: Normal critical
: ---
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2005-02-12 01:46 UTC by Jay Cox
Modified: 2008-01-15 12:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jay Cox 2005-02-12 01:46:18 UTC
Please describe the problem:
The PSD save plugin  can create corrupt files on certain images.  This is triggered when the bottom 
most layer in an image has different dimentions than the image.  Applications only seem to notice that 
the file is corrupt when the image has extra channels.

Steps to reproduce:
1. Create an image where the bottom most layer has different dimentions than the image.
2. Add an extra channel to the image
3. Save as a psd
4. Try to open the file in photoshop or the gimp

Actual results:
The opening application fails to load the image claiming premature eof

Expected results:
The image should open

Does this happen every time?
yes

Other information:
I know exactly where the bug in the code is, but it will probably be several days before I get around to 
fixing it.
Comment 1 Jay Cox 2005-02-13 22:35:38 UTC
I just checked a fix for this bug (and #121871) into CVS.  Should it be
backported to the 2.2 stable version?
Comment 2 Sven Neumann 2005-02-13 22:56:50 UTC
Jay, that's up to you. If you think the change is simple enough or if you think
it fixes a major problem, please backport it.
Comment 3 Jay Cox 2005-02-14 08:09:22 UTC
While I tend to think file corruption is a pretty major bug, no one has reported
any in the two years that we have been using this code.  Unfortunatly the fix
for this bug is part of a large rewrite I did to fix bug #121871 which replaces
485 lines of code with 209 lines of code.

I would feel better about making such a large change to the stable version if we
could get a couple of people to stress test the new version of the plugin first.
 Any volunteers?
Comment 4 Maurits Rijk 2005-02-15 07:11:08 UTC
I'm not volunteering, but this points out the need of some kind of testing
framework. Would be nice to have a whole bunch of images in all kinds of formats
and let GIMP Open/Save them, compare them with expected results, etc.
Comment 5 Jay Cox 2005-03-02 07:38:39 UTC
Ive done some more testing myself and everything checks out.  Backported to the
2.2 stable branch.  Closing bug as fixed.