DestroyImageList: Assertion failed
Posted: 2013-02-06T17:45:44-07:00
After giving the command "display img.jpg", flipping the image and quitting, I get
display: magick/list.c:447: DestroyImageList: Assertion `images->signature == 0xabacadabUL' failed.
Aborted (core dumped)
Looking what happens, I see that utilities/display.c calls MagickCommandGenesis(...,DisplayImageCommand,...)
and this never returns. Indeed, wand/display.c:DisplayImageCommand() calls DestroyImageList() on something that was
destroyed already and aborts. Of the Transform commands Crop, Chop, Flip, Flop, Rotate, ..., the first (Crop) calls
XCropImage(...,*image,...) and does not change the value of *image, but Flip, Flop, RotateLeft/Right do things
like *image=DestroyImage(*image); *image=flip_image; so that *image is destroyed. However, DisplayImageCommand()
remembered the old location of *image in image_list and tries to destroy it again.
display: magick/list.c:447: DestroyImageList: Assertion `images->signature == 0xabacadabUL' failed.
Aborted (core dumped)
Looking what happens, I see that utilities/display.c calls MagickCommandGenesis(...,DisplayImageCommand,...)
and this never returns. Indeed, wand/display.c:DisplayImageCommand() calls DestroyImageList() on something that was
destroyed already and aborts. Of the Transform commands Crop, Chop, Flip, Flop, Rotate, ..., the first (Crop) calls
XCropImage(...,*image,...) and does not change the value of *image, but Flip, Flop, RotateLeft/Right do things
like *image=DestroyImage(*image); *image=flip_image; so that *image is destroyed. However, DisplayImageCommand()
remembered the old location of *image in image_list and tries to destroy it again.