problem with BIG images - Memory allocation failed `#FFFFFF'

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
jnimo

problem with BIG images - Memory allocation failed `#FFFFFF'

Post by jnimo »

Hi all.

I'm using imagemagick in an aplication to make automatic procedures in images but right now I'm having and issue with a command

convert -limit memory 1mb -limit map 1mb -size 23622x14527 -density 300x300 xc:#FFFFFF out.jpg
convert: Memory allocation failed `#FFFFFF'.
convert: missing an image filename `out.jpg'.


I have the tmp_magick to a folder in a SAN with 7 teras of free space, 4 Gb of RAM and still it doesn't make anything, any ideas?

thanks for this library
jnimo

Re: problem with BIG images - Memory allocation failed `#FFFFFF'

Post by jnimo »

I'm reading about this and I think that this is where almost all the people had the problem but I think that this machine has good memory to run this command


convert -list resource
File Area Memory Map Disk
------------------------------------------------
768 7.91366gb 5.93524gb 15.8273gb 16eb


I don't know what else could be, any ideas?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: problem with BIG images - Memory allocation failed `#FFFFFF'

Post by magick »

Add -debug cache to your command line. Does the debugging reports its writing the pixel cache to your SAN disk? If not, set the MAGICK_TMPDIR environment variable. Also try ImageMagick 6.4.3-7, the latest release. Does your command work now?
jnimo

