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 670586 - gconf-editor hits g_assertion_message in gconf_client_lookup: last_slash != NULL
gconf-editor hits g_assertion_message in gconf_client_lookup: last_slash != NULL
Status: RESOLVED FIXED
Product: gconf-editor
Classification: Applications
Component: general
3.0.x
Other Linux
: Normal normal
: ---
Assigned To: Gconf Editor Maintainers
Gconf Editor Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-02-22 09:48 UTC by Sebastien Bacher
Modified: 2012-04-11 13:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
block "changed" signal while the model is updated (4.07 KB, patch)
2012-02-27 09:53 UTC, Sebastien Bacher
none Details | Review
different solution (685 bytes, patch)
2012-04-10 20:56 UTC, Edward Sheldrake
reviewed Details | Review
revised patch (1.26 KB, patch)
2012-04-11 07:32 UTC, Edward Sheldrake
committed Details | Review

Description Sebastien Bacher 2012-02-22 09:48:12 UTC
Since the start of the precise cycle Ubuntu gets a lot of bugs about gconf-editor asserting, i.e https://bugs.launchpad.net/ubuntu/+source/gconf-editor/+bug/912116

"#0  0x00e67416 in __kernel_vsyscall ()
No symbol table info available.
  • #1 __GI_raise
    at ../nptl/sysdeps/unix/sysv/linux/raise.c line 64
  • #2 __GI_abort
    at abort.c line 92
  • #3 g_assertion_message
    at /build/buildd/glib2.0-2.31.6/./glib/gtestutils.c line 1810
  • #4 g_assertion_message_expr
    at /build/buildd/glib2.0-2.31.6/./glib/gtestutils.c line 1821
  • #5 gconf_client_lookup
    at gconf-client.c line 2369
  • #6 gconf_client_key_is_writable
    at gconf-client.c line 1415
  • #7 gconf_editor_window_update_list_selection
    at gconf-editor-window.c line 1131
  • #8 g_cclosure_marshal_VOID__VOID
    at /build/buildd/glib2.0-2.31.6/./gobject/gmarshal.c line 85
  • #9 g_closure_invoke
    at /build/buildd/glib2.0-2.31.6/./gobject/gclosure.c line 774
  • #10 signal_emit_unlocked_R
    at /build/buildd/glib2.0-2.31.6/./gobject/gsignal.c line 3302
  • #11 g_signal_emit_valist
    at /build/buildd/glib2.0-2.31.6/./gobject/gsignal.c line 3033
  • #12 g_signal_emit_by_name
    at /build/buildd/glib2.0-2.31.6/./gobject/gsignal.c line 3127
  • #13 gtk_tree_view_row_deleted
    at /build/buildd/gtk+3.0-3.3.6/./gtk/gtktreeview.c line 9155
  • #14 g_cclosure_marshal_VOID__BOXED
    at /build/buildd/glib2.0-2.31.6/./gobject/gmarshal.c line 574
  • #15 g_closure_invoke
    at /build/buildd/glib2.0-2.31.6/./gobject/gclosure.c line 774
  • #16 signal_emit_unlocked_R
    at /build/buildd/glib2.0-2.31.6/./gobject/gsignal.c line 3302
  • #17 g_signal_emit_valist
    at /build/buildd/glib2.0-2.31.6/./gobject/gsignal.c line 3033
  • #18 g_signal_emit
    at /build/buildd/glib2.0-2.31.6/./gobject/gsignal.c line 3090
  • #19 gtk_tree_model_row_deleted
    at /build/buildd/gtk+3.0-3.3.6/./gtk/gtktreemodel.c line 1870
  • #20 gtk_tree_model_sort_row_deleted
    at /build/buildd/gtk+3.0-3.3.6/./gtk/gtktreemodelsort.c line 1092
  • #21 g_cclosure_marshal_VOID__BOXED
    at /build/buildd/glib2.0-2.31.6/./gobject/gmarshal.c line 574
  • #22 g_closure_invoke
    at /build/buildd/glib2.0-2.31.6/./gobject/gclosure.c line 774
  • #23 signal_emit_unlocked_R
    at /build/buildd/glib2.0-2.31.6/./gobject/gsignal.c line 3302
  • #24 g_signal_emit_valist
    at /build/buildd/glib2.0-2.31.6/./gobject/gsignal.c line 3033
  • #25 g_signal_emit
    at /build/buildd/glib2.0-2.31.6/./gobject/gsignal.c line 3090
  • #26 gtk_tree_model_row_deleted
    at /build/buildd/gtk+3.0-3.3.6/./gtk/gtktreemodel.c line 1870
  • #27 gconf_list_model_set_root_path
    at gconf-list-model.c line 140
  • #28 gconf_editor_window_selection_changed
    at gconf-editor-window.c line 906
  • #29 g_cclosure_marshal_VOID__VOID
    at /build/buildd/glib2.0-2.31.6/./gobject/gmarshal.c line 85
  • #30 g_closure_invoke
    at /build/buildd/glib2.0-2.31.6/./gobject/gclosure.c line 774
  • #31 signal_emit_unlocked_R
    at /build/buildd/glib2.0-2.31.6/./gobject/gsignal.c line 3302
  • #32 g_signal_emit_valist
    at /build/buildd/glib2.0-2.31.6/./gobject/gsignal.c line 3033
  • #33 g_signal_emit
    at /build/buildd/glib2.0-2.31.6/./gobject/gsignal.c line 3090
  • #34 _gtk_tree_selection_internal_select_node
    at /build/buildd/gtk+3.0-3.3.6/./gtk/gtktreeselection.c line 1606
  • #35 gtk_tree_view_real_set_cursor
    at /build/buildd/gtk+3.0-3.3.6/./gtk/gtktreeview.c line 13262
  • #36 gtk_tree_view_real_collapse_row
    at /build/buildd/gtk+3.0-3.3.6/./gtk/gtktreeview.c line 12974
  • #37 gtk_tree_view_button_release
    at /build/buildd/gtk+3.0-3.3.6/./gtk/gtktreeview.c line 3399
  • #38 _gtk_marshal_BOOLEAN__BOXED
    at /build/buildd/gtk+3.0-3.3.6/./gtk/gtkmarshalers.c line 85
  • #39 g_type_class_meta_marshal
    at /build/buildd/glib2.0-2.31.6/./gobject/gclosure.c line 885
  • #40 g_closure_invoke
    at /build/buildd/glib2.0-2.31.6/./gobject/gclosure.c line 774
  • #41 signal_emit_unlocked_R
    at /build/buildd/glib2.0-2.31.6/./gobject/gsignal.c line 3340
  • #42 g_signal_emit_valist
    at /build/buildd/glib2.0-2.31.6/./gobject/gsignal.c line 3043
  • #43 g_signal_emit
    at /build/buildd/glib2.0-2.31.6/./gobject/gsignal.c line 3090
  • #44 gtk_widget_event_internal
    at /build/buildd/gtk+3.0-3.3.6/./gtk/gtkwidget.c line 6134
  • #45 gtk_propagate_event
    at /build/buildd/gtk+3.0-3.3.6/./gtk/gtkmain.c line 2426
  • #46 gtk_main_do_event
    at /build/buildd/gtk+3.0-3.3.6/./gtk/gtkmain.c line 1691
  • #47 _gdk_event_emit
    at /build/buildd/gtk+3.0-3.3.6/./gdk/gdkevents.c line 71
  • #48 gdk_event_source_dispatch
    at /build/buildd/gtk+3.0-3.3.6/./gdk/x11/gdkeventsource.c line 360
  • #49 g_main_dispatch
    at /build/buildd/glib2.0-2.31.6/./glib/gmain.c line 2513


