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 675984 - spurious 'cursor-changed' event emitted during destruction?
spurious 'cursor-changed' event emitted during destruction?
Status: RESOLVED DUPLICATE of bug 671939
Product: gtk+
Classification: Platform
Component: Widget: GtkTreeView
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtktreeview-bugs
gtktreeview-bugs
Depends on:
Blocks:
 
 
Reported: 2012-05-13 21:12 UTC by Christophe Fergeau
Modified: 2012-05-16 21:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Modified test case from http://zetcode.com/tutorials/gtktutorial/gtktreeview/ - asserts when closing the main window (2.71 KB, text/x-csrc)
2012-05-13 21:12 UTC, Christophe Fergeau
Details

Description Christophe Fergeau 2012-05-13 21:12:37 UTC
Created attachment 213965 [details]
Modified test case from http://zetcode.com/tutorials/gtktutorial/gtktreeview/ - asserts when closing the main window

sound-juicer has a callback attached on the 'cursor-changed' signal of its main treeview. When exiting the application, the GtkTreeView is destroyed, and during the destruction a 'cursor-changed' is emitted. When it's emitted, calling gtk_tree_view_get_selection returns NULL, which is unexpected, and causes a runtime warning since sound-juicer doesn't check for it.

I think either this signal should not be emitted, or the selection object should not be NULL at this point. 

(gdb) bt
  • #0 g_log
    at gmessages.c line 788
  • #1 g_return_if_fail_warning
  • #2 gtk_tree_selection_get_selected
    at gtktreeselection.c line 494
  • #3 on_tracklist_row_selected
    at sj-play.c line 567
  • #4 g_closure_invoke
    at gclosure.c line 777
  • #5 signal_emit_unlocked_R
    at gsignal.c line 3547
  • #6 g_signal_emit_valist
    at gsignal.c line 3296
  • #7 g_signal_emit
    at gsignal.c line 3352
  • #8 gtk_tree_view_real_set_cursor
    at gtktreeview.c line 13298
  • #9 gtk_tree_view_set_model
    at gtktreeview.c line 11514
  • #10 gtk_tree_view_destroy
    at gtktreeview.c line 2099
  • #11 g_closure_invoke
    at gclosure.c line 777
  • #12 signal_emit_unlocked_R
    at gsignal.c line 3663
  • #13 g_signal_emit_valist
    at gsignal.c line 3296
  • #14 g_signal_emit
    at gsignal.c line 3352
  • #15 gtk_widget_dispose
    at gtkwidget.c line 10338
  • #16 g_object_run_dispose
    at gobject.c line 1061
  • #17 gtk_scrolled_window_forall
    at gtkscrolledwindow.c line 1598
  • #18 gtk_container_destroy
    at gtkcontainer.c line 1370
  • #19 g_closure_invoke
    at gclosure.c line 777
  • #20 signal_emit_unlocked_R
    at gsignal.c line 3663
  • #21 g_signal_emit_valist
    at gsignal.c line 3296
  • #22 g_signal_emit
    at gsignal.c line 3352
  • #23 gtk_widget_dispose
    at gtkwidget.c line 10338
  • #24 g_object_run_dispose
    at gobject.c line 1061
  • #25 gtk_box_forall
    at gtkbox.c line 1856
  • #26 gtk_container_destroy
    at gtkcontainer.c line 1370
  • #27 g_closure_invoke
    at gclosure.c line 777
  • #28 signal_emit_unlocked_R
    at gsignal.c line 3663
  • #29 g_signal_emit_valist
    at gsignal.c line 3296
  • #30 g_signal_emit
    at gsignal.c line 3352
  • #31 gtk_widget_dispose
    at gtkwidget.c line 10338
  • #32 g_object_run_dispose
    at gobject.c line 1061
  • #33 gtk_box_forall
    at gtkbox.c line 1856
  • #34 gtk_container_destroy
    at gtkcontainer.c line 1370
  • #35 g_closure_invoke
    at gclosure.c line 777
  • #36 signal_emit_unlocked_R
    at gsignal.c line 3663
  • #37 g_signal_emit_valist
    at gsignal.c line 3296
  • #38 g_signal_emit
    at gsignal.c line 3352
  • #39 gtk_widget_dispose
    at gtkwidget.c line 10338
  • #40 g_object_run_dispose
    at gobject.c line 1061
  • #41 gtk_container_destroy
    at gtkcontainer.c line 1370
  • #42 g_closure_invoke
    at gclosure.c line 777
  • #43 signal_emit_unlocked_R
    at gsignal.c line 3663
  • #44 g_signal_emit_valist
    at gsignal.c line 3296
  • #45 g_signal_emit
    at gsignal.c line 3352
  • #46 gtk_widget_dispose
    at gtkwidget.c line 10338
  • #47 g_object_run_dispose
    at gobject.c line 1061
  • #48 gtk_widget_destroy
    at gtkwidget.c line 3943
  • #49 gtk_main_do_event
    at gtkmain.c line 1612
  • #50 gdk_event_source_dispatch
    at gdkeventsource.c line 358
  • #51 g_main_dispatch
    at gmain.c line 2515
  • #52 g_main_context_dispatch
    at gmain.c line 3052
  • #53 g_main_context_iterate
    at gmain.c line 3123
  • #54 g_main_loop_run
    at gmain.c line 3317
  • #55 gtk_main
    at gtkmain.c line 1161
  • #56 main
    at sj-main.c line 1939

Comment 1 Christophe Fergeau 2012-05-13 21:13:56 UTC
This is reproduceable in a recent git master build (from last week)
Comment 2 Matthias Clasen 2012-05-16 21:50:57 UTC

*** This bug has been marked as a duplicate of bug 671939 ***