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 791815 - Rhythmbox crashes when editing auto playlist sorted by Location / Bitrate
Rhythmbox crashes when editing auto playlist sorted by Location / Bitrate
Status: RESOLVED OBSOLETE
Product: rhythmbox
Classification: Other
Component: general
HEAD
Other Linux
: Normal normal
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-12-20 06:56 UTC by gkrithi8
Modified: 2018-05-24 19:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
query-creator: add location and bitrate columns to sort options (1.14 KB, patch)
2017-12-20 08:44 UTC, gkrithi8
none Details | Review
query-creator: check sort index on num_sort_options, not num_property_options (1.80 KB, patch)
2017-12-20 08:45 UTC, gkrithi8
needs-work Details | Review

Description gkrithi8 2017-12-20 06:56:47 UTC
(gdb) bt
  • #0 strlen
    at ../sysdeps/x86_64/strlen.S line 106
  • #1 g_strdup
    at ../../../../glib/gstrfuncs.c line 362
  • #2 gtk_button_set_label
    at ../../../../gtk/gtkbutton.c line 2166
  • #3 sort_option_menu_changed
    at rb-query-creator.c line 945
  • #7 <emit signal ??? on instance 0x561a949dcff0 [GtkComboBox]>
    at ../../../../gobject/gsignal.c line 3447
  • #8 gtk_combo_box_set_active_internal
    at ../../../../gtk/gtkcombobox.c line 3847
  • #9 gtk_combo_box_set_active
    at ../../../../gtk/gtkcombobox.c line 3771
  • #10 rb_query_creator_set_sorting
    at rb-query-creator.c line 474
  • #11 rb_query_creator_new_from_query
    at rb-query-creator.c line 508
  • #12 edit_auto_playlist_action_cb
    at rb-playlist-manager.c line 942
  • #16 <emit signal ??? on instance 0x561a9408ec00 [GSimpleAction]>
    at ../../../../gobject/gsignal.c line 3447
  • #17 g_simple_action_activate
    at ../../../../gio/gsimpleaction.c line 225
  • #18 gtk_action_muxer_activate_action
    at ../../../../gtk/gtkactionmuxer.c line 412
  • #19 gtk_action_muxer_activate_action
    at ../../../../gtk/gtkactionmuxer.c line 414
  • #20 gtk_action_muxer_activate_action
    at ../../../../gtk/gtkactionmuxer.c line 414
  • #21 gtk_action_muxer_activate_action
    at ../../../../gtk/gtkactionmuxer.c line 414
  • #22 gtk_action_muxer_activate_action
    at ../../../../gtk/gtkactionmuxer.c line 414
  • #23 gtk_action_muxer_activate_action
    at ../../../../gtk/gtkactionmuxer.c line 414
  • #24 gtk_action_muxer_activate_action
    at ../../../../gtk/gtkactionmuxer.c line 414
  • #25 gtk_action_muxer_activate_action
    at ../../../../gtk/gtkactionmuxer.c line 414
  • #26 gtk_action_muxer_activate_action
    at ../../../../gtk/gtkactionmuxer.c line 414
  • #27 gtk_action_muxer_activate_action
    at ../../../../gtk/gtkactionmuxer.c line 414
  • #28 gtk_action_muxer_activate_action
    at ../../../../gtk/gtkactionmuxer.c line 414
  • #29 gtk_action_muxer_activate_action
    at ../../../../gtk/gtkactionmuxer.c line 414
  • #30 gtk_action_muxer_activate_action
    at ../../../../gtk/gtkactionmuxer.c line 414
  • #31 gtk_action_muxer_activate_action
    at ../../../../gtk/gtkactionmuxer.c line 414
  • #32 gtk_action_muxer_activate_action
    at ../../../../gtk/gtkactionmuxer.c line 414
  • #33 gtk_menu_tracker_item_activated
    at ../../../../gtk/gtkmenutrackeritem.c line 799
  • #34 gtk_popover_item_activate
    at ../../../../gtk/gtkmenusectionbox.c line 184
  • #38 <emit signal ??? on instance 0x561a95459c70 [GtkModelButton]>
    at ../../../../gobject/gsignal.c line 3447
  • #39 gtk_button_do_release
    at ../../../../gtk/gtkbutton.c line 1843
  • #40 gtk_real_button_released
    at ../../../../gtk/gtkbutton.c line 1961
  • #41 _g_closure_invoke_va
    at ../../../../gobject/gclosure.c line 867
  • #42 g_signal_emit_valist
    at ../../../../gobject/gsignal.c line 3300
  • #43 g_signal_emit
    at ../../../../gobject/gsignal.c line 3447
  • #44 multipress_released_cb
    at ../../../../gtk/gtkbutton.c line 666
  • #45 ffi_call_unix64
    at ../src/x86/unix64.S line 76
  • #46 ffi_call
    at ../src/x86/ffi64.c line 525
  • #47 g_cclosure_marshal_generic_va
    at ../../../../gobject/gclosure.c line 1604
  • #48 _g_closure_invoke_va
    at ../../../../gobject/gclosure.c line 867
  • #49 g_signal_emit_valist
    at ../../../../gobject/gsignal.c line 3300
  • #50 g_signal_emit
    at ../../../../gobject/gsignal.c line 3447
  • #51 gtk_gesture_multi_press_end
    at ../../../../gtk/gtkgesturemultipress.c line 282
  • #52 g_cclosure_marshal_VOID__BOXEDv
    at ../../../../gobject/gmarshal.c line 1950
  • #53 _g_closure_invoke_va
    at ../../../../gobject/gclosure.c line 867
  • #54 g_signal_emit_valist
    at ../../../../gobject/gsignal.c line 3300
  • #55 g_signal_emit
    at ../../../../gobject/gsignal.c line 3447
  • #56 _gtk_gesture_set_recognized
    at ../../../../gtk/gtkgesture.c line 345
  • #57 _gtk_gesture_check_recognized
    at ../../../../gtk/gtkgesture.c line 386
  • #58 gtk_gesture_handle_event
    at ../../../../gtk/gtkgesture.c line 777
  • #59 gtk_gesture_single_handle_event
    at ../../../../gtk/gtkgesturesingle.c line 222
  • #60 gtk_event_controller_handle_event
    at ../../../../gtk/gtkeventcontroller.c line 230
  • #61 _gtk_widget_run_controllers
    at ../../../../gtk/gtkwidget.c line 7367
  • #62 _gtk_marshal_BOOLEAN__BOXEDv
    at ../../../../gtk/gtkmarshalers.c line 128
  • #63 _g_closure_invoke_va
    at ../../../../gobject/gclosure.c line 867
  • #64 g_signal_emit_valist
    at ../../../../gobject/gsignal.c line 3300
  • #65 g_signal_emit
    at ../../../../gobject/gsignal.c line 3447
  • #66 gtk_widget_event_internal
    at ../../../../gtk/gtkwidget.c line 7732
  • #67 gtk_widget_event
    at ../../../../gtk/gtkwidget.c line 7302
  • #68 propagate_event_up
    at ../../../../gtk/gtkmain.c line 2588
  • #69 propagate_event
    at ../../../../gtk/gtkmain.c line 2690
  • #70 gtk_main_do_event
    at ../../../../gtk/gtkmain.c line 1911
  • #71 _gdk_event_emit
    at ../../../../gdk/gdkevents.c line 73
  • #72 gdk_event_source_dispatch
    at ../../../../../gdk/wayland/gdkeventsource.c line 124
  • #73 g_main_dispatch
    at ../../../../glib/gmain.c line 3148
  • #74 g_main_context_dispatch
    at ../../../../glib/gmain.c line 3813
  • #75 g_main_context_iterate
    at ../../../../glib/gmain.c line 3886
  • #76 g_main_context_iteration
    at ../../../../glib/gmain.c line 3947
  • #77 g_application_run
    at ../../../../gio/gapplication.c line 2401
  • #78 rb_application_run
    at rb-application.c line 671
  • #79 main
    at main.c line 88

