Page 1 of 1

convert.exe: Memory allocation failed with GIF files in G2

Posted: 2007-12-12T13:05:01-07:00
by gecko
Greetings everyone!

I'm really hoping to get some assistance here. I'm running gallery2 and am having a problem with gif files not processing. The debug window of Gallery2 when creating thumbnails says:

Code: Select all

chdir(C:\Inetpub\wwwroot2\gallery.biggexpress.com\g2data\tmp\)
Executing: cmd /c " "c:\Program Files
(x86)\ImageMagick-6.3.7-Q16\convert.exe"  "-coalesce" 
"C:\Inetpub\wwwroot2\gallery.biggexpress.com\g2data\albums\Customer
Locations\map_officeLocationFull3_jpg.gif"  "-size"  "150x150"  "-geometry"
 "150x150"  "-strip"  "-deconstruct" 
"C:\Inetpub\wwwroot2\gallery.biggexpress.com\g2data\tmp\img2F30.tmp"  2>
"C:\Inetpub\wwwroot2\gallery.biggexpress.com\g2data\tmp\g2d2F31.tmp" "
getParameter exec.expectedStatus for core plugin
file_exists(C:\Inetpub\wwwroot2\gallery.biggexpress.com\g2data\tmp\g2d2F31.tmp)
filesize(C:\Inetpub\wwwroot2\gallery.biggexpress.com\g2data\tmp\g2d2F31.tmp)
fopen(C:\Inetpub\wwwroot2\gallery.biggexpress.com\g2data\tmp\g2d2F31.tmp,
r, 0)
feof(Resource id #690)
fgets(Resource id #690, 4096)
feof(Resource id #690)
fgets(Resource id #690, 4096)
feof(Resource id #690)
fclose(Resource id #690)
unlink(C:\Inetpub\wwwroot2\gallery.biggexpress.com\g2data\tmp\g2d2F31.tmp)
Regular Output:
Error Output:
convert.exe: Memory allocation failed
`C:\Inetpub\wwwroot2\gallery.biggexpress.com\g2data\albums\Customer
Locations\map_officeLocationFull3_jpg.gif'.
Status: 1 (expected 0)
unlink(C:\Inetpub\wwwroot2\gallery.biggexpress.com\g2data\tmp\img2F30.tmp)
chdir(C:\Inetpub\wwwroot2\gallery.biggexpress.com)
realpath(C:\Inetpub\wwwroot2\gallery.biggexpress.com\modules\core\classes/../../../)
realpath(C:\Inetpub\wwwroot2\gallery.biggexpress.com/)

Error (ERROR_TOOLKIT_FAILURE)in
C:\Inetpub\wwwroot2\gallery.biggexpress.com\modules\imagemagick\classes\ImageMagickToolkit.class
at line 620 (GalleryCoreApi::error) 
I've picked the command out manually and have run it:

Code: Select all

c:\Inetpub\wwwroot2\gallery.biggexpress.com\g2data\tmp>"c:\Program Files (x86)\ImageMagick-6.3.7-Q8\convert.exe"  "-coalesce" "C:\Inetpub\wwwroot2\gallery.biggexpress.com\g2data\albums\Customer Locations\map_officeLocationFull3_jpg.gif"  "-size"  "150x150"  "-geometry" "150x150"  "-strip"  "-deconstruct" "C:\Inetpub\wwwroot2\gallery.biggexpress.com\g2data\tmp\img2DB1.tmp"  2> "C:\Inetpub\wwwroot2\gallery.biggexpress.com\g2data\tmp\g2d2DB2.tmp" "
The same error occurs and is stored in one of those .tmp files that is created. With that said, it can't be a Gallery2 problem. I'm running this on Win2k3 x64 with ImageMagick-6.3.7-Q16

Please help!

Thanks,
Ryan

Re: convert.exe: Memory allocation failed with GIF files in G2

Posted: 2007-12-12T14:13:08-07:00
by Bonzo
It may be a memory limit ?
http://gallery.menalto.com/node/64381

Try with a smaller file ?

Re: convert.exe: Memory allocation failed with GIF files in G2

Posted: 2007-12-12T14:27:23-07:00
by gecko
Running the code on one instance manually from the command line yields the same problem:

From the dos prompt I paste in:

Code: Select all

c:\Inetpub\wwwroot2\gallery.biggexpress.com\g2data\tmp>"c:\Program Files (x86)\ImageMagick-6.3.7-Q8\convert.exe"  "-coalesce" "C:\Inetpub\wwwroot2\gallery.biggexpress.com\g2data\albums\Customer Locations\map_officeLocationFull3_jpg.gif"  "-size"  "150x150"  "-geometry" "150x150"  "-strip"  "-deconstruct" "C:\Inetpub\wwwroot2\gallery.biggexpress.com\g2data\tmp\img2DB1.tmp"  2> "C:\Inetpub\wwwroot2\gallery.biggexpress.com\g2data\tmp\g2d2DB2.tmp" "

The same error appears as text in one of the temp files:

Code: Select all

convert.exe: Memory allocation failed `C:\Inetpub\wwwroot2\gallery.biggexpress.com\g2data\albums\Customer Locations\map_officeLocationFull3_jpg.gif'.
Thus it really doesn't have anything to do with Gallery if I get the same error running that command at the dos prompt.This happens on ALL GIF files. The file I'm testing with though is 23KB. The system is a quad core 2.4ghz with 2 gb of ram.

Thoughts?

Re: convert.exe: Memory allocation failed with GIF files in G2

Posted: 2007-12-12T14:47:48-07:00
by gecko
Here is a simplified output by using the same command syntax that G2 uses:


C:\Program Files (x86)\ImageMagick-6.3.7-Q16>"c:\Program Files (x86)\ImageMagick
-6.3.7-Q16\convert.exe" "-coalesce" "C:\temp\map_officeLocationFull3_jpg.gif"
"-size" "150x150" "-geometry" "150x150" "-strip" "-deconstruct" "C:\temp\img
2DB1.gif"

convert.exe: Memory allocation failed `C:\temp\map_officeLocationFull3_jpg.gif'.


I get the error... but the gif file is actually created and works. However because of the error returned... G2 errors out on that and all gif images.

Why the memory allocation error if the file is created?

Re: convert.exe: Memory allocation failed with GIF files in G2

Posted: 2007-12-12T15:02:08-07:00
by magick
From the command line substitute 'logo:' for "C:\temp\map_officeLocationFull3_jpg.gif". Next, try your original command but add '-limit memory 1 -limit map 1' as the first option on your command line. If this command fails, post a URL to your image so we can download and inspect it.

Re: convert.exe: Memory allocation failed with GIF files in G2

Posted: 2007-12-12T15:26:08-07:00
by gecko

Code: Select all

C:\temp>"c:\Program Files (x86)\ImageMagick-6.3.7-Q16\convert.exe"  "-coalesce" "logo:"  "-size"  "150x150"  "-geometry" "150x150"  "-strip"  "-deconstruct" "C:\temp\img2DB1.gif"

convert.exe: Memory allocation failed `LOGO'.

And on the next think you asked me to try...

Code: Select all

C:\temp>"c:\Program Files (x86)\ImageMagick-6.3.7-Q16\convert.exe"  "-limit memory 1" "-limit map 1" "-coalesce" "C:\temp\map_officeLocationFull3_jpg.gif"  "-size" "150x150"  "-geometry" "150x150"  "-strip"  "-deconstruct" "C:\temp\img2DB1.gif"

convert.exe: unrecognized option `-limit memory 1'.
 

My image can be found at http://12.153.17.200/map_officeLocationFull3_jpg.gif But this same error happens with all GIF documents I try to pass it. I'm having no issues with JPG's.


Here is another file I tried:

Code: Select all

C:\temp>"c:\Program Files (x86)\ImageMagick-6.3.7-Q16\convert.exe" "-coalesce" "C:\temp\Ruble UpChurch.gif"  "-size"  "150x150"  "-geometry" "150x150"  "-strip"  "-deconstruct" "C:\temp\img2DB1.gif"

convert.exe: Memory allocation failed `C:\temp\Ruble UpChurch.gif'.
That file can also be found at: http://12.153.17.200/Ruble%20UpChurch.gif


The funny thing is that it actually does create that little thumbnail http://12.153.17.200/img2DB1.gif So... I don't know what the error is for thus causing gallery to error out. :(

Thanks,
Ryan

Re: convert.exe: Memory allocation failed with GIF files in G2

Posted: 2007-12-13T06:52:10-07:00
by gecko
magick, anything yet? My hopes are high. ;)

Re: convert.exe: Memory allocation failed with GIF files in G2

Posted: 2007-12-13T07:30:19-07:00
by magick
Grab ImageMagick 6.3.7-4, the latest release. The problem you reported should be resolved.

Re: convert.exe: Memory allocation failed with GIF files in G2

Posted: 2007-12-13T11:54:19-07:00
by gecko
Any chance it will be in binary form any time soon?

Thanks,
Ryan

Re: convert.exe: Memory allocation failed with GIF files in G2

Posted: 2007-12-13T11:56:08-07:00
by magick
ImageMagick 6.3.7-4 is in binary form now.

Re: convert.exe: Memory allocation failed with GIF files in G2

Posted: 2007-12-13T12:58:26-07:00
by gecko
Thank you thank you very much. Where are donations made?! :)

Re: convert.exe: Memory allocation failed with GIF files in G2

Posted: 2007-12-13T13:44:34-07:00
by magick