creating new document crashes inkscape

Bug #869067 reported by Marcin Floryan
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
High
Jon A. Cruz

Bug Description

Running Inkscape 0.48+devel r10667 (Oct 6 2011) on openSuSE 12.1 Beta 1 compiled from sources.

Inkscape crashes when creating new document.

Steps to reproduce:
1.) Start inkscape
2.) Create new document (click on the new document icon)
3.) Close new document
4.) Create a new document again

Inkscape crashes.

When you invoke ste[ 2 the following is shown on the console:
** (inkscape:17390): WARNING **: Metadata for error domain "inkscape_error" already registered

Before the crash this is shown:
(inkscape:17390): Gtk-WARNING **: Refusing to add non-unique action 'EditSelectAll' to action group 'main'
(inkscape:17390): Gtk-WARNING **: Refusing to add non-unique action 'EditSelectAllInAllLayers' to action group 'main'

[...]
(inkscape:17390): Gtk-WARNING **: Refusing to add non-unique action 'AutoGapAction' to action group 'main'
(inkscape:17390): Gtk-WARNING **: Refusing to add non-unique action 'PaintbucketResetAction' to action group 'main'

(inkscape:17390): GLib-GObject-WARNING **: invalid uninstantiatable type `(null)' in cast to `GObject'
(inkscape:17390): GLib-GObject-CRITICAL **: g_object_get_data: assertion `G_IS_OBJECT (object)' failed
(inkscape:17390): GLib-GObject-WARNING **: invalid uninstantiatable type `(null)' in cast to `GObject'
(inkscape:17390): GLib-GObject-CRITICAL **: g_object_get_data: assertion `G_IS_OBJECT (object)' failed
(inkscape:17390): GLib-GObject-WARNING **: invalid uninstantiatable type `(null)' in cast to `GObject'
(inkscape:17390): GLib-GObject-CRITICAL **: g_object_get_data: assertion `G_IS_OBJECT (object)' failed
(inkscape:17390): GLib-GObject-WARNING **: invalid uninstantiatable type `(null)' in cast to `GObject'
(inkscape:17390): GLib-GObject-CRITICAL **: g_object_get_data: assertion `G_IS_OBJECT (object)' failed
(inkscape:17390): GLib-GObject-WARNING **: invalid uninstantiatable type `(null)' in cast to `GObject'
(inkscape:17390): GLib-GObject-CRITICAL **: g_object_get_data: assertion `G_IS_OBJECT (object)' failed
(inkscape:17390): GLib-GObject-WARNING **: invalid uninstantiatable type `(null)' in cast to `GObject'
(inkscape:17390): GLib-GObject-CRITICAL **: g_object_get_data: assertion `G_IS_OBJECT (object)' failed
(inkscape:17390): GLib-GObject-WARNING **: invalid uninstantiatable type `(null)' in cast to `GObject'
(inkscape:17390): GLib-GObject-CRITICAL **: g_object_get_data: assertion `G_IS_OBJECT (object)' failed
(inkscape:17390): GLib-GObject-WARNING **: invalid uninstantiatable type `(null)' in cast to `GObject'
(inkscape:17390): GLib-GObject-CRITICAL **: g_object_get_data: assertion `G_IS_OBJECT (object)' failed
(inkscape:17390): GLib-GObject-WARNING **: invalid uninstantiatable type `(null)' in cast to `GObject'
(inkscape:17390): GLib-GObject-CRITICAL **: g_object_get_data: assertion `G_IS_OBJECT (object)' failed
(inkscape:17390): GLib-GObject-WARNING **: invalid uninstantiatable type `(null)' in cast to `GObject'
(inkscape:17390): GLib-GObject-CRITICAL **: g_object_get_data: assertion `G_IS_OBJECT (object)' failed
(inkscape:17390): GLib-GObject-WARNING **: invalid uninstantiatable type `(null)' in cast to `GObject'
(inkscape:17390): GLib-GObject-CRITICAL **: g_object_get_data: assertion `G_IS_OBJECT (object)' failed
(inkscape:17390): GLib-GObject-WARNING **: invalid uninstantiatable type `(null)' in cast to `GObject'
(inkscape:17390): GLib-GObject-CRITICAL **: g_object_get_data: assertion `G_IS_OBJECT (object)' failed
(inkscape:17390): GLib-GObject-WARNING **: invalid uninstantiatable type `(null)' in cast to `GObject'
(inkscape:17390): GLib-GObject-CRITICAL **: g_object_get_data: assertion `G_IS_OBJECT (object)' failed
(inkscape:17390): GLib-GObject-WARNING **: invalid uninstantiatable type `(null)' in cast to `GObject'
(inkscape:17390): GLib-GObject-CRITICAL **: g_object_get_data: assertion `G_IS_OBJECT (object)' failed
(inkscape:17390): GLib-GObject-WARNING **: invalid uninstantiatable type `(null)' in cast to `GObject'
(inkscape:17390): GLib-GObject-CRITICAL **: g_object_get_data: assertion `G_IS_OBJECT (object)' failed
(inkscape:17390): GLib-GObject-WARNING **: invalid uninstantiatable type `(null)' in cast to `GObject'
(inkscape:17390): GLib-GObject-CRITICAL **: g_object_get_data: assertion `G_IS_OBJECT (object)' failed

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

Already reported on the mailing list:
<http://thread.gmane.org/gmane.comp.graphics.inkscape.devel/37154/focus=37173>

-> changing status to 'Confirmed'.

tags: added: crash regression
Changed in inkscape:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
su_v (suv-lp) wrote :

> When you invoke ste[ 2 the following is shown on the console:
> ** (inkscape:17390): WARNING **: Metadata for error domain "inkscape_error" already registered

That's related to the dbus API, see
Bug #818628 in Inkscape: “" Metadata for error domain" warning when using File>New”
<https://bugs.launchpad.net/inkscape/+bug/818628>

The crash itself is also reproducible without having enabled the dbus API (default config).

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

Attaching backtrace of current trunk (r10667) on Mac OS X 10.5.8 (i386) - default config, built with '-g -O0'.

Revision history for this message
Johan Engelen (johanengelen) wrote :

Can you get a new backtrace after r10812? Thanks!

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

> Can you get a new backtrace after r10812?

Attaching before (r10808) and after (r10812) - created with debug builds (-g -O0) on OS X Lion 64bit (llvm-gcc-4.2.1)

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

@Johan - as mentioned in the linked thread on 'inkscape-devel' (Complete removal of libnr), the regression was introduced with r10589.

Revision history for this message
Johan Engelen (johanengelen) wrote :

OK, I think I've figured out what the problem is, but do not know how to fix this. Hopefully Jon or Krzys can have a look at it.
To avoid confusion, I'll use the following names:
1.) Start inkscape -> you'll see Desktop1
2.) Create new document (click on the new document icon) -> creates Desktop2
3.) Close new document -> closes Desktop2
4.) Create a new document again -> creates Desktop3

The problem is caused by the fact that the SPDesktop pointers for Desktop2 and Desktop3 are the same. The "create_or_fetch_actions" function in /src/widgets/toolbox.cpp should create a new action group for Desktop3, but because it does a lookup in a table using the SPDesktop pointer (line 939), it finds that there is already an action group for that pointer and does not create a new one. This results in all the errors about non-unique actions when Inkscape tries to populate the action group while Inkscape thinks it is new for Desktop3.
When Desktop2 is destroyed, its associated toolbars are not destroyed, neither is the action group. So the action group still lingers in this lookup table. So the proper way to fix this is to delete the toolbars and all when Desktop2 is destroyed, and remove the entry from the lookup table.

Hope that helps.

Revision history for this message
Johan Engelen (johanengelen) wrote :

Although the regression was introduced with r10589, I think the problem was present before these changes and were only uncovered by them.

Changed in inkscape:
assignee: nobody → Jon A. Cruz (jon-joncruz)
status: Confirmed → In Progress
Revision history for this message
Jon A. Cruz (jon-joncruz) wrote :

Fixed in trunk revision #10814.

Changed in inkscape:
status: In Progress → Fix Committed
milestone: none → 0.49
Revision history for this message
su_v (suv-lp) wrote :

@Jon - thx a lot, much appreciated fix.

Changing status to 'Fix Released' in accordance to [1] - the reported issue never occurred in a released version, only in current trunk. Please revert the bug status to 'Fix Committed' if you don't agree.

[1] <http://wiki.inkscape.org/wiki/index.php/Bug_management>

Changed in inkscape:
milestone: 0.49 → none
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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