Comment 1 gkrithi8 2017-12-20 06:58:38 UTC
Create automatic playlist. Click on 'Location column' header so the results are sorted by column. Click 'Playlist -> Edit'. Rhythmbox crashes.
Comment 2 gkrithi8 2017-12-20 06:58:49 UTC
Downstream bug:

https://bugzilla.redhat.com/show_bug.cgi?id=1359611
Comment 3 gkrithi8 2017-12-20 07:35:59 UTC
will attach patches shortly
Comment 4 gkrithi8 2017-12-20 08:44:59 UTC
Created attachment 365783 [details] [review]
query-creator: add location and bitrate columns to sort options
Comment 5 gkrithi8 2017-12-20 08:45:27 UTC
Created attachment 365784 [details] [review]
query-creator: check sort index on num_sort_options, not num_property_options
Comment 6 Jonathan Matthew 2017-12-26 06:45:34 UTC
Review of attachment 365784 [details] [review]:

I've pushed the part described by the subject line as commit 99db05027; the other bits need more work.

::: shell/rb-playlist-manager.c
@@ +946,3 @@
 									     sort_key,
 									     sort_direction));
+		g_return_if_fail (creator != NULL);

If this condition can actually happen, we'll need some error handling here, not just a g_return_if_fail.

::: widgets/rb-query-creator.c
@@ +490,3 @@
  * settings.
  *
