[devlibs-gtk3] Crash when clicking on Export As...

Bug #1257007 reported by jazzynico on 2013-12-02
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
High
jazzynico
Inkscape Devlibs
High
jazzynico

Bug Description

In the Export Bitmap dialog, Inkscape crashes when clicking on the Export As button.
Console message:
---
(inkscape.exe:3864): Gtk-CRITICAL **: gtk_window_set_transient_for: assertion 'parent == NULL || GTK_IS_WINDOW (parent)' failed
(inkscape.exe:3864): GLib-GObject-WARNING **: invalid uninstantiatable type '(null)' in cast to 'GtkWidget'
(inkscape.exe:3864): Gtk-CRITICAL **: gtk_widget_get_window: assertion 'GTK_IS_WIDGET (widget)' failed
---
Backtrace:
---
Program received signal SIGSEGV, Segmentation fault.
0x02773c94 in ?? () from Z:\Inkscape\bzr-gtk3\inkscape\libgdk-3-0.dll
(gdb) bt
#0 0x02773c94 in ?? () from Z:\Inkscape\bzr-gtk3\inkscape\libgdk-3-0.dll
#1 0x664dcab8 in ?? () from Z:\Inkscape\bzr-gtk3\inkscape\libglibmm-2.4-1.dll
#2 0x02c00078 in ?? () from Z:\Inkscape\bzr-gtk3\inkscape\libgtk-3-0.dll
Cannot access memory at address 0x40020006

jazzynico (jazzynico) wrote :

Additional notes:
- The same console message also show when running an Inkscape trunk version compiled with the official devlibs (it just doesn't crash).
- The Export As... button always open a native window, and thus the bug can't be workarounded by switching to GTK style windows in the preferences.

jazzynico (jazzynico) on 2013-12-04
Changed in inkscape-devlibs:
assignee: nobody → jazzynico (jazzynico)
status: Triaged → In Progress
jazzynico (jazzynico) wrote :

Patch attached.
Tested on Windows XP, Inkscape trunk revision 12836 and devlibs-gtk3. Inkscape no longer crashes and only show the first console message (gtk_window_set_transient_for), that seems unrelated to the crash (and also seen with other operating systems).

Note that the win32 dialog code in export.cpp is borrowed from an old version of ui/dialogs/filedialogimpl-win32.cpp. A cleaner fix would be to implement a proper export dialog in that file and not in export.cpp.

<opinion>
Native dialogs, I hate you ;)
</opinion>

jazzynico (jazzynico) wrote :

Also tested successfully with the official devlibs.

jazzynico (jazzynico) wrote :

Fixed in the trunk, revision 12840.

Occurs with devlibs-gtk3 only, but the bug seems to be in the Inkscape code.
Note that the patch also removes the last two console messages reported in the original description (the first message is not related to the win32 dialog).

Changed in inkscape:
importance: Undecided → High
milestone: none → 0.49
status: New → Fix Committed
assignee: nobody → jazzynico (jazzynico)
Changed in inkscape-devlibs:
status: In Progress → Invalid
tags: added: crash win32
Changed in inkscape:
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