Page 1 of 1

Memory allocation failure - 6.7.4-8

Posted: 2012-01-23T19:13:21-07:00
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.

Re: Memory allocation failure - 6.7.4-8

Posted: 2012-01-23T19:52:07-07:00
by magick
Add -limit area 0 to your command line. This forces pixels to disk rather than memory.

Re: Memory allocation failure - 6.7.4-8

Posted: 2012-01-23T20:09:11-07:00
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"

Re: Memory allocation failure - 6.7.4-8

Posted: 2012-01-24T05:02:14-07:00
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.

Re: Memory allocation failure - 6.7.4-8

Posted: 2012-01-24T17:01:25-07:00
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?