Commit 5458d5a1 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

misc/objects.c: Print more info about what was the parent or what were the...

misc/objects.c: Print more info about what was the parent or what were the children if vlc_object_destroy() failed.
parent 6ca5cc12
...@@ -362,23 +362,36 @@ static void vlc_object_destroy( vlc_object_t *p_this ) ...@@ -362,23 +362,36 @@ static void vlc_object_destroy( vlc_object_t *p_this )
/* FIXME: ugly hack - we cannot use the message queue after /* FIXME: ugly hack - we cannot use the message queue after
* msg_Destroy(). */ * msg_Destroy(). */
vlc_object_t *logger = p_this; vlc_object_t *logger = p_this;
if( p_this->p_libvlc == p_this ) if( (vlc_object_t *)p_this->p_libvlc == p_this )
logger = NULL; logger = NULL;
if( p_this->i_children ) if( p_this->i_children )
{ {
fprintf( stderr, int i;
"ERROR: cannot delete object (%i, %s) with children\n",
p_this->i_object_id, p_this->psz_object_name ); fprintf( stderr, "ERROR: cannot delete object (%i, %s) with %d children\n",
p_this->i_object_id, p_this->psz_object_name, p_this->i_children );
for( i = 0; i < p_this->i_children; i++ )
{
fprintf( stderr, "ERROR: Remaining children object (id:%i, type:%s, name:%s)\n",
p_this->pp_children[i]->i_object_id,
p_this->pp_children[i]->psz_object_type,
p_this->pp_children[i]->psz_object_name );
}
fflush(stderr); fflush(stderr);
abort(); abort();
} }
if( p_this->p_parent ) if( p_this->p_parent )
{ {
fprintf( stderr, fprintf( stderr, "ERROR: cannot delete object (id:%i, type:%s, name:%s) with a parent (id:%i, type:%s, name:%s)\n",
"ERROR: cannot delete object (%i, %s) with a parent\n", p_this->i_object_id,
p_this->i_object_id, p_this->psz_object_name ); p_this->psz_object_type,
p_this->psz_object_name,
p_this->p_parent->i_object_id,
p_this->p_parent->psz_object_type,
p_this->p_parent->psz_object_name );
fflush(stderr); fflush(stderr);
abort(); abort();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment