[cairo] RenderBadGlyphSet (invalid GlyphSet parameter)

Chris Wilson chris at chris-wilson.co.uk
Wed Dec 2 00:57:15 PST 2009


On Wed, 2 Dec 2009 14:41:08 +1100, Simon Burton <simon at arrowtheory.com> wrote:
> I am using the cairo xlib surface, and I got this error on
> one of the X servers we run:
> 
> 'RenderBadGlyphSet (invalid GlyphSet parameter)'.
>  (Details: serial 339 error_code 171 request_code 151 minor_code 20)
> 
> Has anyone seen this error before ? I also use gtk so I suppose it could
> be a gtk problem. Or maybe I am confusing my cairo contexts.

No, the only time I've see that type of error is when developing the code.
Let me make a guess about your code: multi-threaded, long-lived contexts,
contexts moving between threads?

Glyphs and glyphsets are meant to be only manipulated whilst holding the
font mutex, but we have the extra twist of trying to ensure serialised
access to the Display. In 1.8, this is done by queueing work and running all
pending tasks for a Display at the start of the function (when we know we
have a valid thread context for the Display - multithreading in xlib is not
fun). This is the most probable window for a race between multiple
rendering threads.

Of course this whole supposition is moot if you are not writing a
multithreaded application... If you are, then you will be looking forward to
1.10 where we are aiming to fix a few of the remaining tiny race windows for
multiple rendering threads and xlib.
-ickle

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the cairo mailing list