+ * Return value: (transfer full) (nullable): new query creator widget

The query creator widget isn't made available via introspection, so we don't need to add annotations to it.
Comment 7 gkrithi8 2017-12-26 07:06:41 UTC
(In reply to Jonathan Matthew from comment #6)

> ::: shell/rb-playlist-manager.c
> @@ +946,3 @@
>  									     sort_key,
>  									     sort_direction));
> +		g_return_if_fail (creator != NULL);
> 
> If this condition can actually happen, we'll need some error handling here,
> not just a g_return_if_fail.

should this be fine ?

--- a/shell/rb-playlist-manager.c
+++ b/shell/rb-playlist-manager.c
@@ -945,7 +945,11 @@ edit_auto_playlist_action_cb (GSimpleAction *action, GVariant *parameter, gpoint
                                                                             limit_value,
                                                                             sort_key,
                                                                             sort_direction));
-               g_return_if_fail (creator != NULL);
+               if (creator == NULL) {
+                       rb_error_dialog (NULL, _("Couldn't edit playlist"),
+                                        _("Failed to create query creator"));
+                       return;
+               }
 
                if (limit_value != NULL) {
                        g_variant_unref (limit_value);
Comment 8 Jonathan Matthew 2017-12-26 08:03:17 UTC
(In reply to gkrithi8 from comment #7)
> (In reply to Jonathan Matthew from comment #6)
> 
> > ::: shell/rb-playlist-manager.c
> > @@ +946,3 @@
> >  									     sort_key,
> >  									     sort_direction));
> > +		g_return_if_fail (creator != NULL);
> > 
> > If this condition can actually happen, we'll need some error handling here,
> > not just a g_return_if_fail.
> 
> should this be fine ?

I don't think this really helps much, as it doesn't explain what's wrong or how to fix it.

Let's go back to the first part - does this condition indicate a programming error (I think it does), and if so, can we detect it at build time rather than runtime?
Comment 9 gkrithi8 2017-12-26 08:18:52 UTC
(In reply to Jonathan Matthew from comment #8)

> Let's go back to the first part - does this condition indicate a programming
> error (I think it does), and if so, can we detect it at build time rather
> than runtime?

maybe, a unit test to check that all sortable columns in playlist's view and in query-creator sort_options are in sync ?
Comment 10 gkrithi8 2017-12-26 08:36:05 UTC
1. There are currently 16 visible columns in view [Rhythmbox Preferences -> 15 visible columns] + Title column ( which is mandatory )

2. There are currently 15 options in sort_options array 

const RBQueryCreatorSortOption sort_options[] = {...}

out of which "Album Artist" is not a displayed / visible column. Not sure if it would be helpful to sort on "Album Artist" when it is not displayed in the view.

3. Missing column in view = "Album Artist"

4. Missing columns in sort_options = "location" and "bitrate". This is addressed in attachment 365783 [details] [review].
Comment 11 gkrithi8 2017-12-28 18:22:38 UTC
any suggestions ?
Comment 12 GNOME Infrastructure Team 2018-05-24 19:39:16 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/rhythmbox/issues/1620.