[vlc-devel] "fatal error locking mutex" trying to run libvlc example

Stjepan Rajko stjepan.rajko at gmail.com
Sun Nov 9 18:11:57 CET 2008


Hi Vasils,

On Sat, Nov 8, 2008 at 10:10 AM, basos g <noxelia at gmail.com> wrote:
> Hello,
>  im working on c++ ( more specific wxwidgets) binding with c++.  Im
> not getting this problem.

This is good to know.  What platform are you on?

> Alsos it says
>
>>> LibVLC fatal error locking mutex in thread 2685341600 at misc/objects.c:194: 22
>>>  Error message: Invalid argument
>
> so vlc didn't like some argument.. Please provide the code you are
> trying to execute.

The code is a verbatim copy of
http://wiki.videolan.org/LibVLC_Tutorial, except I changed
--module-path to be --plugin-path.  The line in misc/objects.h (part
of VLC) that dies is a part of __vlc_custom_create and is simply:
vlc_mutex_lock( &structure_lock );

where structure_lock is a static global object that is supposed to be
initialized earlier in the code:
    if( p_this == NULL )
    {
        //...
        vlc_mutex_init( &structure_lock );
    }

> Also in this (http://wiki.videolan.org/WxVLCBackend) page you can find
> (with a kindof tricky way) another vlc and wxwidgets sample code. You
> will need wxWidgets 2.8.8 libraries to succesfully compile. It is not
> perfect and i'm trying to debug some issues but it initializes OK..
>

Thanks for the link. From what I can tell, it seems like you are not
supplying a plugin-path.  Is this correct?  When I comment out the
plugin-path and --ignore-config in my code, I don't get the crash but
instead (again from the libvlc_new call):

[[32;1m00000001[0m] main libvlc error: [31;1mno memcpy module matched "any"[0m
[[32;1m00000007[0m] main access error: [31;1mno access module matched "file"[0m
[[32;1m00000006[0m] main input error: [31;1mopen of
`file/xspf-open:///Users/srajko/Library/Preferences/VLC/ml.xspf'
failed: could not create access: no access module matched "file"[0m
[[32;1m00000010[0m] main interface error: [31;1mno interface module
matched "hotkeys,none"[0m
[[32;1m00000010[0m] main interface error: [31;1mno suitable interface module[0m
[[32;1m00000001[0m] main libvlc error: [31;1minterface "hotkeys,none"
initialization failed[0m

and then from libvlc_media_player_play:
[[32;1m00000011[0m] main input error: [31;1mopen of
`http://mycool.movie.com/test.mov' failed: could not create access: no
access module matched "http"[0m

... which seems understandable, without the plugins.  If I put back
--ignore-config, same thing except it doesn't complain about opening
the config file.

The above behavior is what I get on OS X when using either compiled
0.9.5 libvlc or the 0.9.4 or 0.9.6 libvlc that comes with downloadable
VLC.app.  I am now trying to compile 0.9.6 libvlc to see what
happens....


Best,

Stjepan



More information about the vlc-devel mailing list