assert crashes in commitUndoable

Bug #182401 reported by bbyak
2
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Critical
Unassigned

Bug Description

Happens only after I keep working for some time, on any random unodable action (move, scale, etc). After I rerun, reload and rerun the same actions, it works fine, only to crash again on some random action an hour later.

Backtrace:

** ERROR **: file xml/simple-document.cpp: line 51 (virtual
Inkscape::XML::Event*
Inkscape::XML::SimpleDocument::commitUndoable()): assertion failed:
(_in_transaction)
aborting...

Program received signal SIGABRT, Aborted.
[Switching to Thread -1236268832 (LWP 22641)]
0xffffe410 in __kernel_vsyscall ()
(gdb) bt
#0 0xffffe410 in __kernel_vsyscall ()
#1 0xb66e89a1 in raise () from /lib/tls/i686/cmov/libc.so.6
#2 0xb66ea2b9 in abort () from /lib/tls/i686/cmov/libc.so.6
#3 0xb7436dba in IA__g_logv (log_domain=<value optimized out>,
log_level=G_LOG_LEVEL_ERROR,
   format=0xb7481488 "file %s: line %d (%s): assertion failed: (%s)",
args1=0xbfefc9bc "\037?h\b3")
   at gmessages.c:497
#4 0xb7436de3 in IA__g_log (log_domain=0x0, log_level=0, format=0x0)
at gmessages.c:517
#5 0xb7436e4f in IA__g_assert_warning (log_domain=0x0, file=0x0, line=0,
   pretty_function=0x868b7c0 "virtual Inkscape::XML::Event*
Inkscape::XML::SimpleDocument::commitUndoable()", expression=0x868b80f
"_in_transaction") at gmessages.c:552
#6 0x08564f01 in Inkscape::XML::SimpleDocument::commitUndoable
(this=0x0) at xml/simple-document.cpp:51
#7 0x085667f4 in sp_repr_commit_undoable (doc=0x8955ce8) at xml/event.cpp:80
#8 0x0814ef3e in sp_document_set_undo_sensitive (doc=0x8957d90,
sensitive=false) at document-undo.cpp:100
#9 0x0815ef95 in Inkscape::EventLog::checkForVirginity
(this=0x897ad00) at event-log.cpp:369
#10 0x081615c8 in Inkscape::EventLog::notifyUndoCommitEvent
(this=0x897ad00, log=0xbde2760)
   at event-log.cpp:200
#11 0x085aa72d in
Inkscape::CompositeUndoStackObserver::notifyUndoCommitEvent
(this=0xb238c3c, log=0xbde2760)
   at composite-undo-stack-observer.h:85
#12 0x0814fb94 in sp_document_maybe_done (doc=0x8957d90, key=0x85b9cfc
"selector:move:horizontal",
   event_type=105, event_description=@0x0) at document-undo.cpp:196
#13 0x080a5ca7 in sp_selection_move (dx=-2, dy=0) at
selection-chemistry.cpp:1920
#14 0x0819e7c4 in sp_select_context_root_handler
(event_context=0x945a738, event=0x9457558)
   at select-context.cpp:758
#15 0x0815dad7 in sp_event_context_root_handler
(event_context=0x945a738, event=0x9457558)
   at event-context.cpp:869
#16 0x08378827 in sp_marshal_INT__POINTER_POINTER (closure=0xb2a64b0,
return_value=0xbfefd33c,
   n_param_values=3, param_values=0xbfefd17c,
invocation_hint=0xbfefd06c, marshal_data=0x8148824)
   at helper/sp-marshal.cpp:475
#17 0xb7685f6f in IA__g_closure_invoke (closure=0xb2a64b0,
return_value=0x0, n_param_values=0,
   param_values=0x0, invocation_hint=0x0) at gclosure.c:490
#18 0xb7694d2a in signal_emit_unlocked_R (node=0x91d5318, detail=0,
instance=0x91d5950,
   emission_return=0xbfefd33c, instance_and_params=0xbfefd17c) at
gsignal.c:2440
#19 0xb76962c6 in IA__g_signal_emit_valist (instance=0x91d5950,
signal_id=198, detail=0,
   var_args=0xbfefd3c0 "???(c)x?z\tXuE\tP\202N??T\035\tl??(c)") at
