Pixel cache allocation failed

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
kinger
Posts: 5
Joined: 2015-10-08T23:42:08-07:00
Authentication code: 1151

Pixel cache allocation failed

Post by kinger » 2015-10-08T23:48:19-07:00

Hello All,


Trying to convert 11Mb tif file (having 16Gb of RAM) and getting 'pixel cache allocation failed'.
Run as:

Code: Select all

convert.exe -debug all -thumbnail 133x133 "IMG_0064.tif[0]" "IMG_0064.jpg"

Code: Select all

...
2015-10-09T09:45:45+03:00 0:02.634 0.593u 6.9.2 Coder convert.exe[12424]: jpeg.c/WriteJPEGImage/2293/Coder
  Interlace: non-progressive
2015-10-09T09:45:45+03:00 0:02.641 0.608u 6.9.2 Coder convert.exe[12424]: jpeg.c/WriteJPEGImage/2307/Coder
  Quality: 0
2015-10-09T09:45:45+03:00 0:02.648 0.608u 6.9.2 Coder convert.exe[12424]: jpeg.c/WriteJPEGImage/2534/Coder
  Storage class: DirectClass
2015-10-09T09:45:45+03:00 0:02.656 0.608u 6.9.2 Coder convert.exe[12424]: jpeg.c/WriteJPEGImage/2536/Coder
  Depth: 8
2015-10-09T09:45:45+03:00 0:02.664 0.608u 6.9.2 Coder convert.exe[12424]: jpeg.c/WriteJPEGImage/2542/Coder
  Number of colors: unspecified
2015-10-09T09:45:45+03:00 0:02.671 0.608u 6.9.2 Coder convert.exe[12424]: jpeg.c/WriteJPEGImage/2544/Coder
  JPEG data precision: 8
2015-10-09T09:45:45+03:00 0:02.679 0.608u 6.9.2 Coder convert.exe[12424]: jpeg.c/WriteJPEGImage/2599/Coder
  Image colorspace is RGB
2015-10-09T09:45:45+03:00 0:02.686 0.608u 6.9.2 Coder convert.exe[12424]: jpeg.c/WriteJPEGImage/2601/Coder
  Sampling factors: 1x1,1x1,1x1
2015-10-09T09:45:45+03:00 0:02.694 0.608u 6.9.2 Coder convert.exe[12424]: jpeg.c/WriteProfile/2002/Coder
  icc profile: 560 bytes
2015-10-09T09:45:45+03:00 0:02.701 0.608u 6.9.2 Resource convert.exe[12424]: resource.c/AcquireMagickResource/312/Resource
  Memory: 399B/69.5KiB/15.874GiB
2015-10-09T09:45:45+03:00 0:02.707 0.608u 6.9.2 Resource convert.exe[12424]: resource.c/RelinquishMagickResource/1002/Resource
  Memory: 399B/69.1KiB/15.874GiB
2015-10-09T09:45:45+03:00 0:02.712 0.608u 6.9.2 Cache convert.exe[12424]: cache.c/DestroyPixelCache/991/Cache
  destroy IMG_0064.tif[0]
2015-10-09T09:45:45+03:00 0:02.717 0.608u 6.9.2 Resource convert.exe[12424]: resource.c/RelinquishMagickResource/1002/Resource
  Memory: 70.8KB/0B/15.874GiB
convert.exe: Unknown field with tag 34864 (0x8830) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/884.
convert.exe: Unknown field with tag 42033 (0xa431) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/884.
convert.exe: Unknown field with tag 42034 (0xa432) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/884.
convert.exe: Unknown field with tag 42036 (0xa434) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/884.
convert.exe: pixel cache allocation failed `IMG_0064.tif' @ error/cache.c/OpenPixelCache/3559.
convert.exe: memory allocation failed `IMG_0064.tif' @ error/psd.c/ReadPSDChannel/1094.
convert -version:

Code: Select all

Version: ImageMagick 6.9.2-3 Q8 x64 2015-09-19 http://www.imagemagick.org

User avatar
dlemstra
Posts: 1540
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Pixel cache allocation failed

Post by dlemstra » 2015-10-08T23:54:09-07:00

Can you add a link to your input image so we can test it?
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate

kinger
Posts: 5
Joined: 2015-10-08T23:42:08-07:00
Authentication code: 1151

Re: Pixel cache allocation failed

Post by kinger » 2015-10-09T00:23:46-07:00


User avatar
dlemstra
Posts: 1540
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Pixel cache allocation failed

Post by dlemstra » 2015-10-09T01:30:19-07:00

It seems your image contains an invalid Photoshop layer. I just pushed a fix to our git repository to improve the error message. You can execute the command below when you don't care about the layers:

Code: Select all

convert -define tiff:ignore-layers=true "IMG_0064.tif[0]" -thumbnail 133x133 "IMG_0064.jpg"
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate

kinger
Posts: 5
Joined: 2015-10-08T23:42:08-07:00
Authentication code: 1151

Re: Pixel cache allocation failed

Post by kinger » 2015-10-09T09:27:25-07:00

Thanks, it works.

Post Reply