[vlc-devel] commit: Fix release of chroma module in voutcore.Istill get an " object is not (Antoine Cellerier )

Remi Denis-Courmont rdenis at simphalempin.com
Mon Jun 23 11:17:57 CEST 2008

On Mon, 23 Jun 2008 10:06:11 +0200, Antoine Cellerier
<dionoea at videolan.org> wrote:
> On Mon, Jun 23, 2008, Remi Denis-Courmont wrote:
>> > I added a if( p_this->i_object_type == VLC_OBJECT_FILTER ) abort(); in
>> > vlc_object_detach() and it only was called once ... with p_parent set
> to
>> > NULL. (The object is clearly attached at creation ... in fact if you
>> > detach right after creation it works fine)
>> Now that I think of it. This can happen if the parent has been destroyed
>> before the child. You can omit vlc_object_detach() if it comes right
> before
>> vlc_object_release() I guess.
> What does "parent has been destroyed" mean? (This call to
> vlc_object_detach() is in the vout thread destructor code ... the vout
> object still exists at that point)

The (parent) object reference count reaches 0, due to one more
vlc_object_release() than vlc_object_yield(). The parent object is then
"atomically" removed from the global object list, unlinked from its parent
(if it has one), and from its children (if any). _After_ that, the
destructor callback is invoked (if set). Finally, the object is actually

Hence, if you are calling vlc_object_detach() from the destructor
_callback_ (as set by vlc_object_set_destructor IIRC) of your own parent,
it will always fail. Detaching will have been done automatically
beforehand. Unless you want to use var_Get(), this should be a non-issue.

Rémi Denis-Courmont

More information about the vlc-devel mailing list