Page 1 of 1

Segfault on old-style JPEG compression in tiff

Posted: 2010-05-04T11:04:05-07:00
by Hubbitus
For more info, please see bugreport https://bugzilla.redhat.com/show_bug.cgi?id=583081 . There also file on which error reproduced.

Re: Segfault on old-style JPEG compression in tiff

Posted: 2010-05-04T11:09:33-07:00
by magick
We get:
  • Software error:

    Can't connect to the database.
    Error: Can't connect to MySQL server on 'bzdb02.db.bz.hst.phx2.redhat.com' (111)
    Is your database installed and up and running?
    Do you have the correct username and password selected in localconfig?


    For help, please send mail to the webmaster (bugzilla-owner@redhat.com), giving this error message and the time and date of the error.

Re: Segfault on old-style JPEG compression in tiff

Posted: 2010-05-05T09:36:14-07:00
by Drarakel
I think it should be enough to use a newer ImageMagick version.
At least on Windows and IM v6.6.1-5, I'm getting no crash with "convert test2.tif out.pdf" (but a few warnings about the TIF file).

Re: Segfault on old-style JPEG compression in tiff

Posted: 2010-05-06T00:50:34-07:00
by xfreebird
I tried with ImageMagick 6.6.1-5 on CentOS 5.4. It could not convert the file to pdf, at least it did not crash. I tried to convert to png, but no luck.
I've compiled this version with libtiff 3.8.2.

convert: test.tif: unknown field with tag 513 (0x201) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/703.
convert: test.tif: unknown field with tag 514 (0x202) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/703.
convert: test.tif: unknown field with tag 37679 (0x932f) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/703.
convert: test.tif: unknown field with tag 37680 (0x9330) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/703.
convert: test.tif: unknown field with tag 37681 (0x9331) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/703.
convert: Invalid YCbCr subsampling. `test.tif' @ warning/tiff.c/TIFFErrors/493.
convert: test.tif: cannot handle zero strip size. `TIFFReadDirectory' @ warning/tiff.c/TIFFErrors/493.
convert: missing an image filename `test.png' @ error/convert.c/ConvertImageCommand/2970.

Did you succeed to convert that tiff file to a different format with ImageMagick ?

Re: Segfault on old-style JPEG compression in tiff

Posted: 2010-05-06T10:24:59-07:00
by Drarakel
"convert test2.tif test.png":
convert: test2.tif: unknown field with tag 37679 (0x932f) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/703.
convert: test2.tif: unknown field with tag 37680 (0x9330) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/703.
convert: test2.tif: unknown field with tag 37681 (0x9331) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/703.
convert: Depreciated and troublesome old-style JPEG compression mode, please convert to new-style JPEG compression and notify vendor of writing software. `OJPEGSetupDecode' @ warning/tiff.c/TIFFWarnings/703.

The produced test.png looks upside down - but probably the TIF file is already that way.

I'm using the regular Win32 Q16 binary of v6.6.1-5. The libtiff version here seems to be 3.9.2.

Re: Segfault on old-style JPEG compression in tiff

Posted: 2010-05-06T11:16:55-07:00
by magick
This bug report should go to the TIFF development team. We're using ImageMagick 6.6.1-5 and libtiff 3.9.2. The stack trace suggests the fault is directly in the TIFF delegate library, not ImageMagick:

Code: Select all

Program received signal SIGSEGV, Segmentation fault.
0x00000038e601c56b in ?? () from /usr/lib64/libtiff.so.3
Missing separate debuginfos, use: debuginfo-install bzip2-libs-1.0.5-6.fc12.x86_64 expat-2.0.1-10.fc13.x86_64 fontconfig-2.8.0-1.fc13.x86_64 freetype-2.3.11-3.fc13.x86_64 glibc-2.12-1.x86_64 libICE-1.0.6-2.fc13.x86_64 libSM-1.1.0-7.fc12.x86_64 libX11-1.3.1-3.fc13.x86_64 libXau-1.0.5-1.fc12.x86_64 libXext-1.1-2.fc13.x86_64 libXt-1.0.7-1.fc13.x86_64 libgomp-4.4.4-2.fc13.x86_64 libjpeg-6b-46.fc12.x86_64 libtiff-3.9.2-3.fc13.x86_64 libtool-ltdl-2.2.6-20.fc13.x86_64 libuuid-2.17.2-4.fc13.x86_64 libxcb-1.5-1.fc13.x86_64 zlib-1.2.3-23.fc12.x86_64
(gdb) where
#0  0x00000038e601c56b in ?? () from /usr/lib64/libtiff.so.3
#1  0x00000038e601e368 in ?? () from /usr/lib64/libtiff.so.3
#2  0x00000038e6020841 in TIFFReadRGBAImageOriented ()
   from /usr/lib64/libtiff.so.3
#3  0x00007ffff0361c82 in ReadTIFFImage (image_info=0x60d800, 
    exception=0x604c00) at coders/tiff.c:1534
This same file fails in the same manner for other open-source graphics packages such as Gimp.

Re: Segfault on old-style JPEG compression in tiff

Posted: 2010-05-06T12:59:43-07:00
by Drarakel
That's my result file (with IM v6.6.1-5):
http://img245.imageshack.us/img245/3549/testek.png
Am I the only one that has (almost) no problems with it? :)
(Is libtiff not used with the Win32 binaries?)

Re: Segfault on old-style JPEG compression in tiff

Posted: 2010-05-08T05:09:10-07:00
by Hubbitus
magick sorry for time bugzilla unavailable, it is not my bugtracker, but RedHat (Fedora). It seams now working.
Drarakel wrote:I think it should be enough to use a newer ImageMagick version.
As can you see https://bugzilla.redhat.com/show_bug.cgi?id=583081#c4 it does not work too.

Drarakel what version of libtiff you are use?

Re: Segfault on old-style JPEG compression in tiff

Posted: 2010-05-08T08:45:51-07:00
by Drarakel
Hubbitus wrote:Drarakel what version of libtiff you are use?
Drarakel wrote:I'm using the regular Win32 Q16 binary of v6.6.1-5. The libtiff version here seems to be 3.9.2.
I've now updated to ImageMagick v6.6.1.6 - not sure about the libtiff version, sorry.
It's still workin' (with the warnings, but the output is fine):
convert test2.tif test.pdf
convert: test2.tif: unknown field with tag 37679 (0x932f) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/704.
convert: test2.tif: unknown field with tag 37680 (0x9330) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/704.
convert: test2.tif: unknown field with tag 37681 (0x9331) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/704.
convert: Depreciated and troublesome old-style JPEG compression mode, please convert to new-style JPEG compression and notify vendor of writing software. `OJPEGSetupDecode' @ warning/tiff.c/TIFFWarnings/704.

Hmm.. Here, it's even possible with an older IM version (v6.5.8-5).

Re: Segfault on old-style JPEG compression in tiff

Posted: 2010-05-24T00:19:34-07:00
by Hubbitus
Is there solution on unix version?