import crashes when Image DPI is From file

Bug #1479193 reported by scribblemaniac on 2015-07-29
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
High
Mc

Bug Description

I recently came across a PNG file that Inkscape was not able to import. When importing the image, if the Image DPI import setting is set to From file, then Inkscape shows an alert saying that it has encountered an internal error and shuts down. It does not crash however if the DPI import setting is set to Default import resolution. I have attached a plain image that consistently exhibits this behavior.

Inkscape version: 0.91
Operating system: Mac OS X 10.10
GDB output (the crash occurred the line after New Thread 0x164b):
(gdb) run
Starting program: /opt/homebrew-cask/Caskroom/inkscape/0.91-1/Inkscape.app/Contents/MacOS/Inkscape
warning: `/BinaryCache/coreTLS/coreTLS-35.30.2~2/Objects/coretls.build/coretls.build/Objects-normal/i386/system_coretls_vers.o': can't open to read symbols: No such file or directory.
warning: Could not open OSO archive file "/BinaryCache/coreTLS/coreTLS-35.30.2~2/Symbols/BuiltProducts/libcoretls_ciphersuites.a"
warning: Could not open OSO archive file "/BinaryCache/coreTLS/coreTLS-35.30.2~2/Symbols/BuiltProducts/libcoretls_handshake.a"
warning: Could not open OSO archive file "/BinaryCache/coreTLS/coreTLS-35.30.2~2/Symbols/BuiltProducts/libcoretls_record.a"
warning: Could not open OSO archive file "/BinaryCache/coreTLS/coreTLS-35.30.2~2/Symbols/BuiltProducts/libcoretls_stream_parser.a"
warning: `/BinaryCache/cmph/cmph-1~1091/Objects/cmph.build/cmph.build/Objects-normal/i386/bdz.o': can't open to read symbols: No such file or directory.
warning: `/BinaryCache/cmph/cmph-1~1091/Objects/cmph.build/cmph.build/Objects-normal/i386/bdz_ph.o': can't open to read symbols: No such file or directory.
warning: `/BinaryCache/cmph/cmph-1~1091/Objects/cmph.build/cmph.build/Objects-normal/i386/bmz.o': can't open to read symbols: No such file or directory.
warning: `/BinaryCache/cmph/cmph-1~1091/Objects/cmph.build/cmph.build/Objects-normal/i386/bmz8.o': can't open to read symbols: No such file or directory.
warning: `/BinaryCache/cmph/cmph-1~1091/Objects/cmph.build/cmph.build/Objects-normal/i386/brz.o': can't open to read symbols: No such file or directory.
warning: `/BinaryCache/cmph/cmph-1~1091/Objects/cmph.build/cmph.build/Objects-normal/i386/buffer_entry.o': can't open to read symbols: No such file or directory.
warning: `/BinaryCache/cmph/cmph-1~1091/Objects/cmph.build/cmph.build/Objects-normal/i386/buffer_manager.o': can't open to read symbols: No such file or directory.
warning: `/BinaryCache/cmph/cmph-1~1091/Objects/cmph.build/cmph.build/Objects-normal/i386/chd.o': can't open to read symbols: No such file or directory.
warning: `/BinaryCache/cmph/cmph-1~1091/Objects/cmph.build/cmph.build/Objects-normal/i386/chd_ph.o': can't open to read symbols: No such file or directory.
warning: `/BinaryCache/cmph/cmph-1~1091/Objects/cmph.build/cmph.build/Objects-normal/i386/chm.o': can't open to read symbols: No such file or directory.
warning: `/BinaryCache/cmph/cmph-1~1091/Objects/cmph.build/cmph.build/Objects-normal/i386/cmph.o': can't open to read symbols: No such file or directory.
warning: `/BinaryCache/cmph/cmph-1~1091/Objects/cmph.build/cmph.build/Objects-normal/i386/cmph_structs.o': can't open to read symbols: No such file or directory.
warning: `/BinaryCache/cmph/cmph-1~1091/Objects/cmph.build/cmph.build/Objects-normal/i386/compressed_rank.o': can't open to read symbols: No such file or directory.
warning: `/BinaryCache/cmph/cmph-1~1091/Objects/cmph.build/cmph.build/Objects-normal/i386/compressed_seq.o': can't open to read symbols: No such file or directory.
warning: `/BinaryCache/cmph/cmph-1~1091/Objects/cmph.build/cmph.build/Objects-normal/i386/fch.o': can't open to read symbols: No such file or directory.
warning: `/BinaryCache/cmph/cmph-1~1091/Objects/cmph.build/cmph.build/Objects-normal/i386/fch_buckets.o': can't open to read symbols: No such file or directory.
warning: `/BinaryCache/cmph/cmph-1~1091/Objects/cmph.build/cmph.build/Objects-normal/i386/graph.o': can't open to read symbols: No such file or directory.
warning: `/BinaryCache/cmph/cmph-1~1091/Objects/cmph.build/cmph.build/Objects-normal/i386/hash.o': can't open to read symbols: No such file or directory.
warning: `/BinaryCache/cmph/cmph-1~1091/Objects/cmph.build/cmph.build/Objects-normal/i386/jenkins_hash.o': can't open to read symbols: No such file or directory.
warning: `/BinaryCache/cmph/cmph-1~1091/Objects/cmph.build/cmph.build/Objects-normal/i386/linear_string_map.o': can't open to read symbols: No such file or directory.
warning: `/BinaryCache/cmph/cmph-1~1091/Objects/cmph.build/cmph.build/Objects-normal/i386/miller_rabin.o': can't open to read symbols: No such file or directory.
warning: `/BinaryCache/cmph/cmph-1~1091/Objects/cmph.build/cmph.build/Objects-normal/i386/select.o': can't open to read symbols: No such file or directory.
warning: `/BinaryCache/cmph/cmph-1~1091/Objects/cmph.build/cmph.build/Objects-normal/i386/vqueue.o': can't open to read symbols: No such file or directory.
warning: `/BinaryCache/cmph/cmph-1~1091/Objects/cmph.build/cmph.build/Objects-normal/i386/vstack.o': can't open to read symbols: No such file or directory.
[New Thread 0x1113 of process 27938]
[New Thread 0x1203 of process 27938]
[New Thread 0x1303 of process 27938]
[New Thread 0x1403 of process 27938]
[New Thread 0x1503 of process 27938]
warning: `/BinaryCache/CoreServicesInternal/CoreServicesInternal-221.7.2~1/Objects/CoreServicesInternal.build/CoreServicesInternal.build/Objects-normal/i386/BookmarkCommon.o': can't open to read symbols: No such file or directory.
warning: `/BinaryCache/CoreServicesInternal/CoreServicesInternal-221.7.2~1/Objects/CoreServicesInternal.build/CoreServicesInternal.build/Objects-normal/i386/BookmarkData.o': can't open to read symbols: No such file or directory.
warning: `/BinaryCache/CoreServicesInternal/CoreServicesInternal-221.7.2~1/Objects/CoreServicesInternal.build/CoreServicesInternal.build/Objects-normal/i386/CFURLAliasInteroperability.o': can't open to read symbols: No such file or directory.
warning: `/BinaryCache/CoreServicesInternal/CoreServicesInternal-221.7.2~1/Objects/CoreServicesInternal.build/CoreServicesInternal.build/Objects-normal/i386/CFURLBookmark.o': can't open to read symbols: No such file or directory.
warning: `/BinaryCache/CoreServicesInternal/CoreServicesInternal-221.7.2~1/Objects/CoreServicesInternal.build/CoreServicesInternal.build/Objects-normal/i386/CFURLBookmarkFile.o': can't open to read symbols: No such file or directory.
warning: `/BinaryCache/CoreServicesInternal/CoreServicesInternal-221.7.2~1/Objects/CoreServicesInternal.build/CoreServicesInternal.build/Objects-normal/i386/CFURLBookmarkProperties.o': can't open to read symbols: No such file or directory.
warning: `/BinaryCache/CoreServicesInternal/CoreServicesInternal-221.7.2~1/Objects/CoreServicesInternal.build/CoreServicesInternal.build/Objects-normal/i386/CFURLBookmarkResolution.o': can't open to read symbols: No such file or directory.
warning: `/BinaryCache/CoreServicesInternal/CoreServicesInternal-221.7.2~1/Objects/CoreServicesInternal.build/CoreServicesInternal.build/Objects-normal/i386/CoreServicesInternal_vers.o': can't open to read symbols: No such file or directory.
warning: `/BinaryCache/CoreServicesInternal/CoreServicesInternal-221.7.2~1/Objects/CoreServicesInternal.build/CoreServicesInternal.build/Objects-normal/i386/ExternalProvider.o': can't open to read symbols: No such file or directory.
warning: `/BinaryCache/CoreServicesInternal/CoreServicesInternal-221.7.2~1/Objects/CoreServicesInternal.build/CoreServicesInternal.build/Objects-normal/i386/FileURL.o': can't open to read symbols: No such file or directory.
warning: `/BinaryCache/CoreServicesInternal/CoreServicesInternal-221.7.2~1/Objects/CoreServicesInternal.build/CoreServicesInternal.build/Objects-normal/i386/FileURLEnumerator.o': can't open to read symbols: No such file or directory.
warning: `/BinaryCache/CoreServicesInternal/CoreServicesInternal-221.7.2~1/Objects/CoreServicesInternal.build/CoreServicesInternal.build/Objects-normal/i386/FileURLReplaceObject.o': can't open to read symbols: No such file or directory.
warning: `/BinaryCache/CoreServicesInternal/CoreServicesInternal-221.7.2~1/Objects/CoreServicesInternal.build/CoreServicesInternal.build/Objects-normal/i386/PlatformUtils.o': can't open to read symbols: No such file or directory.
warning: `/BinaryCache/CoreServicesInternal/CoreServicesInternal-221.7.2~1/Objects/CoreServicesInternal.build/CoreServicesInternal.build/Objects-normal/i386/ScopedBookmarksClient.o': can't open to read symbols: No such file or directory.
warning: `/BinaryCache/CoreServicesInternal/CoreServicesInternal-221.7.2~1/Objects/CoreServicesInternal.build/CoreServicesInternal.build/Objects-normal/i386/ftsattr.o': can't open to read symbols: No such file or directory.
Error while mapping shared library sections:
cl_kernels: No such file or directory.
Error while mapping shared library sections:
cl_kernels: No such file or directory.
[New Thread 0x164b of process 27938]
libpng warning: iCCP: known incorrect sRGB profile
/Users/su_v/TEMP/inkscape-dist/inkscape-0.91/src/extension/internal/image-resolution.cpp(157) readpng: readpng
x_: 0.025400
y_: 0.025400
/Users/su_v/TEMP/inkscape-dist/inkscape-0.91/src/extension/internal/image-resolution.cpp(161) readpng: success
Assertion failed: (this->is_initialized()), function get, file /Volumes/magenta/mp-trunk/x11/include/boost/optional/optional.hpp, line 992.

