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

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
gecko

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

Post 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
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

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

Post by Bonzo »

It may be a memory limit ?
http://gallery.menalto.com/node/64381

Try with a smaller file ?
gecko

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

Post 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?
gecko

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

Post 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?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

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

Post 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.
gecko

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

Post 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
gecko

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

Post by gecko »

magick, anything yet? My hopes are high. ;)
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

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

Post by magick »

Grab ImageMagick 6.3.7-4, the latest release. The problem you reported should be resolved.
gecko

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

Post by gecko »

Any chance it will be in binary form any time soon?

Thanks,
Ryan
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

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

Post by magick »

ImageMagick 6.3.7-4 is in binary form now.
gecko

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

Post by gecko »

Thank you thank you very much. Where are donations made?! :)
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

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

Post by magick »

Post Reply