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 647757 - [bin] Doesn't check if an element is still a child before changing the state
[bin] Doesn't check if an element is still a child before changing the state
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:25 UTC by Sebastian Dröge (slomo)
Modified: 2011-05-14 10:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
bin: Check if an element is still child of the bin before changing the state (1.25 KB, patch)
2011-04-14 10:45 UTC, Sebastian Dröge (slomo)
rejected Details | Review

Description Sebastian Dröge (slomo) 2011-04-14 10:25:14 UTC
See attached patch, the element could be removed between getting it from the iterator and setting its state
Comment 1 Sebastian Dröge (slomo) 2011-04-14 10:45:18 UTC
Created attachment 185944 [details] [review]
bin: Check if an element is still child of the bin before changing the state

Fixes bug #647757.
Comment 2 Sebastian Dröge (slomo) 2011-04-14 10:46:14 UTC
of course there's still a small race here, the element could be removed between checking and before setting the state.
Comment 3 Wim Taymans 2011-04-20 15:22:00 UTC
There is not so much one can do for those races. The effect of a concurrent remove and set_state however is always something of the following after both methods complete:

1) the element is removed before the state is set
2) the element is removed after the state is set

That's perfectly normal behaviour if you do uncontrolled simultaneous execution of those 2 methods.
Comment 4 Sebastian Dröge (slomo) 2011-04-21 15:23:35 UTC
So... would you like to see this patch in, which helps a bit, or just keep it as is? The patch doesn't help that much ;)
Comment 5 Sebastian Dröge (slomo) 2011-05-14 10:12:29 UTC
Oh well, let's close this. There's nothing we can do here to fix it completely :)