After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 698680 - critical assertion: g_source_remove: assertion `tag > 0' failed
critical assertion: g_source_remove: assertion `tag > 0' failed
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: General
git master
Other Linux
: Normal normal
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2013-04-23 17:15 UTC by Adam Dingle
Modified: 2013-04-23 23:11 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Adam Dingle 2013-04-23 17:15:43 UTC
I'm running Gnumeric from git master on Ubuntu 13.04 with libgtk 3.8.0 and glib 2.36.0.

To see the problem:

1. Start Gnumeric from a terminal window.
2. Enter any value into the currently selected cell.
3. Press Enter to move to the next cell.

You'll see this on the console:

(gnumeric:30154): GLib-CRITICAL **: g_source_remove: assertion `tag > 0' failed

This assertion might be benign, but we should still find and fix it.
Comment 1 Andreas J. Guelzow 2013-04-23 18:10:01 UTC
This is a critical within the glib binary. Please file it against glib.
Comment 2 Adam Dingle 2013-04-23 21:57:14 UTC
Debugging reveals that the Gnumeric function item_edit_cursor_blink_stop is passing the invalid ID 0 to g_source_remove():

====
static void
item_edit_cursor_blink_stop (GnmItemEdit *ie)
{
	if (ie->blink_timer != -1) {
		g_source_remove (ie->blink_timer);
        ...
===

ie->blink_timer is 0 at the moment of the call.  g_source_remove issues the critical to indicate it's been passed an invalid argument:

===
gboolean
g_source_remove (guint tag)
{
  GSource *source;
  
  g_return_val_if_fail (tag > 0, FALSE);
  ...
===

So this is a bug in Gnumeric, not glib.  A full stack trace is below.

  • #0 g_logv
    at gmessages.c line 981
  • #1 g_log
    at gmessages.c line 1010
  • #2 g_return_if_fail_warning
    at gmessages.c line 1019
  • #3 g_source_remove
    at gmain.c line 2195
  • #4 item_edit_cursor_blink_stop
    at item-edit.c line 572
  • #5 item_edit_unrealize
    at item-edit.c line 666
  • #6 goc_group_remove_child
    at canvas/goc-group.c line 383
  • #7 goc_item_dispose
    at canvas/goc-item.c line 226
  • #8 g_object_unref
    at gobject.c line 2987
  • #9 gnm_pane_edit_stop
    at gnm-pane.c line 2342
  • #10 scg_edit_stop
    at sheet-control-gui.c line 3232
  • #11 wbcg_edit_finish
    at wbc-gtk-edit.c line 503
  • #12 gnm_pane_key_mode_sheet
    at gnm-pane.c line 421
  • #13 gnm_pane_key_press
    at gnm-pane.c line 609
  • #14 _gtk_marshal_BOOLEAN__BOXED
    at gtkmarshalers.c line 85
  • #15 g_closure_invoke
    at gclosure.c line 777
  • #16 signal_emit_unlocked_R
    at gsignal.c line 3622
  • #17 g_signal_emit_valist
    at gsignal.c line 3338
  • #18 g_signal_emit
    at gsignal.c line 3384
  • #19 gtk_widget_event_internal
    at gtkwidget.c line 6946
  • #20 gtk_widget_event
    at gtkwidget.c line 6603
  • #21 gtk_window_propagate_key_event
    at gtkwindow.c line 6911
  • #22 gtk_window_key_press_event
    at gtkwindow.c line 6941
  • #23 _gtk_marshal_BOOLEAN__BOXED
    at gtkmarshalers.c line 85
  • #24 g_closure_invoke
    at gclosure.c line 777
  • #25 signal_emit_unlocked_R
    at gsignal.c line 3622
  • #26 g_signal_emit_valist
    at gsignal.c line 3338
  • #27 g_signal_emit
    at gsignal.c line 3384
  • #28 gtk_widget_event_internal
    at gtkwidget.c line 6946
  • #29 propagate_event
    at gtkmain.c line 2490
  • #30 gtk_main_do_event
    at gtkmain.c line 1716
  • #31 gdk_event_source_dispatch
    at gdkeventsource.c line 364
  • #32 g_main_dispatch
    at gmain.c line 3058
  • #33 g_main_context_dispatch
    at gmain.c line 3634
  • #34 g_main_context_iterate
    at gmain.c line 3705
  • #35 g_main_loop_run
    at gmain.c line 3899
  • #36 gtk_main
    at gtkmain.c line 1156
  • #37 main
    at main-application.c line 383

Comment 3 Morten Welinder 2013-04-23 23:07:46 UTC
Hmm.  Strange.

I put a g_printerr in item_edit_cursor_blink_stop and I always see a positive
tag.
Comment 4 Morten Welinder 2013-04-23 23:11:21 UTC
Nevermind, I see it.  It's theme/settings dependent in that it will only
show up if gtk-cursor-blink is FALSE.

This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.