Inkscape: A Vector Drawing Tool

Gtk::PixbufError exception not caught in Windows

Reported by Johan Engelen on 2007-11-30
80
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
Critical
Krzysztof Kosinski
Inkscape Devlibs
Critical
Krzysztof Kosinski
MinGW
Unknown
Unknown

Bug Description

For some reason, the code in the testfile does NOT catch the exception on windows. It seems to work for people on Linux, although not on my machine ...

Run the batch file to compile it. Then:
"pixbuferror.exe right.jpg" gives: "Success!"
"pixbuferror.exe wrong.jpg" *should* give: "caught Gdk::PixbufError" but instead gives something like "terminate was called after uncaught exception". For some reason, the catchers do not work!

Related branches

Johan Engelen (johanengelen) wrote :

This seems related:
http://sourceforge.net/mailarchive/message.php?msg_id=E1IUIrP-0002LO-KC%40sc8-sf-web21.sourceforge.net
(the comment by Danny Smith (dannysmith) date: 2007-09-09 13:54)

Changed in inkscape:
importance: Undecided → Critical
status: New → Confirmed
Bryce Harrington (bryce) wrote :

Johan, have you tested the workaround suggested upstream, to build the dll and exe with --shared-libgcc?

Johan Engelen (johanengelen) wrote :

I cannot build the dlls needed for Inkscape on windows. Assigning to Ishmal, who makes the lib binary package on win32.

Changed in inkscape:
assignee: nobody → ishmalius
Bryce Harrington (bryce) wrote :

Ishmal - same question to you?

Changed in inkscape:
milestone: none → 0.46
Bryce Harrington (bryce) wrote :

It sounds like this is a *potential* bug, rather than one that can be reliably reproduced in Inkscape in the wild. In talking with Ishmal, we don't really use C++ exceptions that much for this to be a significant issue, and danny is no longer available as a mingw contact. I'm dropping the milestone and reducing priority to Low.

We should look at it again some day, but if we don't have issues in the wild, this can probably be closed as invalid.

Changed in inkscape:
assignee: ishmalius → nobody
importance: Critical → Medium
milestone: 0.46 → none
amphi (i-launchpad-kaioa-com) wrote :

This bug is the reason behind this critical crash bug:
https://bugs.launchpad.net/inkscape/+bug/168471

I "reproduced" it several times by accident and it's really annoying. ;)

Johan Engelen (johanengelen) wrote :

This is not a potential bug at all. It is highly reproducable (i.e. try it 100 times, it will crash 100 times), see bug 168471.
This bugreport is just a minimal testcase, to help solving it.

I regret this bugreport was dropped this easily, as it took quite some time and the fix seems so easy. It's not *just* a bug, it is a hard crash without data recovery.

Changed in inkscape:
importance: Medium → Critical
sas (sas-sas) wrote :

This bug also causes crashes with Glib::SpawnError exceptions (although they aren't as common as the Gtk::PixbufError crashes).

Ulferikson (ulferikson) wrote :

Wasn't it to avoid the (very common) Glib::SpawnError crashes that BYPASS_GLIB_SPAWN was added to io/sys.cpp? Looks like revision 18041 and bug #204779.

Maybe some code is still using Glib::spawn instead of Inkscape::IO::spawn? This works as long libinskcape is static..

sas (sas-sas) wrote :

I still get Glib::SpawnError crashes in revision 19339. For example, if I open a file, then try to save it as AutoCAD DXF (*.dxf).

jazzynico (jazzynico) on 2010-01-14
tags: added: win32
Krzysztof Kosinski (tweenk) wrote :

This bug requires rebuliding or changing the compiler and rebuilding the devlibs (at least those that use C++) from scratch. I recommend using TDM-GCC build as out compiler, it doesn't have the exception-across-DLLs problem at all regardless of whether -shared-libgcc is used.

Changed in inkscape-devlibs:
status: New → Confirmed
importance: Undecided → Critical
Krzysztof Kosinski (tweenk) wrote :

I rebuilt the C++ DLLs using TDM-GCC, now checking whether this fixes the problem.

Changed in inkscape-devlibs:
assignee: nobody → Krzysztof Kosiński (tweenk)
status: Confirmed → In Progress
Krzysztof Kosinski (tweenk) wrote :

Forgot about poppler and ImageMagick. They're more finicky that the gtkmm stack, but I managed to compile them. Rebuilding again.

Changed in inkscape:
assignee: nobody → Krzysztof Kosinski (tweenk)
status: Confirmed → In Progress
Krzysztof Kosinski (tweenk) wrote :

Success! I have a build that does not crash when importing or opening a corrupted PNG file. Final rebuild test before committing. The MinGW compiler I used will be added to Devlibs.

Krzysztof Kosinski (tweenk) wrote :

Committed as devlibs r11, Inkscape r9041.

Changed in inkscape:
status: In Progress → Fix Committed
Changed in inkscape-devlibs:
status: In Progress → Fix Committed
Johan Engelen (johanengelen) wrote :

This is great great great news, thanks so much !

jazzynico (jazzynico) on 2010-02-15
Changed in inkscape:
milestone: none → 0.48
jazzynico (jazzynico) on 2010-08-24
Changed in inkscape:
status: Fix Committed → Fix Released
Changed in inkscape-devlibs:
status: Fix Committed → Fix Released
jazzynico (jazzynico) wrote :

It seems that the issue is back in 0.48.2 and the trunk (0.48.1 is ok, but it uses a different devlibs revision).

jazzynico (jazzynico) wrote :

Reopening. 0.48.3 and the trunk are affected.

Changed in inkscape-devlibs:
status: Fix Released → Triaged
jazzynico (jazzynico) wrote :

Fixed again in the devlibs, revision 36.

Changed in inkscape-devlibs:
status: Triaged → Fix Released
jazzynico (jazzynico) wrote :

Reopening due to regressions in devlibs r36 (uncommitted).

Changed in inkscape-devlibs:
status: Fix Released → In Progress
jazzynico (jazzynico) wrote :

It should be ok now, devlibs r36.

Changed in inkscape-devlibs:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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