[cairo] BadRequest and cairo_xlib_surface_create

Tamas K Papp tpapp at Princeton.EDU
Mon Aug 27 06:13:49 PDT 2007


Sometimes when I try to create a Cairo surface on a pixmap with
cairo_xlib_surface_create, I get a BadRequest error, typically of the

  X Error of failed request:  BadRequest (invalid request code or no such operation)
  Major opcode of failed request:  0 ()
  Serial number of failed request:  25
  Current serial number in output stream:  26

I am using cairo's C bindings from Lisp.  The setup is the following:
each window/contexts is in a separate thread with a separate event
loop.  XSynchronize is turned on.  The display is opened, a window and
a pixmap are created (double buffering).  Then I create a surface,
(this sometimes fails as described above), then a context on it, then
I destroy the surface.

I need help on how to debug this.  Maybe it is a bud in Cairo, or
maybe I messed someting up.  I have only been able to reproduce this
when I create an X11 surface after destroying all the previously open
ones (XSynchronize is on when I am doing that).  Any suggestions?


More information about the cairo mailing list