Possibly a bug in RelinquishPixelCachePixels
Possibly a bug in RelinquishPixelCachePixels
Hello, I'm currently investigating bug in my program that uses ImageMagick. I get 'MemoryAllocationFailed @ error/gif.c/ReadGIFImage/1285' error when I'm trying to consecutively open two large (2+mb) GIFs. I noticed that RelinquishPixelCachePixels lacks break in MapCache case. This leads to additional RelinquishMagickResource(DiskResource,cache_info->length) call for every RelinquishMagickResource(MapResource,cache_info->length), which, I believe, leads to negative resource_info.disk. So I wonder is it a bug or lack of break is intentional and my problem is elsewhere?
Re: Possibly a bug in RelinquishPixelCachePixels
RelinquishMagickResource() is behaving as intended. A memory-mapped pixel cache is always allocated on disk so we must account for any memory-mapped resources consumed by the pixel cache as well as any disk resources. That doesn't mean there might be some other bug. Are you seeing a negative disk resource? If so, provide a POC image and the command you use so we can reproduce the issue.
For large images, have you reviewed https://www.imagemagick.org/script/arch ... tera-pixel?
For large images, have you reviewed https://www.imagemagick.org/script/arch ... tera-pixel?
Re: Possibly a bug in RelinquishPixelCachePixels
Thanks for help. Old version of imagemagick was the problem. It didn't have this changes
2013-08-07 6.8.6-9 Cristy <quetzlzacatenango@image...>
* Free disk resource if case resources are exhausted (reference viewtopic.php?f=3&t=23877).