Java + X (xcb) bug workaround

jdavidb on 2008-02-20T16:04:27

On Fedora 8, and probably several other operating systems, if you attempt to run a Java GUI application (specifically anything that uses AWT, and Swing uses AWT, so this is just about everything), you'll encounter the following error:

java: xcb_xlib.c:50: xcb_xlib_unlock: Assertion `c->xlib.lock' failed.

This is due to a bug in xcb, although apparently the xcb developers initially felt it was not really their problem because it occurs when code (in this case, the JDK) is compiled on a machine which lacks a particular library and is executed on a machine which has that library. JDK 1.7 should include a workaround. In the meantime, the solution is to upgrade the libxcb package. libxcb 1.0-3.fc8 is known to exhibit the problem, 1.0-4.fc8 is known to be clean.

Update: 2008-07-31: libxcb-1.1-1.fc8.i386.rpm has been released which appears to bring this problem back. If possible, fix by setting environment variable LIBXCB_ALLOW_SLOPPY_LOCK to a value of 1. If you really want libxcb-1.0-4.fc8.i386.rpm, I have it, thanks to the help of Mr. Muskrat, and I do not intend to be turning loose of it any time soon. Post here or email me and I will happily provide it to you.