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 335130 - PSD plug-ins not 64bit safe
PSD plug-ins not 64bit safe
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Plugins
2.2.x
Other Linux
: Normal minor
: 2.4
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2006-03-19 16:32 UTC by Marc Price
Modified: 2008-01-15 13:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch as applied to HEAD branch (37.77 KB, patch)
2006-03-23 11:23 UTC, Sven Neumann
committed Details | Review

Description Marc Price 2006-03-19 16:32:57 UTC
Please describe the problem:
Opening '/home/marc/qsl-card.psd' failed:

Plug-In could not open image

You can create a PSD file using GIMP but once you save it then exit gimp, then
startup gimp again you cannot open the PSD again it gives the above error.

Steps to reproduce:
1. create psd save it 
2. exit gimp
3. startup gimp try to load the psd 


Actual results:
gimp fails to open the psd file 

Plug-In could not open image

Expected results:
Plug-In could not open image

Does this happen every time?
yes

Other information:
platform is gentoo linux 64 bit
Comment 1 Jay Cox 2006-03-20 07:36:02 UTC
Unfortunately the psd_save plugin is not 64bit safe.  Fortunately simply doing a s/gshort/gint16 and s/glong/gint32 should get us most of the way there.
Comment 2 Sven Neumann 2006-03-23 11:22:10 UTC
I've done this now in the HEAD branch and I am attaching the patch here for review. It should probably be merged into the 2.2 branch:

2006-03-23  Sven Neumann  <sven@gimp.org>

	* plug-ins/common/psd.c
	* plug-ins/common/psd_save.c: converted shorts to gint16 and longs
	to gint32 to fix 64bit problems as reported in bug #335130.
Comment 3 Sven Neumann 2006-03-23 11:23:15 UTC
Created attachment 61835 [details] [review]
patch as applied to HEAD branch
Comment 4 Sven Neumann 2006-03-24 14:36:57 UTC
Unfortunately this patch doesn't apply cleanly against the 2.2 branch. But I can do the same search-and-replace thing on the plug-ins in the 2.2 branch if someone confirms that it actually fixes the problem.
Comment 5 Sven Neumann 2006-03-28 15:42:13 UTC
can someone with a 64bit system please test the PSD plug-ins in the HEAD branch. Thanks...
Comment 6 Marc Price 2006-03-28 17:35:03 UTC
If there was a way for me to test it i would, currently someone would have to update gimp in gentoo portage for me to try it as im not a developer.

If its as easy as replacing a file send me the file and tell me where to put it.


Marc :)
Comment 7 Sven Neumann 2006-03-28 18:50:17 UTC
If you have a GIMP 2.3 tree, you could grab the files psd.c and psd_save.c from http://cvs.gnome.org/viewcvs/gimp/plug-ins/common/
Comment 8 Sven Neumann 2006-04-25 10:32:56 UTC
The changes are in the 2.3.8 release, so please download that version and give it some testing.
Comment 9 Sven Neumann 2006-06-01 10:56:06 UTC
Closing as FIXED then. There is obviously not much interest in seeing these changes backported to the 2.2 tree.