6.5.1-0 convert seg faults on multipage pdf

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
mathog
Posts: 2
Joined: 2010-01-12T11:20:19-07:00
Authentication code: 8675309

6.5.1-0 convert seg faults on multipage pdf

Post by mathog »

Using the sunfreeware build of 6.5.1.0 on a Sparc Solaris 8 system convert consistently segfaults when it acts on a multipage
PDF file that contains images. In the following this is demonstrated by converting 3 pages (fails), each page one a time (success),
then 2 pages (fails):

Code: Select all

# gs -q -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -dFirstPage=8 -dLastPage=10 -sOutputFile=three.pdf  many.pdf
# convert -compress JPEG three.pdf convert3.pdf
Segmentation Fault (core dumped)
# gs -q -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -dFirstPage=8 -dLastPage=8 -sOutputFile=one.pdf  many.pdf
# convert -compress JPEG one.pdf convert3.pdf
# gs -q -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -dFirstPage=9 -dLastPage=9 -sOutputFile=one.pdf  many.pdf
# convert -compress JPEG one.pdf convert4.pdf
# gs -q -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -dFirstPage=10 -dLastPage=10 -sOutputFile=one.pdf  many.pdf
# convert -compress JPEG one.pdf convert5.pdf
# gs -q -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -dFirstPage=8 -dLastPage=9 -sOutputFile=two.pdf  many.pdf
# convert -compress JPEG two.pdf convert6.pdf
Segmentation Fault (core dumped)
Here is gdb output for the failed two page conversion:

Code: Select all

 gdb convert
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.8"...
(gdb) run  -compress JPEG two.pdf convert6.pdf
Starting program: /usr/local/bin/convert -compress JPEG two.pdf convert6.pdf
[New LWP 1]
[New LWP 2]
[New LWP 3]
[New LWP 4]
[New LWP 5]

Program received signal SIGSEGV, Segmentation fault.
0xff1fc5f4 in CloneImage () from /usr/local/lib/libMagickCore.so.2
(gdb) where
#0  0xff1fc5f4 in CloneImage () from /usr/local/lib/libMagickCore.so.2
#1  0xff14535c in InjectImageBlob () from /usr/local/lib/libMagickCore.so.2
#2  0xfe6e7970 in WritePDFImage () from /usr/local/lib/ImageMagick-6.5.1/modules-Q16/coders/pdf.so
#3  0xff174f5c in WriteImage () from /usr/local/lib/libMagickCore.so.2
#4  0xff17530c in WriteImages () from /usr/local/lib/libMagickCore.so.2
#5  0xfefc2a6c in ConvertImageCommand () from /usr/local/lib/libMagickWand.so.2
#6  0x0001118c in main ()
Known bug? Fixed in a more recent version? Ironically I just upgraded from 6.2.5, which didn't have this problem.

As an aside, the single page conversions came out 2X bigger than the input.

Thanks.
mathog
Posts: 2
Joined: 2010-01-12T11:20:19-07:00
Authentication code: 8675309

Re: 6.5.1-0 convert seg faults on multipage pdf

Post by mathog »

Note added: the previous version was carefully removed before the new one was installed. Everything that I could identify as
being part of the old ImageMagick was deleted from /usr/local.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: 6.5.1-0 convert seg faults on multipage pdf

Post by magick »

We believe that is a known bug and is fixed in recent releases of ImageMagick. The current release is version 6.5.8-10.
Post Reply