gsignal.c:2209
#20 0xb7943d53 in IA__gtk_signal_emit (object=0x91d5950, signal_id=0)
at gtksignal.c:360
#21 0x08340b82 in sp_canvas_arena_send_event (arena=0x91d5950, event=0x9457558)
   at display/canvas-arena.cpp:447
#22 0x083410a9 in sp_canvas_arena_event (item=0x0, event=0x9457558) at
display/canvas-arena.cpp:434
#23 0x083785e0 in sp_marshal_BOOLEAN__POINTER (closure=0x87f7160,
return_value=0xbfefd92c, n_param_values=2,
   param_values=0xbfefd76c, invocation_hint=0xbfefd65c,
marshal_data=0x8341062) at helper/sp-marshal.cpp:352
#24 0xb768593f in g_type_class_meta_marshal (closure=0x87f7160,
return_value=0x0, n_param_values=0,
   param_values=0xbfefd76c, invocation_hint=0x0, marshal_data=0x0) at
gclosure.c:567
#25 0xb7685f6f in IA__g_closure_invoke (closure=0x87f7160,
return_value=0x0, n_param_values=0,
   param_values=0x0, invocation_hint=0x0) at gclosure.c:490
#26 0xb769540e in signal_emit_unlocked_R (node=0x91ac300, detail=0,
instance=0x91d5950,
   emission_return=0xbfefd92c, instance_and_params=0xbfefd76c) at
gsignal.c:2478
#27 0xb76962c6 in IA__g_signal_emit_valist (instance=0x91d5950,
signal_id=145, detail=0,
   var_args=0xbfefd9ac "\b??(c)?(R?") at gsignal.c:2209
#28 0xb7943d53 in IA__gtk_signal_emit (object=0x91d5950, signal_id=0)
at gtksignal.c:360
#29 0x08358800 in emit_event (canvas=<value optimized out>,
event=<value optimized out>)
   at display/sp-canvas.cpp:1308
#30 0xb78dc984 in _gtk_marshal_BOOLEAN__BOXED (closure=0x8d2b9e8,
return_value=0xbfefdbd0, n_param_values=2,
   param_values=0xbfefdccc, invocation_hint=0xbfefdbbc,
marshal_data=0x8358aa2) at gtkmarshalers.c:84
#31 0xb768593f in g_type_class_meta_marshal (closure=0x8d2b9e8,
return_value=0x0, n_param_values=0,
   param_values=0xbfefdccc, invocation_hint=0x0, marshal_data=0x0) at
gclosure.c:567
#32 0xb7685f6f in IA__g_closure_invoke (closure=0x8d2b9e8,
return_value=0x0, n_param_values=0,
   param_values=0x0, invocation_hint=0x0) at gclosure.c:490
#33 0xb769540e in signal_emit_unlocked_R (node=0x8d2d0d8, detail=0,
instance=0x944fd78,
   emission_return=0xbfefde8c, instance_and_params=0xbfefdccc) at
gsignal.c:2478
#34 0xb76962c6 in IA__g_signal_emit_valist (instance=0x944fd78,
signal_id=52, detail=0,
   var_args=0xbfefdf10 "(??(c)
xE\tx?D\ta\016\237?x?D\t\200\016\177\b") at gsignal.c:2209
#35 0xb76968c9 in IA__g_signal_emit (instance=0x0, signal_id=0,
detail=0) at gsignal.c:2243
#36 0xb79f0c67 in gtk_widget_event_internal (widget=0x944fd78,
event=0x9457820) at gtkwidget.c:4675
#37 0xb7a03185 in IA__gtk_window_propagate_key_event
(window=0xb8f1210, event=0x9457820) at gtkwindow.c:4935
#38 0xb7a07934 in gtk_window_key_press_event (widget=0xb8f1210,
event=0x9457820) at gtkwindow.c:4965
#39 0xb7dfe51b in Gtk::Widget_Class::key_press_event_callback
(self=0xb8f1210, p0=0x9457820)
   at widget.cc:4553
#40 0xb78dc984 in _gtk_marshal_BOOLEAN__BOXED (closure=0x8d2b9e8,
return_value=0xbfefe170, n_param_values=2,
   param_values=0xbfefe26c, invocation_hint=0xbfefe15c,
