Crash on win32 open/import dialog with file with invalid header

Bug #438492 reported by Will Pittenger
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Incomplete
Undecided
Unassigned

Bug Description

Inkscape 0.47pre2 (built Sep 2 2009) on Vista 64-bit SP2 is unable to preview the selected file when it happens to be the attached ICO. I eliminated other resolutions in the ICO in an attempt to isolate a problem resolution. I don't know if the others would as well or not. For all know, any ICO would cause this crash.

What happens requires you to select the ICO in the file open dialog. Inkscape will immediately crash with a "The program has requested that it close in an unusual way" dialog. This only happens if the preview pane that Inkscape adds to the file open dialog is visible. If you close that pane and then attempt to open the attached file, Inkscape will simply fail to open the file. It won't crash.

I suggest that someone attempt to have Inkscape import the attached ICO in non-Windows platforms to see if it does better there.

Revision history for this message
Will Pittenger (will-pittenger1) wrote :
Revision history for this message
Will Pittenger (will-pittenger1) wrote :
Revision history for this message
ScislaC (scislac) wrote :

Will,

Both of the files contain invalid headers.

Inkscape does not crash on Linux, but fails to open them. Additionally, the default image viewer will not open them either (due to the invalid headers). I used a win32 app (via wine) called iconsushi to open and resave the first file. It now opens fine in Inkscape and the default image viewer as expected.

Whatever app you are using to produce the files is the culprit for not writing the file correctly, not on inkscape for the reading side.

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

- running Windows XP, Inkscape 0.47pre3.
- If I attempt to load this file, with no preview, then I get a failure to load, with a large number of messages saying :

(inkscape.exe:2772): GdkPixbuf-CRITICAL **: gdk_pixbuf_loader_write: assertion `priv->closed == FALSE' failed

However, this file is somewhat unusual: On Windows XP I cannot load this file into Microsoft Paint, or Microsoft Photo Editor, or Windows Picture and Fax Viewer, or Paint.NET. It appears to be 24 bit color afaict. Which software was used to create this file?

Revision history for this message
ScislaC (scislac) wrote :

Given that this was an invalid file as opposed to a problem with Inkscape, I'm closing it as invalid.

Changed in inkscape:
status: New → Invalid
Revision history for this message
Will Pittenger (will-pittenger1) wrote :

I have no idea what created the files. Also, Inkscape should never crash on such a file. Refuse to open it? Maybe. (It would still have to tell the user WHY it can't open the file.) But never crash.

Revision history for this message
ScislaC (scislac) wrote :

I know it's a program, but that's like you giving me raw, unidentified meat to consume and expecting me not to barf. ;) I think this is specific to the "custom" win32 dialog preview. Does not happen on linux.

Revision history for this message
Will Pittenger (will-pittenger1) wrote :

Oh. I got the file from the Deviant.com user cletusco.

ScislaC (scislac)
Changed in inkscape:
status: Invalid → Incomplete
summary: - ico file import crash
+ Crash on win32 open/import dialog with file with invalid header
Revision history for this message
su_v (suv-lp) wrote :

related bug reports:
Bug #226459 in Inkscape: “crash on import of some .ani/.ico files”
Bug #239152 in Inkscape: “Crash when opening or previewing some icon files” (duplicate of #226459)
Bug #382152 in Inkscape: “Crash on .ico file”

pointing to
Bug #173116 in Inkscape: “Gtk::PixbufError exception not caught in Windows”

tags: added: crash importing win32
Revision history for this message
Alvin Penner (apenner) wrote :

it is probably worth noting that, if you disable the preview, then Inkscape does _not_ crash, it simply refuses to open, which is perfectly acceptable. It is only the preview code that is crashing, not the actual load.

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

the preview crash message is:
terminate called after throwing an instance of 'Gdk::PixbufError'

Revision history for this message
Will Pittenger (will-pittenger1) wrote :

From the IcoFX author:

Hello,

Thank you for your bug report.

I cannot see any problem with the icons. Both icons are correct.
The difference is that the original icon has a new format.
Microsoft introduced with Windows Vista a new icon format.
In this icon the 256x256 image is compressed as a png.

The fixed icon uses the old format and the 256x256 image is not compressed.
It is stored as a bitmap (this is why the file size is 10x lager).

In my oppinion the problem lies with inkskape that cannot handle the new Vista icon format.

Workaround:
Make sure that "Preferences/Options/Compress 256x256 images for Windows Vista" check box in not checked and then IcoFX will not compress the image when you save it (old format).

If you have any questions don't hesitate to write me.

Best regards,
Attila Kovrig

Revision history for this message
Will Pittenger (will-pittenger1) wrote :

Alvin, I should note that users need a detailed message of why the image won't load. So it would be "Unable to load file...Click for details."

Revision history for this message
theAdib (theadib) wrote :

I did not read the whole thread but this might be related
https://bugs.launchpad.net/inkscape/+bug/173116
pixbuf exceptions can not be catched via dll boundaries. Inkscape will die.

This is an gcc issue an is solved in the latest version (gcc4.4) which we do not use currently.

HTH, the Adib.

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.