[vlc-devel] Deadlock in freetype module

Jean-Baptiste Kempf jb at videolan.org
Mon Aug 18 19:01:33 CEST 2008

On Sun, Aug 17, 2008 at 11:11:26PM +0400, Sergey E. Galanov wrote :
> After upgrading to the latest version of vlc in my gentoo distribution 
> (0.9.0-beta3)
> there has appeared a problem: while playing any video file the window 
> with video
> output remains black, while sound goes normally.
Is it the 0.9.0-test3 tag or top-of tree git ?

> When, compiled in debug mode, vlc simply crashes because of mutex 
> acquisition
> assertion failure. This problem is caused by a deadlock situation in the 
> freetype module.
> Here is a code excerpt from file 'modules/misc/freetype.c':

> Here we have an obvious deadlock: FontBuilderAttach acquires mutex 
> "fontbuilder", and FontBuilderDone
> which is being called from that function (via var_TriggerCallback) 
> acquires the same mutex.
> Perhaps, it is assumed that in this case 'newval.b_bool' is always 
> false, but since it deadlocks, this assumption is wrong :)
> Of course I don't have any insight into this code and contexts from 
> which it may be called, but it seems to me that the
> call to var_TriggerCallback is erroneous, since callback should be 
> called when builder thread has finished its work. So I just
> commented this call. It worked fine for me.

Is someone skilled to look at it ?

> With this bug vlc is absolutely unusable.

This can happen with test versions...

Best Regards,

Jean-Baptiste Kempf

More information about the vlc-devel mailing list