Zend Studio: fixing ‘Assertion `c->xlib.lock’ failed’ bug

Once I’ve installed Fedora 8 and restored backup copy of my Zend Studio 5.5, I was stunned to see following error output while trying to run it:

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

No worries tough. Google is always your friend, so solution came up pretty quickly. :)

As article I have found is quite long, I will only bring up a solution which worked for me. Basically, problem lies in libmawt.so file, which needs to be altered a bit using sed. Finding that file is dead easy:

[evad@d620 ~]$ locate libmawt.so
/usr/lib/jvm/java-1.7.0-icedtea-1.7.0.0/jre/lib/i386/headless/libmawt.so
/usr/lib/jvm/java-1.7.0-icedtea-1.7.0.0/jre/lib/i386/xawt/libmawt.so
/usr/local/Zend/ZendStudio-5.5.0/jre/lib/i386/headless/libmawt.so
/usr/local/Zend/ZendStudio-5.5.0/jre/lib/i386/motif21/libmawt.so
/usr/local/Zend/ZendStudio-5.5.0/jre/lib/i386/xawt/libmawt.so

Exact paths might be (and probably will be) different on your machine, however copies of libmawt.so which need modification are just those lying in /xawt subdirectories. Sed modification should look like this: (Note: making backup copies of libmawt.so files might be a good idea)

sed -i 's/XINERAMA/FAKEEXTN/g' /usr/lib/jvm/java-1.7.0-icedtea-1.7.0.0/jre/lib/i386/xawt/libmawt.so
sed -i 's/XINERAMA/FAKEEXTN/g' /usr/local/Zend/ZendStudio-5.5.0/jre/lib/i386/xawt/libmawt.so

And that’s it! Once I’ve ran these two commands, I could use Zend Studio back again. :) Please refer to source article to get more details in case this solution didn’t work for you, or run Google to find another one.

Source:
http://www.electrictoolbox.com/java-error-zend-studio/

4 Responses to “Zend Studio: fixing ‘Assertion `c->xlib.lock’ failed’ bug”

  1. user Says:

    Did not work

  2. Dawid Lorenz Says:

    Sorry about that

  3. Stax Says:

    No need for such hacks, sun has fixed this bug (http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6532373) in latest jre, 1.6.0_06.

  4. Eric Ndiku Musyoki Says:

    Another work around is to issue the command “export LIBXCB_ALLOW_SLOPPY_LOCK=1″ before executing the Zend Studio binary. You also need to include this in your /Installation_Dir/ZendStudio_Version/bin/ZDE executable at the top of the file so it gets executed all the time when you start Zend Studio. It works perfectly for me.