PerlMagick is an object-oriented Perl interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning PerlMagick.
I finally realized I have problems with all PNG images, not just the invalid ones. All functions accessing PNG image resulting in segfault. I'm running ImageMagick 6.8.7-4 2013-11-06 Q16 on Mac OS X Snow Leopard x64.
gdb --args /opt/local/bin/perl -w test.pl
...
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
0x00007fff89d7cc00 in strlen ()
(gdb) bt
#0 0x00007fff89d7cc00 in strlen ()
#1 0x00007fff89d885fc in __vfprintf ()
#2 0x00007fff89e40ed8 in vsnprintf_l ()
#3 0x00000001010eb9b2 in FormatLocaleStringList ()
#4 0x00000001010eba94 in FormatLocaleString ()
#5 0x00000001010b4c30 in GetLocaleExceptionMessage ()
#6 0x00000001010b5ded in ThrowMagickExceptionList ()
#7 0x00000001010b607e in ThrowMagickException ()
#8 0x00000001012783ad in MagickPNGErrorHandler ()
#9 0x000000010075668c in png_longjmp ()
#10 0x00000001012783ba in MagickPNGErrorHandler ()
#11 0x00000001003ad595 in png_error ()
#12 0x00000001003a5006 in png_create_read_struct_2 ()
#13 0x000000010127a310 in ReadOnePNGImage ()
#14 0x00000001012834db in ReadPNGImage ()
#15 0x000000010104ddc2 in ReadImage ()
#16 0x000000010104ee89 in ReadImages ()
#17 0x000000010030b407 in XS_Image__Magick__Q16_Read ()
#18 0x00000001000a7a23 in Perl_pp_entersub ()
#19 0x000000010009f24a in Perl_runops_standard ()
#20 0x00000001000260f9 in perl_run ()
#21 0x0000000100002ddb in main ()
Any suggestions? Could be the problem with my libpng, since I can't successfully read any PNG image, but it should not lead to segfault...
Unfortunately we cannot reproduce the problem and we have not heard from anyone else about this problem. We tried your script on our Mac OS X host and it ran without complaint.