Some PNGs cause crash on import

Bug #1460319 reported by Lucian
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
New
Undecided
Unassigned

Bug Description

The two attached PNGs are very similar. One of them is taken from the iconset of a program I use. Importing it into Inkscape 0.91+devel r14188 results in an immediate crash. The other one is the same PNG, loaded into GIMP and then re-exported. It imports fine into Inkscape. This is a regression against 0.91, where both PNGs import OK.

Observed on MacOS 10.10.3

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

Known issue, see
* Bug #1398521 “importing graphics crashes app on OS X in 0.91”
* Bug #1410793 “inkscape crashes when pasting image from clipboard...”

The official OS X packages of Inkscape 0.91 have been compiled with a small change (debug messages which oddly prevent the crash from occurring). The development shapshot builds intentionally do not include this "workaround" because the underlying issue is not solved yet.

Proposing to link as duplicate to bug #1398521.

tags: added: bitmap crash importing osx
Revision history for this message
Brynn (brynn4inks-deactivatedaccount) wrote :

Not reproduced on Windows 7, sp1, 64-bit with Inkscape 0.91, 32-bit (exe installer) (r 13725) using either link or embed option. :-)

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

Console messages when importing the two bitmap images with Inkscape 0.91 (patched as mentioned in comment 1), using default import options (embed, resolution from file):

1) nocrash.png

../../src/extension/internal/image-resolution.cpp(157) readpng: readpng
x_: 72.009000
y_: 72.009000
../../src/extension/internal/image-resolution.cpp(161) readpng: success

2) crash.png

../../src/extension/internal/image-resolution.cpp(157) readpng: readpng
x_: 0.000000
y_: 0.000000
../../src/extension/internal/image-resolution.cpp(163) readpng: failure
../../src/extension/internal/image-resolution.cpp(422) readmagick: ImageMagick fallback
x_: 0.000000
y_: 0.000000
../../src/extension/internal/image-resolution.cpp(428) readmagick: failure
../../src/extension/internal/image-resolution.cpp(79) ImageResolution: Failed to retrieve image size based on image resolution.

Revision history for this message
Lucian (lucian-j) wrote :

Apologies, I did have a look to see if I could see an existing bug, but I was being blinkered and searched with "PNG" rather than "graphics" so I missed that other bug. Happy for this to be closed as a duplicate; not sure if having the two very similar files, one of which causes the crash and the other doesn't is of any additional help. I did try to compare them with a binary diff but I don't know enough about the PNG data format to be able to make any sense of it unfortunately.

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

Any chance you could test the different import options with the "faulty" PNG image ('crash.png'), and any combination thereof?
- Image Import Type (embed | link)
- Image DPI (From file | Default import resolution)

Revision history for this message
Lucian (lucian-j) wrote :

Yep, just tested and I only get the problems when the Image DPI is taken from the file (both embed and link crash). With default import resolution, both embedding and linking are fine.

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

Thank you for sharing the details about the additional tests.

Linking as duplicate to bug #1398521.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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