marshal_data=0xb7dfe4c6) at gtkmarshalers.c:84
#41 0xb768593f in g_type_class_meta_marshal (closure=0x8d2b9e8,
return_value=0x0, n_param_values=0,
   param_values=0xbfefe26c, invocation_hint=0x0, marshal_data=0x0) at
gclosure.c:567
#42 0xb7685f6f in IA__g_closure_invoke (closure=0x8d2b9e8,
return_value=0x0, n_param_values=0,
   param_values=0x0, invocation_hint=0x0) at gclosure.c:490
#43 0xb769540e in signal_emit_unlocked_R (node=0x8d2d0d8, detail=0,
instance=0xb8f1210,
   emission_return=0xbfefe42c, instance_and_params=0xbfefe26c) at
gsignal.c:2478
#44 0xb76962c6 in IA__g_signal_emit_valist (instance=0xb8f1210,
signal_id=52, detail=0,
   var_args=0xbfefe4b0 "???(c)
xE\t\020\022\217\va\016\237?\020\022\217\v\200\016\177\b") at
gsignal.c:2209
#45 0xb76968c9 in IA__g_signal_emit (instance=0x0, signal_id=0,
detail=0) at gsignal.c:2243
#46 0xb79f0c67 in gtk_widget_event_internal (widget=0xb8f1210,
event=0x9457820) at gtkwidget.c:4675
#47 0xb78db209 in IA__gtk_propagate_event (widget=0xb8f1210,
event=0x9457820) at gtkmain.c:2310
#48 0xb78db507 in IA__gtk_main_do_event (event=0x9457820) at gtkmain.c:1556
#49 0xb776681c in gdk_event_dispatch (source=0x0, callback=0,
user_data=0x0) at gdkevents-x11.c:2351
#50 0xb742e299 in IA__g_main_context_dispatch (context=0x87eb800) at
gmain.c:2061
#51 0xb7431616 in g_main_context_iterate (context=0x87eb800, block=1,
dispatch=1, self=0x8806670)
   at gmain.c:2694
#52 0xb7431938 in IA__g_main_loop_run (loop=0x977f3f0) at gmain.c:2898
#53 0xb78da800 in IA__gtk_main () at gtkmain.c:1163
#54 0xb7d92a85 in Gtk::Main::run_impl (this=0xbfefe708) at main.cc:534
#55 0xb7d92976 in Gtk::Main::run () at main.cc:481
#56 0x08083bd5 in sp_main_gui (argc=1, argv=0xbfefe844) at main.cpp:723
#57 0x081d25fc in Inkscape::NSApplication::Application::run (this=0xbfefe798)
   at application/application.cpp:117
#58 0x0808302e in main (argc=1, argv=0xbfefe844) at main.cpp:538

bbyak (buliabyak)
Changed in inkscape:
assignee: nobody → mental
importance: Undecided → Critical
milestone: none → 0.46
status: New → Confirmed
Revision history for this message
MenTaLguY (mental-deactivatedaccount) wrote :

Ugh. Well, the basic problem is that the undo/redo notification callbacks _aren't supposed to be changing the document_. But checkForVirginity does sometimes, because it sets sodipodi:modified, and it tries to toggle undo sensitivity in the middle of what may be a not-yet-100%-complete undo and everything just goes to hell.

Probably the simplest fix is to get rid of sodipodi:modified and replace it with a boolean field in SPDocument instead, which needs doing anyway.

Revision history for this message
Bryce Harrington (bryce) wrote :

Mental, is this issue something that can be addressed in the near term for the release? If it will take more than a week or two to fix, is there a workaround we could use in the meantime? If not, is it actually serious enough to be a release blocker?

Revision history for this message
MenTaLguY (mental-deactivatedaccount) wrote :

It should be a relatively quick fix.

Revision history for this message
MenTaLguY (mental-deactivatedaccount) wrote :

(There also isn't a good workaround since it's really an architectural issue.)

Revision history for this message
MenTaLguY (mental-deactivatedaccount) wrote :

Should be resolved as of r17060

Changed in inkscape:
status: Confirmed → Fix Released
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.