Hi,
when reading tif files (generated from raw files with ufraw) imagemagick dies.
Fetch http://www.danisch.de/tmp/segfault.tif and run
convert segfault.tif segfault.png
(Using Ubuntu 9.10)
regards
Segfault when reading tif file
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Segfault when reading tif file
Works for me (with warnings about unknown tiff fields) on IM 6.6.1-1 Q16 Mac OSX Tiger
convert segfault.tif segfault.png
convert: segfault.tif: invalid TIFF directory; tags are not sorted in ascending order. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/703.
convert: segfault.tif: unknown field with tag 11 (0xb) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/703.
convert: segfault.tif: unknown field with tag 50341 (0xc4a5) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/703.
convert: segfault.tif: unknown field with tag 513 (0x201) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/703.
convert: segfault.tif: unknown field with tag 514 (0x202) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/703.
convert: segfault.tif: TIFF directory is missing required "ImageLength" field. `MissingRequired' @ warning/tiff.c/TIFFErrors/493.
Just warnings. The png file looks fine.
What version of IM are you using? If old, probably should upgrade
convert segfault.tif segfault.png
convert: segfault.tif: invalid TIFF directory; tags are not sorted in ascending order. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/703.
convert: segfault.tif: unknown field with tag 11 (0xb) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/703.
convert: segfault.tif: unknown field with tag 50341 (0xc4a5) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/703.
convert: segfault.tif: unknown field with tag 513 (0x201) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/703.
convert: segfault.tif: unknown field with tag 514 (0x202) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/703.
convert: segfault.tif: TIFF directory is missing required "ImageLength" field. `MissingRequired' @ warning/tiff.c/TIFFErrors/493.
Just warnings. The png file looks fine.
What version of IM are you using? If old, probably should upgrade
Re: Segfault when reading tif file
Am seeing exactly this error - and under a newly built ImageMagick 6.7.2-7 2011-09-22. Below is output both without - and with- the -quiet option:
Then, on the same machine, tried this with the prepackaged (older) install of ImageMagick 6.3.4 07/16/11:
Yes, some of these are files coming from probably old fax machines. This is clearly something many have seen before; am I uncovering a new twist on an old bug, or is there some build option I should be aware of?
Many thanks. Lou
Code: Select all
$ convert source.tif destination.pdf
MissingRequired: /var/tmp/magick-ukSEaqlF: TIFF directory is missing required "ImageLength" field.
Memory fault(coredump)
Code: Select all
$ convert -quiet source.tif destination.pdf
MissingRequired: /var/tmp/magick-lzejaOgF: TIFF directory is missing required "ImageLength" field.
Memory fault(coredump)
Then, on the same machine, tried this with the prepackaged (older) install of ImageMagick 6.3.4 07/16/11:
Code: Select all
$ convert source.tif destination.pdf
convert: 1000335.tif: unknown field with tag 33000 (0x80e8) encountered. `TIFFReadDirectory'.
(produces a 4K nonsense destination.pdf file, then says:)
convert: unable to open file `destination.pdf': No such file or directory.
Code: Select all
$ convert -quiet source.tif destination.pdf
(produces a 4K nonsense destination.pdf file, then says:)
convert: unable to open file `destination.pdf': No such file or directory.
Many thanks. Lou
Re: Segfault when reading tif file
Hello,
The same file segfault.tif from bug https://bugs.launchpad.net/ubuntu/+sour ... bug/559021
is converted with warnings by ImageMagick 6.6.0-4 2011-06-15 Q16 using convert.
But fails to do the same from PERL ( 8:6.6.0.4-3ubuntu1 ) with error:
Exception 350: segfault.tif: TIFF directory is missing required "ImageLength" field. `MissingRequired' @ warning/tiff.c TIFFErrors/493
Also cannot read with perl any tiff file, created by ufraw-batch.
Please fix.
The same file segfault.tif from bug https://bugs.launchpad.net/ubuntu/+sour ... bug/559021
is converted with warnings by ImageMagick 6.6.0-4 2011-06-15 Q16 using convert.
But fails to do the same from PERL ( 8:6.6.0.4-3ubuntu1 ) with error:
Exception 350: segfault.tif: TIFF directory is missing required "ImageLength" field. `MissingRequired' @ warning/tiff.c TIFFErrors/493
Also cannot read with perl any tiff file, created by ufraw-batch.
Please fix.
Re: Segfault when reading tif file
Done. We had to relax when PerlMagick tosses an image when an exception is thrown.
Re: Segfault when reading tif file
Thank you for the software and for the all job done!
Thanks
Thanks