Emergency save activated!
Emergency save completed. Inkscape will close now.
If you can reproduce this crash, please file a bug at www.inkscape.org
with a detailed description of the steps leading to the crash, so we can fix it.
[New Thread 0x170b of process 27938]
[Inferior 1 (process 27938) exited normally]
(gdb) bt
No stack.

scribblemaniac (scribblemaniac) wrote :
description: updated
su_v (suv-lp) on 2015-07-29
tags: added: bitmap
su_v (suv-lp) wrote :

Crash reproduced with 0.91 r13725 and 0.91+devel r14267 on OS X 10.7.5 - AFAICT thus not a duplicate of bug #1398521 or bug #1410793.

Full backtrace of Inkscape 0.91+devel r14260 attached.

su_v (suv-lp) wrote :

Image info (identify from ImageMagick 6.9.1-6) attached.

Size information:
  Geometry: 410x436+0+0
  Resolution: 0.01x0.01
  Print size: 41000x43600
  Units: PixelsPerCentimeter

Changed in inkscape:
importance: Undecided → High
status: New → Confirmed
su_v (suv-lp) wrote :

Crash also reproduced with Inkscape 0.91 r13725 on Ubuntu 14.04.2 LTS (VM 64bit; host: OS X 10.7.5).

Le Mercredi 29 juillet 2015 6h30, ~suv <email address hidden> a écrit :

