Memory allocation failure - 6.7.4-8

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
Logg
Posts: 3
Joined: 2012-01-23T19:00:43-07:00
Authentication code: 8675308

Memory allocation failure - 6.7.4-8

Post by Logg »

While trying to turn 877 png files into a pdf, convert.exe fails to allocate memory. I had this problem both in fedora 16 and in windows 7. The fedora install was within virtualbox, and I had only allocated it 2 GB of ram, so I thought maybe I needed more ram, and tried it inside windows. Same error, only around 5GB/8GB used. The program will work at converting it for maybe 5 or 10 minutes, then fail saying "convert.exe: Memory allocation failed '..\book.pdf' @ error/pdf.c/WritePDFImage/1702." The command issued was "convert -page A4 ..\images\*.png ..\book.pdf"

I'm not sure if this a bug, but any help would definitely be appreciated.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Memory allocation failure - 6.7.4-8

Post by magick »

Add -limit area 0 to your command line. This forces pixels to disk rather than memory.
Logg
Posts: 3
Joined: 2012-01-23T19:00:43-07:00
Authentication code: 8675308

Re: Memory allocation failure - 6.7.4-8

Post by Logg »

Same result. Identical error, time to give error, relative ram usage. Exact command issued this time was "convert -page A4 -limit area 0 ..\images\*.png ..\book.pdf"
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Memory allocation failure - 6.7.4-8

Post by magick »

This command works for us:
  • convert -limit area 0 -limit map 0 -page A4 ..\images\*.png ..\book.pdf
Let us know if the command works / fails for you.
Logg
Posts: 3
Joined: 2012-01-23T19:00:43-07:00
Authentication code: 8675308

Re: Memory allocation failure - 6.7.4-8

Post by Logg »

That did it. It took over an hour, but it worked. Thanks for the help. Maybe the program should see that it will not be able to allocate enough memory to complete its task and advise you to use those flags?
Post Reply