GNOME Bugzilla – Bug 475628
Reusing GtkFileChooserWidget gives error messages
Last modified: 2014-03-28 13:44:53 UTC
Please describe the problem: Reusing the same GtkFileChooserWidget multiple times sends error messages to the concole. Steps to reproduce: Run: GtkWidget *window; GtkWidget *file_widget; gboolean delete_event(GtkWidget *widget, GdkEvent *event, void *) { if(GtkWidget *sub = gtk_bin_get_child(GTK_BIN(window))) gtk_container_remove(GTK_CONTAINER(window), sub); else gtk_container_add(GTK_CONTAINER(window), file_widget); return TRUE; } int main() { window = gtk_window_new(GTK_WINDOW_TOPLEVEL); file_widget = gtk_file_chooser_widget_new(GTK_FILE_CHOOSER_ACTION_SAVE); g_object_ref(file_widget); g_signal_connect(G_OBJECT(window), "delete_event", G_CALLBACK(delete_event), 0); gtk_container_add(GTK_CONTAINER(window), file_widget); gtk_widget_show_all(window); gtk_main(); return 0; } Actual results: Console shows messages like: (DiamondBOX:18575): Gtk-CRITICAL **: gtk_tree_model_get_iter: assertion `path != NULL' failed (DiamondBOX:18575): Gtk-CRITICAL **: gtk_list_store_set_valist: assertion `VALID_ITER (iter, list_store)' failed (DiamondBOX:18575): Gtk-CRITICAL **: gtk_tree_model_get_iter: assertion `path != NULL' failed (DiamondBOX:18575): Gtk-CRITICAL **: gtk_list_store_set_valist: assertion `VALID_ITER (iter, list_store)' failed (DiamondBOX:18575): Gtk-CRITICAL **: gtk_tree_model_get_iter: assertion `path != NULL' failed (DiamondBOX:18575): Gtk-CRITICAL **: gtk_list_store_set_valist: assertion `VALID_ITER (iter, list_store)' failed Expected results: Nothing Does this happen every time? Yes Other information:
Are you still having this problem? If so can you provide actual example code as an attachment to the bug? Your example code does not work at all for me. I get Glib errors: process:4285): GLib-GObject-CRITICAL **: /build/buildd/glib2.0-2.32.3/./gobject/gtype.c:2722: You forgot to call g_type_init() (process:4285): GLib-CRITICAL **: g_once_init_leave: assertion `result != 0' failed etc
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for. Thanks!