opening against gconf since gconf-editor didn't change for ages

one of the comment has those steps to trigger it

"Reproducible (3 times in a row), at ubunty 12.04 when:

1. open ekiga
2. open gconf-editor
3. go to apps -> ekiga -> protocols -> sip
4. change value of listen_port to 50060
5. select ports from catalogue, and crash..

--------------------------
:~$ gconf-editor
**
GConf:ERROR:gconf-client.c:2369:gconf_client_lookup: assertion failed: (last_slash != NULL)
Aborted (core dumped)"


but it's fairly easy to trigger on any key (the bug pointed before has a collection of duplicates)
Comment 1 Sebastien Bacher 2012-02-22 09:51:42 UTC
Could maybe have to do with the invalid read error from https://bugzilla.gnome.org/show_bug.cgi?id=668872
Comment 2 Sebastien Bacher 2012-02-27 09:53:43 UTC
Created attachment 208476 [details] [review]
block "changed" signal while the model is updated

That patches fixes the issue by blocking the selection changed signal while the model is being updated, with the new gtk deleting the selected row from the model leads to several changed signal emission which leads to the issue
Comment 3 Sebastien Bacher 2012-02-27 09:55:30 UTC
the actual diff is:

"+		/* block changed signal while the model is being updated */
+		g_signal_handlers_block_by_func (gtk_tree_view_get_selection (GTK_TREE_VIEW (window->list_view)),G_CALLBACK (gconf_editor_window_update_list_selection), window);
+        
 		gconf_list_model_set_root_path (GCONF_LIST_MODEL (window->list_model), path);
 
+		g_signal_handlers_unblock_by_func (gtk_tree_view_get_selection (GTK_TREE_VIEW (window->list_view)),G_CALLBACK (gconf_editor_window_update_list_selection), window);
+"

the patch is a bit less trivial because I moved the gconf_editor_window_selection_changed() function after gconf_editor_window_update_list_selection() to be able to block that one (could have added a definition for that function earlier in the file as well)
Comment 4 Sebastien Bacher 2012-02-27 12:58:43 UTC
Just for the record, the bug started being visible this cycle due to https://bugzilla.gnome.org/show_bug.cgi?id=670882

