crash when previewing corrupted jpg file

Bug #228697 reported by Cerno
4
Affects Status Importance Assigned to Milestone
Inkscape
Confirmed
High
Unassigned

Bug Description

When trying to open the attached .jpg file in the "open file..." dialog, Inkscape attempts to preview the file which causes a hard crash.

The file was made with a digital camera whose xd-card sometimes corrupts the picture files. I have a couple more of these files if that helps.
The crash does not occur when drag-and-dropping the file to Inkscape but then nothing happens (because the file is corrupt)

2 things follow from this:

- corrupt jpg files probably throw an exception that is not caught
- drag and dropping corrupt files should cause an error message, not just "nothing", which could confuse users.

Cheers,
Cerno

Revision history for this message
Cerno (jan-biel) wrote :
description: updated
Revision history for this message
Alvin Penner (apenner) wrote :

running win32 build from May 2
In DOS I get the exit message :
C:\Python25\APP>python inkcl.py
return code: 3
terminate called after throwing an instance of 'Gdk::PixbufError'

Emergency save activated!

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

similar to Bug 226459

Revision history for this message
amphi (i-launchpad-kaioa-com) wrote :

Duplicate of:
Gtk::PixbufError exception not caught in Windows
https://bugs.launchpad.net/inkscape/+bug/173116

Revision history for this message
mfn (mfn) wrote :

I found a new bug with jpg files.
The bug was added to the source between 2008-29-08 and 2008-09-09. On Windows its impossible to import any jpg files, I tested around 20 from different sources.

If imported via File-> Import or opened via File -> Open Inkscape chrashes as soon as the file is selected (if preview is disable it crashes after clicking the button), when I try Drag&Drop it's just not imported.
I have no debugging Symbols, because I use the nightly build that is linked on the Download page. But perhaps the backtrace helps without the symbols. I attached it.

tags: added: bitmap crash
jazzynico (jazzynico)
Changed in inkscape:
importance: Undecided → High
Revision history for this message
jazzynico (jazzynico) wrote :

Not reproduced on Ubuntu 9.10.

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

Not reproduced with Inkscape 0.47+devel r8972 on OS X 10.5.8

Inkscape displays a dialog with the message:
"Failed to load the requested file /path/to/DSCF5061.JPG"

Inkscape console message:
** Message: error loading pixbuf at close

Apple's 'Preview' application loads the corrupted image, but warns in the console:
Thu Jan 14 14:28:00 LeWitt.local Preview[96607] <Error>: Corrupt JPEG data: found marker 0xfa instead of RST4

Revision history for this message
sas (sas-sas) wrote :

Reproduced with Inkscape 0.47 on Windows XP. As amphi says above, this is a duplicate of bug 173116 - so it only occurs on Windows.

The bug reported by mfn is a separate issue, and appears to be fixed - I have no problem importing normal JPEG files in Inkscape 0.47.

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.