GNOME Bugzilla – Bug 624266
[playbin2] Internal uridecodebin are not properly removed in READY=>NULL
Last modified: 2010-07-14 13:37:35 UTC
When one re-uses playbin2 after having it set it to NULL, playbin2 will end up still having the previously used uridecodebin since they are not removed from playbin2 in READY=>NULL. This error will cause (amongst other things) this issue: * you play some files/streams in totem * one of them has an error * totem sets playbin2 to NULL * user clicks on the next stream * totem sets playbin2 to PAUSED/PLAYING * previous (erroring) uridecodebin will be set to PAUSED/PLAYING and you will get the errors again. The following patch fixes the issue.
Created attachment 165817 [details] [review] gstplaybin2: Remove uridecodebin when going to NULL. If you re-use playbin2... you will end-up with the previous uridecodebin(s) still present and wanting to change state.
This patch is not entirely correct. The uridecodebins will usually be removed from the bin already, which gives you an assertion failure. e.g. in activate_group() if the suburidecodebin fails and in deactivate_group() (which is called on state change failures and when switching groups). At least you should check if the parent of the uridecodebins still is playbin2 before removing them. Now the real question is, why the old, failed uridecodebins are not removed from the bin for you. Of course the idea of the patch is correct and the uridecodebins should be removed from playbin2 in the state change function when going to NULL but something is really wrong if the broken uridecodebins are still inside the bin at that point.
Also I can't reproduce this here... which totem version are you using?
totem 2.30.0 (not sure it's the same at on my office computer, but it definitely shows the same mis-behaviour).
it should be noted also that I get the following critical warning : (totem:6109): GLib-GObject-CRITICAL **: g_object_get: assertion `G_IS_OBJECT (object)' failed Which comes from the notify::source callback which tries to get the source... from a NULL uridecodebin.
Are you sure you are using current git of -base? Because this looks exactly like the issue I had and which got fixed, see bug #505770 comment 21 and bug #623318.
This happens only when the error is triggered by the demuxer before any streams are created. And yes, I'm certain it's current git of -base
Created attachment 165848 [details] Log of failure GST_DEBUG=2,totem:5,*STATE*:5,playbin2:5,uridecodebin:5 totem /media/data/medias/animal\ 2006\ movie.mov /media/data/medias/07\ Steria\ -\ Logo.avi > log 2>&1 The first file will fail in qtdemux (it's always failed, that's not the issue here) and totem shows me an error. When I click next I get the same error. This is with totem 2.30.2
Created attachment 165866 [details] [review] playbin2: Disconnect uridecodebins when going back to READY and set them to NULL state Fixes spurious errors that happen after an error and playing a working stream afterwards or signals that are emitted for non-active groups. Fixes bug #624266.
Created attachment 165867 [details] [review] playbin2: Disconnect uridecodebins when going back to READY and set them to NULL state Fixes spurious errors that happen after an error and playing a working stream afterwards or signals that are emitted for non-active groups. Fixes bug #624266.
Still has some problems it seems... it deadlocks :( Will look later
Created attachment 165870 [details] [review] playbin2: Disconnect uridecodebins when going back to READY and set them to NULL state Fixes spurious errors that happen after an error and playing a working stream afterwards or signals that are emitted for non-active groups. Fixes bug #624266.
Created attachment 165876 [details] [review] playbin2: Disconnect and destroy uridecodebins when going from READY to NULL Fixes spurious errors that happen after an error and playing a working stream afterwards or signals that are emitted for non-active groups. Fixes bug #624266.
Created attachment 165877 [details] [review] playbin2: Disconnect and destroy uridecodebins when going from READY to NULL Fixes spurious errors that happen after an error and playing a working stream afterwards or signals that are emitted for non-active groups. Fixes bug #624266.
Last patch fixes the issue without any hangs. Nice one :)
commit 8bd37ab9956d390a867d99196fe9d363c11dd679 Author: Sebastian Dröge <sebastian.droege@collabora.co.uk> Date: Wed Jul 14 12:59:19 2010 +0200 playbin2: Disconnect and destroy uridecodebins when going from READY to NULL Fixes spurious errors that happen after an error and playing a working stream afterwards or signals that are emitted for non-active groups. Fixes bug #624266.