[Xcb] Nested XLockDisplay

Josh Triplett josh at freedesktop.org
Thu Jan 4 14:56:26 PST 2007


Elias Naur wrote:
> Sorry if this is trivial or have been addressed before, but my
> searching failed to bring up anything conclusive. My problem is the
> LockDisplay/UnlockDisplay assertion failures in the xlib-on-xcb
> library. I've got a LWJGL (http://lwjgl.org) user that complains that
> the "xcb_xlib.c:41: xcb_xlib_lock: Assertion `!c->xlib.lock' failed."
> occurs with aany test program. This is a java based library, but I
> haven't yet tried to find out if the Sun java implementation or the
> LWJGL library is at fault. As far as I can tell, the assertion means
> that XLockDisplay has been called while the lock was already held.
> However, the xlib manual at
> http://tronche.com/gui/x/xlib/display/XLockDisplay.html states that
> "Nested calls to XLockDisplay() work correctly; the display will not
> actually be unlocked until XUnlockDisplay() has been called the same
> number of times as XLockDisplay()". Have I misunderstood something or
> has the spec changed with xlib-on-xcb to disallow nested XLockDisplay
> (I can understand the other common assertion failure that occurs when
> XUnlockDisplay is called without holding the lock)?

Nested calls to XLockDisplay, in the public API, work fine.  Nested calls to
LockDisplay, in Xlibint.h, do not.  Things which trigger this assertion have
used an internal-only call which only extension libraries should use.  In
this case, as you mentioned in a later mail, libXrandr makes the problematic
call.

- Josh Triplett

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://lists.freedesktop.org/archives/xcb/attachments/20070104/0197bf20/signature.pgp


More information about the Xcb mailing list