[Fontconfig] thread problem with fontconfig

Patrick Lam plam at MIT.EDU
Sun Feb 26 19:44:41 PST 2006

Christian Krause wrote:
> Hi,
> Recently I found a problem with evince and a special pdf file ([1]).
> The backtrace (see below, [2]) indicates that 2 threads call at the
> same time functions of the fontconfig library when the crash occurs.
> So I have 2 questions:
> 1. Is fontconfig thread-safe? Is there something special where
> developers of multi-threaded applications must take care of?
> 2. Please can you have a look at the backtrace and give me a hint
> where I can start looking for the problem?

fontconfig is not thread-safe.  One way to fix this problem would be to 
have a lock which surrounds all calls to fontconfig.

I can't actually see in the trace what might be causing the crash.  But 
I'm sure that arbitrary things can happen when you call fontconfig from 
multiple threads.


More information about the Fontconfig mailing list