Page 1 of 1

Solaris version of IM crashing with Adobe PhotoElements TIF

Posted: 2007-06-20T10:12:04-07:00
by dnagirl
Hi,
We currently have IM v6.3.3 installed on Solaris 10 from source. All appears to work except when dealing with .tif files produced by Adobe Photoshop Elements. This program is known to insert non-standard tags into files it produces. IM seg faults on these files. Specifically the output from display -verbose test.tif was:

Code: Select all

TIFF Directory at offset 0x8 (8)
  Subfile Type: (0 = 0x0)
  Image Width: 1024 Image Length: 1139
  Resolution: 150, 150 pixels/inch
  Bits/Sample: 8
  Compression Scheme: None
  Photometric Interpretation: RGB color
  Samples/Pixel: 3
  Rows/Strip: 2
  Planar Configuration: single image plane
  Software: Adobe Photoshop Elements 2.0
  DateTime: 2007:05:01 14:30:19
Bus error (core dumped)
Things I have tested:
  • made local install of ImageMagick-sparc-sun-solaris2.10.tar.gz (I'm assuming this is v6.3.4) from posted binaries and temporarily setenv to reference it. When tested with the test image the same problem occurred as for v6.3.3 from source.
  • installed Windows binary (ImageMagick-6.3.4-10-Q16-windows-dll.exe) on WinXP machine and tested problem image. IMDisplay noted the non-standard tags but otherwise behaved well
  • tested image with tiffinfo. It gave the same output as display -verbose test.tif on Solaris
  • sysadmin updated libtiff. This had no effect on either version of IM but did affect tiffinfo which now works as expected
  • opened and saved test image with GIMP (which warned of the non-standard tags). IM of any version has no problem with previously problematic images that are treated this way.
Not sure what to try next. Suggestions?

Thanks,
Jen

Re: Solaris version of IM crashing with Adobe PhotoElements TIF

Posted: 2007-06-20T10:35:18-07:00
by magick
Post a URL to one of your TIFF images so we can download and attempt to reproduce the problem.

Re: Solaris version of IM crashing with Adobe PhotoElements TIF

Posted: 2007-06-20T10:43:44-07:00
by dnagirl

Re: Solaris version of IM crashing with Adobe PhotoElements TIF

Posted: 2007-06-20T11:07:43-07:00
by magick
Try the command without the -verbose option. The problem appears to be in the TIFF delegate library. It is failing in the TIFFPrintDirectory() method.

Re: Solaris version of IM crashing with Adobe PhotoElements TIF

Posted: 2007-06-20T11:13:20-07:00
by dnagirl
Hi,

just tried without verbose:
identify test.tif
display test.tif

Both seg faulted.

-Jen

Re: Solaris version of IM crashing with Adobe PhotoElements TIF

Posted: 2007-06-20T11:24:03-07:00
by magick
We're using ImageMagick 6.3.4-10. The identify -list format command returns:

TIFF* TIFF rw+ Tagged Image File Format (LIBTIFF, Version 3.8.2)

Re: Solaris version of IM crashing with Adobe PhotoElements TIF

Posted: 2007-06-20T11:33:51-07:00
by dnagirl
that's identical to my output for
identify -list format

Re: Solaris version of IM crashing with Adobe PhotoElements TIF

Posted: 2007-06-20T12:18:23-07:00
by magick
The only way we can help now is if you post a stack trace to determine if the program is failing inside ImageMagick or inside the TIFF delegate library.

Re: Solaris version of IM crashing with Adobe PhotoElements TIF

Posted: 2007-06-20T12:31:42-07:00
by dnagirl
identify -debug "All" test.tif

Code: Select all

2007-06-20T16:34:09-03:00 0:01 0.000u 6.3.3 Configure identify[29580]: utility.c/unknown/812/Configure
  Command line: identify{-debug}{All}{test.tif}
2007-06-20T16:34:09-03:00 0:01 0.000u 6.3.3 Configure identify[29580]: configure.c/unknown/482/Configure
  Searching for configure file: "/usr/local/ImageMagick-6.3.3/lib/ImageMagick-6.3.3/config/coder.xml"
2007-06-20T16:34:09-03:00 0:01 0.000u 6.3.3 Configure identify[29580]: configure.c/unknown/482/Configure
  Searching for configure file: "/usr/local/ImageMagick-6.3.3/share/ImageMagick-6.3.3/config/coder.xml"
2007-06-20T16:34:09-03:00 0:01 0.010u 6.3.3 Configure identify[29580]: configure.c/unknown/482/Configure
  Searching for configure file: "/usr/local/ImageMagick-6.3.3/share/doc/ImageMagick-6.3.3/coder.xml"
2007-06-20T16:34:09-03:00 0:01 0.010u 6.3.3 Configure identify[29580]: configure.c/unknown/482/Configure
  Searching for configure file: "/usr/local/ImageMagick-6.3.3/share/ImageMagick-6.3.3/coder.xml"
2007-06-20T16:34:09-03:00 0:01 0.010u 6.3.3 Configure identify[29580]: configure.c/unknown/482/Configure
  Searching for configure file: "/home/welshj/.magick/coder.xml"
2007-06-20T16:34:09-03:00 0:01 0.010u 6.3.3 Configure identify[29580]: configure.c/unknown/482/Configure
  Searching for configure file: "coder.xml"
2007-06-20T16:34:09-03:00 0:01 0.010u 6.3.3 Configure identify[29580]: coder.c/unknown/614/Configure
  Loading coder map "/usr/local/ImageMagick-6.3.3/share/ImageMagick-6.3.3/config/coder.xml" ...
2007-06-20T16:34:09-03:00 0:01 0.010u 6.3.3 Module identify[29580]: module.c/unknown/1065/Module
  Searching for module "TIFF" using filename "tiff.la"
2007-06-20T16:34:09-03:00 0:01 0.010u 6.3.3 Module identify[29580]: module.c/unknown/582/Module
  Searching for coder module file "tiff.la" ...
2007-06-20T16:34:09-03:00 0:01 0.010u 6.3.3 Module identify[29580]: module.c/unknown/1085/Module
  Opening module at path "/usr/local/ImageMagick-6.3.3/lib/ImageMagick-6.3.3/modules-Q16/coders/tiff.la"
2007-06-20T16:34:09-03:00 0:01 0.030u 6.3.3 Module identify[29580]: module.c/unknown/1120/Module
  Method "RegisterTIFFImage" in module "TIFF" at address fe884a84
2007-06-20T16:34:09-03:00 0:01 0.030u 6.3.3 Module identify[29580]: module.c/unknown/1135/Module
  Method "UnregisterTIFFImage" in module "TIFF" at address fe884c9c
2007-06-20T16:34:09-03:00 0:01 0.030u 6.3.3 Blob identify[29580]: blob.c/unknown/2184/Blob
    read 4096 magic header bytes
2007-06-20T16:34:09-03:00 0:01 0.100u 6.3.3 Cache identify[29580]: cache.c/unknown/1867/Cache
  destroy 
2007-06-20T16:34:09-03:00 0:01 0.100u 6.3.3 Configure identify[29580]: configure.c/unknown/482/Configure
  Searching for configure file: "/usr/local/ImageMagick-6.3.3/lib/ImageMagick-6.3.3/config/magic.xml"
2007-06-20T16:34:09-03:00 0:01 0.100u 6.3.3 Configure identify[29580]: configure.c/unknown/482/Configure
  Searching for configure file: "/usr/local/ImageMagick-6.3.3/share/ImageMagick-6.3.3/config/magic.xml"
2007-06-20T16:34:09-03:00 0:01 0.100u 6.3.3 Configure identify[29580]: configure.c/unknown/482/Configure
  Searching for configure file: "/usr/local/ImageMagick-6.3.3/share/doc/ImageMagick-6.3.3/magic.xml"
2007-06-20T16:34:09-03:00 0:01 0.100u 6.3.3 Configure identify[29580]: configure.c/unknown/482/Configure
  Searching for configure file: "/usr/local/ImageMagick-6.3.3/share/ImageMagick-6.3.3/magic.xml"
2007-06-20T16:34:09-03:00 0:01 0.100u 6.3.3 Configure identify[29580]: configure.c/unknown/482/Configure
  Searching for configure file: "/home/welshj/.magick/magic.xml"
2007-06-20T16:34:09-03:00 0:01 0.100u 6.3.3 Configure identify[29580]: configure.c/unknown/482/Configure
  Searching for configure file: "magic.xml"
2007-06-20T16:34:09-03:00 0:01 0.100u 6.3.3 Configure identify[29580]: magic.c/unknown/673/Configure
  Loading magic map "/usr/local/ImageMagick-6.3.3/share/ImageMagick-6.3.3/config/magic.xml" ...
2007-06-20T16:34:09-03:00 0:01 0.110u 6.3.3 Blob identify[29580]: blob.c/unknown/2184/Blob
    read 4096 magic header bytes
2007-06-20T16:34:09-03:00 0:01 0.110u 6.3.3 Cache identify[29580]: cache.c/unknown/1867/Cache
  destroy 
2007-06-20T16:34:09-03:00 0:01 0.110u 6.3.3 Blob identify[29580]: blob.c/unknown/2184/Blob
    read 4096 magic header bytes
2007-06-20T16:34:09-03:00 0:01 0.110u 6.3.3 Locale identify[29580]: locale.c/unknown/498/Locale
  Searching for locale file: "/usr/local/ImageMagick-6.3.3/lib/ImageMagick-6.3.3/config/locale.xml"
2007-06-20T16:34:09-03:00 0:01 0.110u 6.3.3 Locale identify[29580]: locale.c/unknown/498/Locale
  Searching for locale file: "/usr/local/ImageMagick-6.3.3/share/ImageMagick-6.3.3/config/locale.xml"
2007-06-20T16:34:09-03:00 0:01 0.110u 6.3.3 Locale identify[29580]: locale.c/unknown/498/Locale
  Searching for locale file: "/usr/local/ImageMagick-6.3.3/share/doc/ImageMagick-6.3.3/locale.xml"
2007-06-20T16:34:09-03:00 0:01 0.110u 6.3.3 Locale identify[29580]: locale.c/unknown/498/Locale
  Searching for locale file: "/usr/local/ImageMagick-6.3.3/share/ImageMagick-6.3.3/locale.xml"
2007-06-20T16:34:09-03:00 0:01 0.110u 6.3.3 Locale identify[29580]: locale.c/unknown/498/Locale
  Searching for locale file: "/home/welshj/.magick/locale.xml"
2007-06-20T16:34:09-03:00 0:01 0.120u 6.3.3 Locale identify[29580]: locale.c/unknown/498/Locale
  Searching for locale file: "locale.xml"
2007-06-20T16:34:09-03:00 0:01 0.120u 6.3.3 Configure identify[29580]: locale.c/unknown/830/Configure
  Loading locale map "/usr/local/ImageMagick-6.3.3/lib/ImageMagick-6.3.3/config/locale.xml" ...
2007-06-20T16:34:09-03:00 0:01 0.120u 6.3.3 Configure identify[29580]: locale.c/unknown/830/Configure
  Loading locale map "/usr/local/ImageMagick-6.3.3/lib/ImageMagick-6.3.3/config/english.xml" ...
2007-06-20T16:34:09-03:00 0:01 0.210u 6.3.3 Exception identify[29580]: tiff.c/unknown/294/Exception
  test.tif: unknown field with tag 37724 (0x935c) encountered. `TIFFReadDirectory'
2007-06-20T16:34:09-03:00 0:01 0.250u 6.3.3 Coder identify[29580]: tiff.c/unknown/487/Coder
  Geometry: 1024x1139
2007-06-20T16:34:09-03:00 0:01 0.250u 6.3.3 Coder identify[29580]: tiff.c/unknown/489/Coder
  Interlace: 1
2007-06-20T16:34:09-03:00 0:01 0.250u 6.3.3 Coder identify[29580]: tiff.c/unknown/491/Coder
  Bits per sample: 8
2007-06-20T16:34:09-03:00 0:01 0.250u 6.3.3 Coder identify[29580]: tiff.c/unknown/493/Coder
  Min sample value: 0
2007-06-20T16:34:09-03:00 0:01 0.250u 6.3.3 Coder identify[29580]: tiff.c/unknown/495/Coder
  Max sample value: 255
2007-06-20T16:34:09-03:00 0:01 0.250u 6.3.3 Coder identify[29580]: tiff.c/unknown/521/Coder
  Photometric: RGB
Segmentation fault (core dumped)

Re: Solaris version of IM crashing with Adobe PhotoElements TIF

Posted: 2007-06-20T13:07:41-07:00
by magick
We need the output of the where command of gdb. That should tell us where the fault occurs-- inside ImageMagick or inside the TIFF delegate library.

Re: Solaris version of IM crashing with Adobe PhotoElements TIF

Posted: 2007-06-21T08:47:59-07:00
by dnagirl
#0 0xfee63984 in strncasecmp () from /usr/lib/libc.so.1

#1 0xfe951ff8 in ReadProfile (image=0x42b10, name=0xfe9575b0 "tiff:37724",

datum=0x6532d0 "Adobe Photoshop Document Data Block", length=553391020) at coders/tiff.c:195

#2 0xfe954450 in ReadTIFFImage (image_info=0x2b500, exception=0x21c30) at coders/tiff.c:607

#3 0xff15f9fc in ReadImage (image_info=0x273f8, exception=0x21c30) at magick/constitute.c:451

#4 0xff064b1c in IdentifyImageCommand (image_info=0x23250, argc=2, argv=0x22ba8, metadata=0xffbfec04, exception=0x21c30)

at wand/identify.c:284

#5 0x00010c6c in main (argc=2, argv=0xffbfec7c) at utilities/identify.c:10



This is the output from truss:

fstat64(3, 0xFFBFA6B0) = 0

Incurred fault #6, FLTBOUNDS %pc = 0xFEE63984

siginfo: SIGSEGV SEGV_MAPERR addr=0x00C00000

Received signal #11, SIGSEGV [default]

siginfo: SIGSEGV SEGV_MAPERR addr=0x00C00000

Re: Solaris version of IM crashing with Adobe PhotoElements TIF

Posted: 2007-06-21T09:54:54-07:00
by magick
The problem appears to be in your version of the TIFF delegate library. ImageMagick calls
  • TIFFGetField(tiff,37724,&length,&profile)
\

which returns bogus information on your system. It returns a length of 553391020. On our system it returns the correct length of 8444 (Fedora Core). Type
  • identify -list format
and make sure you have TIFF version 3.8.2. If not, upgrade. If so, your bug report should go to the TIFF folks. Or you can remove the call for tag 37724 from your version of ImageMagick in coders/tiff.c.

Re: Solaris version of IM crashing with Adobe PhotoElements TIF

Posted: 2007-06-21T10:09:29-07:00
by dnagirl
checked version of libtiff. It is definitely 3.8.2
Sent your recommendations to our sysadmin.

Thanks for your help.

Cheers,
Jen