With the new GTK selection "changed" signal are emitted when the selected row is deleted from the model and another row is selected, which leads gconf-editor to free resources it shouldn't
Comment 5 Cosimo Cecchi 2012-02-27 16:50:00 UTC
(In reply to comment #3)
> the actual diff is:

So the patch you attached is obsolete? Can you attach an updated patch?
Comment 6 Edward Sheldrake 2012-04-10 20:51:56 UTC
(In reply to comment #5)
> (In reply to comment #3)
> > the actual diff is:
> 
> So the patch you attached is obsolete? Can you attach an updated patch?

The patch is not obsolete, it needs to add 2 lines and then move a block of code down. comment #4 just states the added 2 lines.

I tried the patch, but instead of the assertion abort, I get (less frequent) segfaults instead:

Program received signal SIGSEGV, Segmentation fault.
0x0000000000415a29 in gconf_list_model_get_value (tree_model=0x8ad0a0, iter=
    0x7fffffffc350, column=0, value=0x7fffffffc390) at gconf-list-model.c:290
290	                        value_type = gconf_value->type;
Missing separate debuginfos, use: debuginfo-install libudev-173-3.fc16.x86_64 libxml2-2.7.8-6.fc16.x86_64
(gdb) bt
  • #0 gconf_list_model_get_value
    at gconf-list-model.c line 290
  • #1 ??
    from /usr/lib64/libgtk-3.so.0
  • #2 ??
    from /usr/lib64/libgtk-3.so.0
  • #3 g_hash_table_foreach
    from /usr/lib64/libglib-2.0.so.0
  • #4 ??
    from /usr/lib64/libgtk-3.so.0
  • #5 ??
    from /usr/lib64/libgtk-3.so.0
  • #6 ??
    from /usr/lib64/libgtk-3.so.0
  • #7 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #8 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #9 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #10 gtk_cell_area_apply_attributes
    from /usr/lib64/libgtk-3.so.0
  • #11 ??
    from /usr/lib64/libgtk-3.so.0
  • #12 ??
    from /usr/lib64/libgtk-3.so.0
  • #13 ??
    from /usr/lib64/libgtk-3.so.0
  • #14 ??
    from /usr/lib64/libgtk-3.so.0
  • #15 ??
    from /usr/lib64/libgtk-3.so.0
  • #16 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #17 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #18 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #19 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #20 ??
    from /usr/lib64/libgtk-3.so.0
  • #21 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #22 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #23 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #24 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #25 gconf_list_model_set_root_path
    at gconf-list-model.c line 140
  • #26 gconf_editor_window_selection_changed
    at gconf-editor-window.c line 1191
  • #27 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #28 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #29 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #30 ??
    from /usr/lib64/libgtk-3.so.0
  • #31 ??
    from /usr/lib64/libgtk-3.so.0
  • #32 ??
    from /usr/lib64/libgtk-3.so.0
  • #33 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #34 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #35 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #36 ??
    from /usr/lib64/libgtk-3.so.0
  • #37 ??
    from /usr/lib64/libgtk-3.so.0
  • #38 gtk_main_do_event
    from /usr/lib64/libgtk-3.so.0
  • #39 ??
    from /usr/lib64/libgdk-3.so.0
  • #40 g_main_context_dispatch
    from /usr/lib64/libglib-2.0.so.0
  • #41 ??
    from /usr/lib64/libglib-2.0.so.0
  • #42 g_main_loop_run
    from /usr/lib64/libglib-2.0.so.0
  • #43 gtk_main
    from /usr/lib64/libgtk-3.so.0
  • #44 main
    at main.c line 108

Comment 7 Edward Sheldrake 2012-04-10 20:56:22 UTC
Created attachment 211792 [details] [review]
different solution

This patch avoids the crash by doing all the model row removing before doing any deleting.
Comment 8 Cosimo Cecchi 2012-04-10 22:02:00 UTC
Review of attachment 211792 [details] [review]:

I like this approach much better if it fixes the crash. I have a comment on the code below though.

::: gconf-editor-3.0.1/src/gconf-list-model.c.orig
@@ +134,3 @@
 	if (model->root_path != NULL) {
 		for (list = model->values; list; list = list->next) {
+			gtk_tree_model_row_deleted (GTK_TREE_MODEL (model), path);

I don't think this is right, at least not without doing the model->stamp increment in the same cycle.
Comment 9 Edward Sheldrake 2012-04-11 07:32:27 UTC
Created attachment 211810 [details] [review]
revised patch

revised patch to increment model stamp before calling gtk_tree_model_row_deleted
Comment 10 Cosimo Cecchi 2012-04-11 13:54:12 UTC
Thanks, looks good. I now pushed this patch to git master.