Re: problem with BIG images - Memory allocation failed `#FFFFFF'

Post by jnimo »

Hi and thanks for the reply

this is the output with debug cache

2008-09-22T16:00:06+02:00 0:01 0.000u 6.4.1 Cache convert[14969]: cache.c/unknown/3439/Cache
extend #FFFFFF[0] (/usr/eBDAS/jPDF/tmp_magick/magick-XX0Jp7pb[4], disk, 3.1959gb)
2008-09-22T16:00:06+02:00 0:01 0.010u 6.4.1 Cache convert[14969]: cache.c/unknown/2191/Cache
destroy #FFFFFF[0]
convert: Memory allocation failed `#FFFFFF'.
convert: missing an image filename `out.jpg'.


I think that yes, it is trying to write to the SAN, besides I have try to make the command in others machines and is always the same error (and pretty fast by the way) I don't know anything else but I have the exit with debug all

2008-09-22T15:59:30+02:00 0:01 0.000u 6.4.1 Configure convert[14965]: configure.c/unknown/528/Configure
Searching for configure file: "/usr/local/share/ImageMagick-6.4.1/config/coder.xml"
2008-09-22T15:59:30+02:00 0:01 0.000u 6.4.1 Configure convert[14965]: configure.c/unknown/528/Configure
Searching for configure file: "/usr/local/lib/ImageMagick-6.4.1/config/coder.xml"
2008-09-22T15:59:30+02:00 0:01 0.000u 6.4.1 Configure convert[14965]: configure.c/unknown/528/Configure
Searching for configure file: "/usr/local/share/doc/ImageMagick-6.4.1/coder.xml"
2008-09-22T15:59:30+02:00 0:01 0.000u 6.4.1 Configure convert[14965]: configure.c/unknown/528/Configure
Searching for configure file: "/usr/local/share/ImageMagick-6.4.1/coder.xml"
2008-09-22T15:59:30+02:00 0:01 0.000u 6.4.1 Configure convert[14965]: configure.c/unknown/528/Configure
Searching for configure file: "/root/.magick/coder.xml"
2008-09-22T15:59:30+02:00 0:01 0.000u 6.4.1 Configure convert[14965]: configure.c/unknown/528/Configure
Searching for configure file: "coder.xml"
2008-09-22T15:59:30+02:00 0:01 0.000u 6.4.1 Configure convert[14965]: coder.c/unknown/634/Configure
Loading coder map "/usr/local/share/ImageMagick-6.4.1/config/coder.xml" ...
2008-09-22T15:59:30+02:00 0:01 0.010u 6.4.1 Module convert[14965]: module.c/unknown/1077/Module
Searching for module "xc" using filename "xc.la"
2008-09-22T15:59:30+02:00 0:01 0.010u 6.4.1 Module convert[14965]: module.c/unknown/479/Module
Searching for coder module file "xc.la" ...
2008-09-22T15:59:30+02:00 0:01 0.010u 6.4.1 Module convert[14965]: module.c/unknown/1097/Module
Opening module at path "/usr/local/lib/ImageMagick-6.4.1/modules-Q16/coders/xc.la"
2008-09-22T15:59:30+02:00 0:01 0.010u 6.4.1 Module convert[14965]: module.c/unknown/1131/Module
Method "RegisterXCImage" in module "xc" at address 0x18a040
2008-09-22T15:59:30+02:00 0:01 0.010u 6.4.1 Module convert[14965]: module.c/unknown/1146/Module
Method "UnregisterXCImage" in module "xc" at address 0x18a0b4
2008-09-22T15:59:30+02:00 0:01 0.010u 6.4.1 Configure convert[14965]: configure.c/unknown/528/Configure
Searching for configure file: "/usr/local/share/ImageMagick-6.4.1/config/delegates.xml"
2008-09-22T15:59:30+02:00 0:01 0.010u 6.4.1 Configure convert[14965]: configure.c/unknown/528/Configure
Searching for configure file: "/usr/local/lib/ImageMagick-6.4.1/config/delegates.xml"
2008-09-22T15:59:30+02:00 0:01 0.010u 6.4.1 Configure convert[14965]: configure.c/unknown/528/Configure
Searching for configure file: "/usr/local/share/doc/ImageMagick-6.4.1/delegates.xml"
2008-09-22T15:59:30+02:00 0:01 0.010u 6.4.1 Configure convert[14965]: configure.c/unknown/528/Configure
Searching for configure file: "/usr/local/share/ImageMagick-6.4.1/delegates.xml"
2008-09-22T15:59:30+02:00 0:01 0.010u 6.4.1 Configure convert[14965]: configure.c/unknown/528/Configure
Searching for configure file: "/root/.magick/delegates.xml"
2008-09-22T15:59:30+02:00 0:01 0.010u 6.4.1 Configure convert[14965]: configure.c/unknown/528/Configure
Searching for configure file: "delegates.xml"
2008-09-22T15:59:30+02:00 0:01 0.010u 6.4.1 Configure convert[14965]: delegate.c/unknown/1166/Configure
Loading delegate map "/usr/local/lib/ImageMagick-6.4.1/config/delegates.xml" ...
2008-09-22T15:59:30+02:00 0:01 0.010u 6.4.1 Configure convert[14965]: utility.c/unknown/809/Configure
Command line: convert {-limit} {memory} {1mb} {-limit} {map} {1mb} {-size} {23622x14527} {-density} {300x300} {-debug} {all} {xc:#FFFFFF} {out.jp}
2008-09-22T15:59:30+02:00 0:01 0.010u 6.4.1 Resource convert[14965]: resource.c/unknown/220/Resource
Area: 3.1959gb/3.1959gb/7.91366gb
2008-09-22T15:59:30+02:00 0:01 0.010u 6.4.1 Resource convert[14965]: resource.c/unknown/220/Resource
Memory: 3.1959gb/3.1959gb/1mb
2008-09-22T15:59:30+02:00 0:01 0.010u 6.4.1 Resource convert[14965]: resource.c/unknown/853/Resource
Memory: 3.1959gb/0b/1mb
2008-09-22T15:59:30+02:00 0:01 0.010u 6.4.1 Resource convert[14965]: resource.c/unknown/220/Resource
Disk: 3.1959gb/3.1959gb/16eb
2008-09-22T15:59:30+02:00 0:01 0.010u 6.4.1 Resource convert[14965]: resource.c/unknown/401/Resource

2008-09-22T15:59:30+02:00 0:01 0.010u 6.4.1 Exception convert[14965]: configure.c/unknown/228/Exception
no such element in list `MAGICK_TEMPORARY_PATH'
2008-09-22T15:59:30+02:00 0:01 0.010u 6.4.1 Resource convert[14965]: resource.c/unknown/429/Resource
/usr/eBDAS/jPDF/tmp_magick/magick-XXqZTR5B
2008-09-22T15:59:30+02:00 0:01 0.010u 6.4.1 Resource convert[14965]: resource.c/unknown/220/Resource
File: 0b/0b/768b
2008-09-22T15:59:30+02:00 0:01 0.010u 6.4.1 Cache convert[14965]: cache.c/unknown/3439/Cache
extend #FFFFFF[0] (/usr/eBDAS/jPDF/tmp_magick/magick-XXqZTR5B[4], disk, 3.1959gb)
2008-09-22T15:59:30+02:00 0:01 0.010u 6.4.1 Exception convert[14965]: cache.c/unknown/3569/Exception
unable to extend cache `#FFFFFF': Invalid argument
2008-09-22T15:59:30+02:00 0:01 0.010u 6.4.1 Exception convert[14965]: xc.c/unknown/138/Exception
Memory allocation failed `#FFFFFF'
2008-09-22T15:59:30+02:00 0:01 0.020u 6.4.1 Cache convert[14965]: cache.c/unknown/2191/Cache
destroy #FFFFFF[0]
2008-09-22T15:59:30+02:00 0:01 0.020u 6.4.1 Exception convert[14965]: convert.c/unknown/2651/Exception
missing an image filename `out.jp'
convert: Memory allocation failed `#FFFFFF'.
convert: missing an image filename `out.jp'.


Any ideas?

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

Re: problem with BIG images - Memory allocation failed `#FFFFFF'

Post by magick »

Grab ImageMagick 6.4.3-8 sometime tomorrow or add the following to magick/studio.h and wand/studio.h:
  • #if defined(MAGICKCORE__FILE_OFFSET_BITS) && !defined(_FILE_OFFSET_BITS)
    # define _FILE_OFFSET_BITS MAGICKCORE__FILE_OFFSET_BITS
    #endif
right before the '#if defined(_magickcore_const)' line. If this patch fails to fix the problem, let us know.
jnimo

Re: problem with BIG images - Memory allocation failed `#FFFFFF'

Post by jnimo »

I will wait for the 6.4.3.8 tomorrow thanks and yes I will let you know about
jnimo

Re: problem with BIG images - Memory allocation failed `#FFFFFF'

Post by jnimo »

Thanks I have try the new lib in my development machine, my Q&A machine and we will put the library in the production enviroment sometime in the next days and yes it did solve the problem in those enviroments


Thanks
Post Reply

Who is online

Users browsing this forum: Google [Bot], Semrush [Bot] and 6 guests