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 757360 - bin: removing child that failed state change does not restore clean state
bin: removing child that failed state change does not restore clean state
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
unspecified
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-10-30 12:52 UTC by Aleksander Wabik
Modified: 2018-11-03 12:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
The testcase (3.88 KB, patch)
2015-10-30 12:52 UTC, Aleksander Wabik
none Details | Review

Description Aleksander Wabik 2015-10-30 12:52:03 UTC
If one of the children of the bin fails state change, it is not sufficient to just remove it in order to restore clean state. From a quick glance at the gstbin.c, it looks like:

- when element's state change fails, all remaining children do not change state, so the bin may have some children in a changed state, and others in the old state,
- removing the child that failed statechange does not cause remaining children to transite to the previously requested state,
- removing the child that failed statechange does not restore bin's last state change return to a proper value - it's still an error,
- removing a child that posted async-start, if all other children have already posted async-done, will not cause the bin to post async-done if last state change return is error (even if the element that errored was already removed from the bin).

The simple workaround is to call again gst_element_set_state() on the bin after I remove the child that failed state change.
Comment 1 Aleksander Wabik 2015-10-30 12:52:49 UTC
Created attachment 314469 [details] [review]
The testcase

I'm attaching the testcase.
Comment 2 GStreamer system administrator 2018-11-03 12:30:34 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org'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.freedesktop.org/gstreamer/gstreamer/issues/136.