[Bug 670321] playbin2 hangs and crashes in notify_source_cb() when controlled by rhythmbox

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Sat Feb 18 02:19:33 PST 2012


https://bugzilla.gnome.org/show_bug.cgi?id=670321
  GStreamer | gst-plugins-base | 0.10.x

--- Comment #1 from Thomas Meyer <thomas at m3y3r.de> 2012-02-18 10:19:24 UTC ---
Hello,

I think above crash is a consecutive crash resulting from this stack trace:

Thread [1] 16033 [core: 0] (Suspended : Signal : SIGINT:Interrupt)    
    __kernel_vsyscall() at 0xf771b430    
    raise() at 0x43ed5b4e    
    rb_debug_stop_in_debugger() at rb-debug.c:282 0x41554149    
    log_handler() at rb-debug.c:299 0x415541b5    
    g_logv() at gmessages.c:545 0x4753726f    
    g_log() at gmessages.c:591 0x475375e4    
    g_return_if_fail_warning() at gmessages.c:600 0x4753784e    
    g_str_has_prefix() at gstrfuncs.c:2.944 0x4754fe1a    
    set_source_properties() at rb-audiocd-plugin.c:107 0xef4d84f5    
    rb_audiocd_plugin_prepare_player_source_cb() at rb-audiocd-plugin.c:140
0xef4d84f5    
    rb_marshal_VOID__STRING_OBJECT() at rb-marshal.c:2.253 0x41564cd2    
    g_closure_invoke() at gclosure.c:774 0x4732a645    
    signal_emit_unlocked_R() at gsignal.c:3.272 0x4733d860    
    g_signal_emit_valist() at gsignal.c:3.003 0x473462ff    
    g_signal_emit() at gsignal.c:3.060 0x47346464    
    source_notify_cb() at rb-player-gst.c:618 0x41551687    
    g_cclosure_marshal_VOID__PARAM() at gmarshal.c:539 0x4732c5cb    
    g_closure_invoke() at gclosure.c:774 0x4732a645    
    signal_emit_unlocked_R() at gsignal.c:3.272 0x4733d860    
    g_signal_emit_valist() at gsignal.c:3.003 0x473462ff    
    g_signal_emit() at gsignal.c:3.060 0x47346464    
    g_object_dispatch_properties_changed() at gobject.c:925 0x4732d837    
    gst_object_dispatch_properties_changed() at gstobject.c:530 0xf753af92    
    g_object_notify_dispatcher() at gobject.c:331 0x4732ccb0    
    g_object_notify_queue_thaw() at gobjectnotifyqueue.c:132 0x4732fa62    
    g_object_notify_by_spec_internal() at gobject.c:983 0x4732fa62    
    g_object_notify() at gobject.c:1.024 0x4732fa62    
    notify_source_cb() at gstplaybin2.c:3.451 0xef1ca938    
    g_cclosure_marshal_VOID__PARAM() at gmarshal.c:539 0x4732c5cb    
    g_closure_invoke() at gclosure.c:774 0x4732a645    
    signal_emit_unlocked_R() at gsignal.c:3.272 0x4733d860    
    g_signal_emit_valist() at gsignal.c:3.003 0x473462ff    
    g_signal_emit() at gsignal.c:3.060 0x47346464    
    g_object_dispatch_properties_changed() at gobject.c:925 0x4732d837    
    gst_object_dispatch_properties_changed() at gstobject.c:530 0xf753af92    
    g_object_notify_dispatcher() at gobject.c:331 0x4732ccb0    
    g_object_notify_queue_thaw() at gobjectnotifyqueue.c:132 0x4732fa62    
    g_object_notify_by_spec_internal() at gobject.c:983 0x4732fa62    
    g_object_notify() at gobject.c:1.024 0x4732fa62    
    setup_source() at gsturidecodebin.c:2.015 0xeef29c4a    
    gst_uri_decode_bin_change_state() at gsturidecodebin.c:2.493 0xeef29c4a    
    gst_element_change_state() at gstelement.c:2.761 0xf7558a9b    
    gst_element_set_state_func() at gstelement.c:2.717 0xf75594c5    
    gst_element_set_state() at gstelement.c:2.618 0xf75587d1    
    gst_bin_element_set_state() at gstbin.c:2.209 0xf7543c0e    
    gst_bin_change_state_func() at gstbin.c:2.518 0xf7543c0e    
    gst_pipeline_change_state() at gstpipeline.c:482 0xf757c2fa    
    gst_play_bin_change_state() at gstplaybin2.c:3.942 0xef1ccd99    
    gst_element_change_state() at gstelement.c:2.761 0xf7558a9b    
    gst_element_set_state_func() at gstelement.c:2.717 0xf75594c5    
    gst_element_set_state() at gstelement.c:2.618 0xf75587d1    
    start_state_change() at rb-player-gst.c:382 0x41552092    
    impl_close() at rb-player-gst.c:761 0x41552f56    
    rb_player_close() at rb-player.c:398 0x41543344    
    bus_cb() at rb-player-gst.c:509 0x4155265a    
    gst_bus_source_dispatch() at gstbus.c:764 0xf7548587    
    g_main_dispatch() at gmain.c:2.441 0x4752e62f    
    g_main_context_dispatch() at gmain.c:3.011 0x4752e62f    
    g_main_context_iterate() at gmain.c:3.089 0x4752ed70    
    g_main_loop_run() at gmain.c:3.297 0x4752f3a7    
    gtk_main() at gtkmain.c:1.362 0x41159155    
    main() at main.c:324 0x804a2e4    

