Re: Assertion image->cache != (Cache) ((void *)0)' failed.
Bob Friesenhahn <[email protected]> Mon, 24 Mar 2008 17:20:48 -0500 (CDT)
| Newsgroups | gmane.comp.video.graphicsmagick.bugs |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 13 Mar 2008, Micha? Kowalczuk wrote:
> Hello,
> I found a bug in GraphicsMagick. It happened when I tried to scale this jpeg
> file: http://kowalczuk.eu/other/GM-bug.jpg
>
> $ gm convert -scale 800 GM-bug.jpg test.jpg
> gm: cache.c:534: AcquireImagePixels: Assertion `image->cache != (Cache) ((void *)0)' failed.
GraphicsMagick CVS (1.1 branch and 1.2 HEAD) and the latest GM 1.2
snapshot now contain a fix for this problem.
> In utility.c, function TranslateText():
>
> case '#':
> {
> if (!image->cache) {
> *q++=(*p);
> continue;
> }
>
> But I think that the main problem is that gm is trying to clone the comment
> when there isn't one in the source file. Also, checking existence of cache
> before calling SignatureImage() is also not a bad idea.
It seems that you are using an old GraphicsMagick version. It was not
sufficient to test for image->cache since it is allocated when the
image is first allocated.
The actual problem I noticed is that the JPEG attributes are
processed before the pixels have been initialized.
Bob
======================================
Bob Friesenhahn
[email protected], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/