Segmentation fault when converting jpeg to tiff

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
Snowman
Posts: 6
Joined: 2009-11-15T16:01:16-07:00
Authentication code: 8675309

Segmentation fault when converting jpeg to tiff

Post by Snowman »

Hi,

The convert utility gives a segmentation fault when converting a jpeg to a tiff. Conversion of a tiff to jpeg works fine as well as converting other images formats (png, xpm) to either jpeg or tiff.

This happens on Linux, with:
imagemagick 6.5.9-0 and 6.5.9-1
libjpeg 8
libtiff 3.9.2

Debugging with gdb gives the following information. Let me know if you need more details.

Thanks

Code: Select all

(gdb) run 97957689.jpg image.tif
Starting program: /usr/bin/convert 97957689.jpg image.tif
[Thread debugging using libthread_db enabled]
[New Thread 0x7fffebaa9710 (LWP 3680)]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff61e9700 in emit_dqt () from /usr/lib/libjpeg.so.8

Code: Select all

(gdb) bt
#0  0x00007ffff61e9700 in emit_dqt () from /usr/lib/libjpeg.so.8
#1  0x00007ffff61ea192 in write_tables_only () from /usr/lib/libjpeg.so.8
#2  0x00007ffff61e18d7 in jpeg_write_tables () from /usr/lib/libjpeg.so.8
#3  0x00007ffff6924fd7 in TIFFjpeg_write_tables () from /usr/lib/libtiff.so.3
#4  0x00007ffff69253aa in JPEGSetupEncode () from /usr/lib/libtiff.so.3
#5  0x00007ffff693b756 in TIFFWriteScanline () from /usr/lib/libtiff.so.3
#6  0x00007ffff7a45af0 in TIFFWritePixels (tiff=0x60ee00, tiff_info=0x7fffffffa5f0, row=0, sample=0, image=0x643900) at coders/tiff.c:2148
#7  0x00007ffff7a47f50 in WriteTIFFImage (image_info=0x64e300, image=0x643900) at coders/tiff.c:2959
#8  0x00007ffff77c2a98 in WriteImage (image_info=0x64a100, image=0x643900) at magick/constitute.c:1116
#9  0x00007ffff77c3186 in WriteImages (image_info=0x60ac00, images=0x643900, filename=0x6057d0 "image.tif", exception=0x606200)
    at magick/constitute.c:1281
#10 0x00007ffff73c7585 in ConvertImageCommand (image_info=0x60ac00, argc=3, argv=0x6055d0, metadata=0x0, exception=0x606200)
    at wand/convert.c:2926
#11 0x00007ffff7447d8b in MagickCommandGenesis (image_info=0x606a00, command=0x400740 <ConvertImageCommand@plt>, argc=3, 
    argv=0x7fffffffde18, metadata=0x0, exception=0x606200) at wand/mogrify.c:162
#12 0x000000000040089f in main (argc=3, argv=0x7fffffffde18) at utilities/convert.c:80
Snowman
Posts: 6
Joined: 2009-11-15T16:01:16-07:00
Authentication code: 8675309

Re: Segmentation fault when converting jpeg to tiff

Post by Snowman »

It's an upstream libjpeg bug. It should be fixed when libjpeg 8a is released.
Post Reply