>> Resolution: 0.01x0.01
>> Print size: 41000x43600
>
>@JazzyNico - could this import failure be related to the cairo size

>limit (see e.g. bug #1175692, comment #9)?

Apparently not. The images affected by the Cairo size limit don't render, but don't crash. Here, the application crashes in (or just after) 2geom. Maybe an issue with the very low resolution of the file?

Mc (mc...) wrote :

fixed in r14307

Changed in inkscape:
assignee: nobody → Mc (mc...)
status: Confirmed → Fix Committed
Mc (mc...) wrote :

(the problem was that the scaling factor was "floored" to 0.1 precision, and not "rounded", so that with big scales it was floored to 0.... and numerical hell followed. (dividing by 0 led to "inf" values -which did not provoke the crash, but led to "nan" values, which did-)

scribblemaniac (scribblemaniac) wrote :

Thank you! Good job tracking down and fixing the bug :D

su_v (suv-lp) on 2015-08-17
Changed in inkscape:
milestone: none → 0.92
su_v (suv-lp) wrote :

Backport diff provided by Mc (thanks!).

tags: added: backport-proposed
su_v (suv-lp) wrote :

Fix backported to 0.91.x in rev 13833.

Changed in inkscape:
milestone: 0.92 → 0.91.1
tags: removed: backport-proposed
jazzynico (jazzynico) on 2017-01-28
Changed in inkscape:
milestone: 0.91.1 → 0.92
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers