[vlc-devel] Threads and memory corruption

Olivier Aubert oaubert at lisi.univ-lyon1.fr
Fri Feb 17 17:08:44 CET 2006


Hello

I am investigating a crash in the mediacontrol-python binding that I
have written. I think it is a thread-related memory corruption, because
1- it occurs at different places in the code, depending on the options,
environment...
2- vlc heavily relies on threads and python is known to be rather touchy
with threads from an external library, even though I protected all vlc
calls from python.

One of the most evident occurence of the memory corruption occurs when
doing (with some fprintf put in) :

>>>> import vlc
>>>> mc=vlc.MediaControl( [ '--verbose', '2', '--plugin-path', '/home/oaubert/src/vlc-dev' ] )
// Dump from mediacontrol_init.c, when copying the args :
- Arg 1 : --verbose
- Arg 2 : 2
- Arg 3 : --plugin-path
- Arg 4 : /home/oaubert/src/vlc-dev
// Dump from mediacontrol_init.c, between VLC_Create() and VLC_Init() :
-- Arg 1 : --verbose
-- Arg 2 : 2
-- Arg 3 : --plugin-path
-- Arg 4 : /home/oaubert/src/vlc-dev
// Dump from libvlc.c, in VLC_Init, just after system_Init :
Arg 0 : vlc
Arg 1 : pÁ%
Arg 2 : 2
Arg 3 : --plugin-path
Arg 4 : /home/oaubert/src/vlc-dev
*** glibc detected *** corrupted double-linked list: 0x0825a7d0 ***

So there is a memory corruption occuring after VLC_Create (I am on
linux, so system_Init is #defined as {}). And I guess that this is at
the root of all the other stability problems that occur. 

Is there any thread wizard that could give me a hint or some guidelines
to debug this ?

Thanks.

Olivier



-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html



More information about the vlc-devel mailing list