I think this is happening:

bus_cb(): receives an error and try to close the player:

        /* close if not already closing */
        if (mp->priv->uri != NULL)
->            rb_player_close (RB_PLAYER (mp), NULL, NULL);

this will lead to a call to impl_close() that will set the player uri to NULL:
    mp->priv->uri = NULL;
    mp->priv->prev_uri = NULL;

and will call this state change
    if (mp->priv->playbin != NULL) {
->        start_state_change (mp, GST_STATE_NULL, PLAYER_SHUTDOWN);
    }

the state change will trigger gst_uri_decode_bin_change_state():

  switch (transition) {
    case GST_STATE_CHANGE_READY_TO_PAUSED:
->   if (!setup_source (decoder))
        goto source_failed;
      break;
    default:
      break;
  }

that method changes the current source via setup_source():
    /* notify of the new source used */
->  g_object_notify (G_OBJECT (decoder), "source");

this will notify notify_source_cb() in playbin2:
  GST_OBJECT_LOCK (playbin);
  if (playbin->source)
    gst_object_unref (playbin->source);
  playbin->source = source;
  GST_OBJECT_UNLOCK (playbin);

->  g_object_notify (G_OBJECT (playbin), "source");

playbin2 wants to notify all(?) dependent object of the source change in
source_notify_cb():

static void
source_notify_cb (GObject *object, GParamSpec *pspec, RBPlayerGst *player)
{
    GstElement *source;
    g_object_get (object, "source", &source, NULL);

->    g_signal_emit (player, signals[PREPARE_SOURCE], 0, player->priv->uri,
source);

remember player->priv->uri was set to NULL in impl_close()!

the next object that is triggered is
rb_audiocd_plugin_prepare_player_source_cb():

rb_audiocd_plugin_prepare_player_source_cb (RBPlayer *player,
                        const char *stream_uri,
                        GstElement *source,
                        RBAudioCdPlugin *plugin)
{
->    set_source_properties (source, stream_uri, TRUE);
}

set_source_properties() will call 

set_source_properties (GstElement *source, const char *uri, gboolean
playback_mode)
{
    const char *device;

->    if (g_str_has_prefix (uri, "cdda://") == FALSE)
        return;

which will trigger this asserion:

g_str_has_prefix (const gchar  *str,
                  const gchar  *prefix)
{
  int str_len;
  int prefix_len;

->  g_return_val_if_fail (str != NULL, FALSE);

after that the rhythmbox application hangs, two seconds before the end of the
song. when I now double click on "all artist/songs" again the first crash
reported in this bug is triggered.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list