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 697267 - Crash in rb-podcast-add-dialog.c
Crash in rb-podcast-add-dialog.c
Status: RESOLVED FIXED
Product: rhythmbox
Classification: Other
Component: Podcast
HEAD
Other Linux
: Normal critical
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-04-04 13:31 UTC by c.orsinger
Modified: 2013-04-04 22:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Simple fix (1.27 KB, patch)
2013-04-04 13:35 UTC, c.orsinger
none Details | Review

Description c.orsinger 2013-04-04 13:31:10 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:

  • #0 gtk_tree_model_get_valist
    from /usr/lib/libgtk-3.so.0
  • #1 gtk_tree_model_get
    from /usr/lib/libgtk-3.so.0
  • #2 subscribe_selected_feed
    at rb-podcast-add-dialog.c line 456
  • #3 subscribe_clicked_cb
    at rb-podcast-add-dialog.c line 475
  • #4 ??
    from /usr/lib/libgobject-2.0.so.0
  • #5 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #6 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #7 ??
    from /usr/lib/libgtk-3.so.0
  • #8 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #9 ??
    from /usr/lib/libgobject-2.0.so.0
  • #10 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #11 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #12 ??
    from /usr/lib/libgtk-3.so.0
  • #13 ??
    from /usr/lib/libgtk-3.so.0
  • #14 ??
    from /usr/lib/libgobject-2.0.so.0
  • #15 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #16 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #17 ??
    from /usr/lib/libgtk-3.so.0
  • #18 ??
    from /usr/lib/libgtk-3.so.0
  • #19 gtk_main_do_event
    from /usr/lib/libgtk-3.so.0
  • #20 ??
    from /usr/lib/libgdk-3.so.0
  • #21 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #22 ??
    from /usr/lib/libglib-2.0.so.0
  • #23 g_main_context_iteration
    from /usr/lib/libglib-2.0.so.0
  • #24 g_application_run
    from /usr/lib/libgio-2.0.so.0
  • #25 rb_application_run
    at rb-application.c line 634
  • #26 main
    at main.c line 102


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().
Comment 1 c.orsinger 2013-04-04 13:35:51 UTC
Created attachment 240605 [details] [review]
Simple fix
Comment 2 Jonathan Matthew 2013-04-04 22:22:07 UTC
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.