After I unwittingly upgraded from openSUSE 10.2 to openSUSE 10.3, I wasn’t able to run Zend Studio 5.5.0. I would click the icon to start it up and nothing would happen; even the splash screen would not appear. I opened up a command prompt and ran Zend Studio from there, assuming I might get some sort of error output. Sure enough:
$ /path/to/ZendStudio-5.5.0/bin/ZDEHmm, that looks like some sort of Java error to me. Given that I’d just done a big update to my operating system I thought that maybe Java had become screwed up or something, so the first thing I did was to reinstall it (I’d had some success in removing and then reinstalling some of the corrupted software from my upgrade). That didn’t make any difference though, and I still got the same error.
java: xcb_xlib.c:52: xcb_xlib_unlock: Assertion `c->xlib.lock' failed.
So I plugged the error message into Google and first result was this page on the Sun Developer Network site. I didn’t actually bother reading the text on the page, just did a Ctrl+F to find the error message on the page, which happened to be in the user submitted comments under the bug report. I scrolled down, scanning the posts for any useful information until I spotted a post that said: “I have the same problem with OpenSuSE 10.3. The sed-workaround works for me.”
Aha! so a quick search on the page for “sed” and I spotted this post:
I worked with jcristau and christoph4 via IRC on #debian-x, and we managed to
track down the problem with broken locking in Sun Java 1.5 and 1.6.It only
occurs if Java finds the Xinerama extension, at which point it does something
broken with locking and triggers the assertion.If Java never finds the
Xinerama extension, it doesn't trigger the assertion for broken locking.
The following workarounds address this problem:
sed -i 's/XINERAMA/FAKEEXTN/g' /usr/lib/jvm/java-1.5.0-sun-220.127.116.11/jre/lib/i386/xawt/libmawt.so
sed -i 's/XINERAMA/FAKEEXTN/g' /usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/i386/xawt/libmawt.so
The same fix (applied to the appropriate file) might work for otherI ran
sed -i 's/XINERAMA/FAKEEXTN/g' /usr/lib/jvm/java-1.5.0-sun-18.104.22.168/jre/lib/i386/xawt/libmawt.soas the root user but got the following error message:
sed: can't read /usr/lib/jvm/java-1.5.0-sun-22.214.171.124/jre/lib/i386/xawt/libmawt.soI used “find” the locate the actual location of the file:
find /usr/lib64/jvm -name "libmawt.so"and then ran the sed command again like so:
sed -i 's/XINERAMA/FAKEEXTN/g'However, Zend Studio still wouldn’t run, exiting with the same
java: xcb_xlib.c:52: xcb_xlib_unlock: Assertion `c->xlib.lock' failed error message. I figured Zend must have its own copies of those Java files so another find on the directory Zend Studio is installed to turned up with:
$ find /path/to/ZendStudio-5.5.0 -name "libmawt.so"So I ran the sed command again on the Zend Studio version of the file:
sed -i 's/XINERAMA/FAKEEXTN/g' /path/to/ZendStudio-5.5.0/jre/lib/i386/xawt/libmawt.soand this time Zend Studio was able to run. Yay!