Red Hat Bugzilla – Bug 427811
ImageMagick-perl segfaults on exit
Last modified: 2008-07-23 06:08:05 EDT
Description of problem:
If I read a DIB image into a scalar, apply BlobToImage to it, and then
write it back to disk as a PNG, I get a segmentation fault *after* the
last line of my Perl script executes. The output image is written
correctly, but this prevents me from converting several such images, say
in a loop. If I explicitly clear the images from my Image::Magick object
after using it, with
@$img = ();
I get a segfault right then. I also get a segfault if I do the same thing,
but with the C++ bindings.
On the other hand, 'convert' works on the same image with no problems.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. ./foo.pl 00.f.dib
[uckelman@scylla cbutils]$ ./foo.pl 00.f.dib
Same, but no segfault.
I'm attaching a minimal example and a DIB to test it on.
Created attachment 290987 [details]
Created attachment 290988 [details]
test DIB image
I discovered just now that my example program (and the real one) doesn't seg
fault if I comment out the line where I close the file handle. So it looks like
clearing images from the Image::Magick object isn't the problem; rather it's
something to do with closing file handles.
Also, I should mention that the last time I used this program, which was quite
some time ago---maybe when I was using Fedora 6---it did work correctly as written.
Quick intro: I'm a new co-maintainer of ImageMagick and as such I'm going
through all open ImageMagick bugs.
I cannot reproduce this with the latest ImageMagick from rawhide / F-9, closing.
I'm using Fedora 9 now, and I can no longer reproduce the bug either. Whatever
caused the problem in Fedora 8 is fixed in Fedora 9.