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 647760 - Setting elements to NULL before removing from a bin could lead to assertions
Setting elements to NULL before removing from a bin could lead to assertions
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal critical
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-04-14 10:48 UTC by Sebastian Dröge (slomo)
Modified: 2011-05-14 10:28 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sebastian Dröge (slomo) 2011-04-14 10:48:08 UTC
Setting elements to NULL before removing from a bin could lead to assertions because the element could be set to something >NULL right before removing the element, e.g. by the async state change thread. Not sure what can be done about this. In any case this leads to assertions because the element will get destroying in a non-NULL state now usually.
Comment 1 Olivier Crête 2011-04-14 13:50:50 UTC
In farsight2, I use two different recipes for that.. Either call gst_element_set_locked_state(TRUE) before setting to NULL or I keep a ref, remove, set to NULL, unref.
Comment 2 Sebastian Dröge (slomo) 2011-04-14 14:12:44 UTC
That's the two solutions I had in mind too. But I know it is done wrong in a million places, maybe something could be done in core to prevent this.

But it's good to know that I'm not the only one who sees a problem here :)
Comment 3 Sebastian Dröge (slomo) 2011-05-14 10:28:07 UTC
Ok, let's resolve this as NOTABUG then