GNOME Bugzilla – Bug 697267
Crash in rb-podcast-add-dialog.c
Last modified: 2013-04-04 22:22:07 UTC
Steps to reproduce: - Search for a new Podcast (either using an URL or a search term that produces only one result) - Click Subscribe - Click Subscribe a second time - Crash in subscribe_selected_feed() Error message: (rhythmbox:13626): Gtk-CRITICAL **: gtk_list_store_get_value: assertion `iter_is_valid (iter, list_store)' failed (rhythmbox:13626): GLib-GObject-WARNING **: gtype.c:4204: type id `0' is invalid (rhythmbox:13626): GLib-GObject-WARNING **: can't peek value table for type `<invalid>' which is not currently referenced Backtrace:
+ Trace 231725
The fault is obviously that the subscibe butten doesn't get disabled after the first click. It should get disabled in feed_selection_changed_cb() which is invoked by gtk_list_store_remove() in subscribe_clicked_cb() [...] dialog->priv->clearing = TRUE; gtk_list_store_remove (GTK_LIST_STORE (dialog->priv->feed_model), &dialog->priv->selected_feed); dialog->priv->clearing = FALSE; in the callback: feed_selection_changed_cb (GtkTreeSelection *selection, RBPodcastAddDialog *dialog) { GtkTreeModel *model; if (dialog->priv->clearing) return; dialog->priv->have_selection = gtk_tree_selection_get_selected (selection, &model, &dialog->priv->selected_feed); gtk_widget_set_sensitive (dialog->priv->subscribe_button, dialog->priv->have_selection); So the CB returns directly without doing the necessary call to gtk_widget_set_sensitive(). In case the feed list has several entries the callback will be invoked again after gtk_tree_selection_unselect_all() in subscribe_clicked_cb() and the subscribe button will be disabled. A simple fix is to always call gtk_widget_set_sensitive() in feed_selection_changed_cb().
Created attachment 240605 [details] [review] Simple fix
Thanks for the analysis and the patch. I considered it, but I decided I'd prefer to have it explicitly disable the subscribe button in subscribe_clicked_cb, like remove_all_feeds does. fixed in commit 62e30d4.