crash when loading a specific tif file using the option 'DPI from file'

Bug #1447131 reported by Alvin Penner
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
High
Unassigned
Inkscape Devlibs
Triaged
Medium
Unassigned

Bug Description

this may be related to Bug 1447012 or Bug 1447115, but it occurs only with a tif file, not with jpg, so I decided to report it separately.
Also, it occurs only if I use the option 'Image DPI from file', not when I use the option 'Default import resolution'.

- Windows XP, Inkscape 0.91+devel r14057 (Apr 16 2015)
- also Windows 7, Inkscape 0.91

- use File Open, load the file choppoint_logo.tif
- use the options 'Embed', 'DPI From File', 'None (auto)'.
- get crash, no interesting messages in DOS

in trunk get the following backtrace, not interesting:

Reading symbols from C:\InkscapeBZR\inkscape/inkscape.dbg...done.
(gdb) run
Starting program: C:\InkscapeBZR\inkscape/inkscape.exe
[New thread 3552.0xda8]
[New thread 3552.0x948]
[New thread 3552.0xbf8]
[New thread 3552.0xe60]
[New thread 3552.0x73c]
[New thread 3552.0x110]
[New thread 3552.0x288]
[New thread 3552.0x560]
warning: Lowest section in C:\WINDOWS\system32\xpsp2res.dll is .rsrc at 00011000

Program exited with code 03.
(gdb) bt
No stack.
(gdb) c
The program is not being run.
(gdb) quit

Revision history for this message
Alvin Penner (apenner) wrote :
Revision history for this message
Alvin Penner (apenner) wrote :

not reproduced when I load the attached file lighthouse.tif, using the same options as above.

Revision history for this message
Alvin Penner (apenner) wrote :

the crash appears to be related to the resolution information embedded in the file.

for the file lighthouse.tif, the resolution is reported as 72dpi in Windows Explorer, and the file image-resolution.cpp in the routine readmagick() reports image.xResolution() = 72 as expected.

for the file choppoint_logo.tif, the resolution is reported as 300dpi in Windows Explorer, and the crash occurs somewhere in the routine ImageResolution::readmagick(char const *fn).

Revision history for this message
su_v (suv-lp) wrote :

No crash with Inkscape 0.91+devel r14058 on OS X 10.7.5, but this error message on the console (the image otherwise opens ok):

** (inkscape:90484): WARNING **: ImageResolution::readmagick: Unknown error

Current Inkscape trunk build uses ImageMagick 6.9.0 (which has tiff 4.0.3 as dependency).

tags: added: bitmap crash importing win32
Changed in inkscape:
importance: Undecided → High
Revision history for this message
su_v (suv-lp) wrote :

Clarification wrt tests on OS X:

1) The file 'choppoint_logo.tif' imports without warning or other error messages, using ImageMagick successfully to read the image resolution (300dpi)).

2) The file 'lighthouse.tif' imports successfully but fails to retrieve the image resolution from the file due to the mentioned ImageMagick error:
** (inkscape:33911): WARNING **: ImageResolution::readmagick: Unknown error

Opening 'lighthouse.tif' directly with ImageMagick's 'display' command reveals this information:
display: Incompatible type for "FileSource"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/878.
display: Incompatible type for "SceneType"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/878.

Revision history for this message
jazzynico (jazzynico) wrote :

Not reproduced on Crunchbang Waldorf, Inkscape trunk rev. 14120. Both TIFF files load correctly, with no console message.

Revision history for this message
jazzynico (jazzynico) wrote :

Crash reproduced on Windows XP (32bits), Inkscape trunk rev. 14142.

Changed in inkscape:
status: New → Confirmed
Revision history for this message
jazzynico (jazzynico) wrote :

The win32 devlibs version of ImageMagick is rather old (6.5.9, 2010-01-01) and recent versions seem to fix some TIFF related bugs (see http://www.imagemagick.org/script/changelog.php).

Revision history for this message
jazzynico (jazzynico) wrote :

On Crunchbang Waldorf, the Image Magick package is 6.7.7.10.

jazzynico (jazzynico)
Changed in inkscape:
status: Confirmed → Triaged
Revision history for this message
jazzynico (jazzynico) wrote :

The issue is not due to Inkscape itself, but to ImageMagick, and more precisely to how it was compiled in our devlibs (exceptions are not correctly handled).

I'm going to take a look at GraphicsMagick to see if it compiles correctly on Windows. I'm quite sure that we don't use recent IM features and thus the GM API should be compatible with our code (via Magick++).

Changed in inkscape-devlibs:
importance: Undecided → Medium
status: New → Triaged
Changed in inkscape:
status: Triaged → Fix Released
jazzynico (jazzynico)
Changed in inkscape:
status: Fix Released → Triaged
Revision history for this message
Alvin Penner (apenner) wrote :

I can no longer reproduce this on Windows 10, Inkscape 1.0alpha (9cedb1b, 2019-02-08)

Changed in inkscape:
status: Triaged → Fix Committed
Max Gaukler (mgmax)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.