Bug 427811

Summary: ImageMagick-perl segfaults on exit
Product: [Fedora] Fedora Reporter: Joel Uckelman <uckelman>
Component: ImageMagickAssignee: Hans de Goede <hdegoede>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 8CC: nmurray
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-04-27 19:05:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
minimal example
none
test DIB image none

Description Joel Uckelman 2008-01-07 17:29:49 UTC
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):

ImageMagick-6.3.5.9-1.fc8
ImageMagick-devel-6.3.5.9-1.fc8
ImageMagick-perl-6.3.5.9-1.fc8
ImageMagick-6.3.5.9-1.fc8
ImageMagick-c++-6.3.5.9-1.fc8
ImageMagick-c++-devel-6.3.5.9-1.fc8

How reproducible:


Steps to Reproduce:
1. ./foo.pl 00.f.dib
  
Actual results:

[uckelman@scylla cbutils]$ ./foo.pl 00.f.dib 
Done!
Segmentation fault

Expected results:

Same, but no segfault.

Additional info:

I'm attaching a minimal example and a DIB to test it on.

Comment 1 Joel Uckelman 2008-01-07 17:29:49 UTC
Created attachment 290987 [details]
minimal example

Comment 2 Joel Uckelman 2008-01-07 17:30:36 UTC
Created attachment 290988 [details]
test DIB image

Comment 3 Joel Uckelman 2008-01-11 15:01:48 UTC
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.

Comment 4 Hans de Goede 2008-04-27 19:05:22 UTC
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.


Comment 5 Joel Uckelman 2008-07-23 10:08:05 UTC
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.