Matlab “Locking assertion failure.”

Running Matlab R2008a on Linux I got a bunch of error messages in the console.

Locking assertion failure. Backtrace:
#0 /usr/lib/libxcb-xlib.so.0 [0xb55257c7]
#1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_unlock+0x31) [0xb5525891]
#2 /usr/lib/libX11.so.6(_XReply+0x254) [0xb57ef494]
#3 /usr/local/matlab/sys/java/jre/glnx86/jre1.6.0/lib/i386/xawt/libmawt.so [0xaec302be]
#4 /usr/local/matlab/sys/java/jre/glnx86/jre1.6.0/lib/i386/xawt/libmawt.so [0xaec0eed7]
#5 /usr/local/matlab/sys/java/jre/glnx86/jre1.6.0/lib/i386/xawt/libmawt.so [0xaec0f188]
#6 /usr/local/matlab/sys/java/jre/glnx86/jre1.6.0/lib/i386/xawt/libmawt.so(Java_sun_awt_X11GraphicsEnvironment_initDisplay+0x2f) [0xaec0f48f]
#7 [0xafb5c68e]

The solution is to run export MATLAB_JAVA=/usr/lib/jvm/java-6-sun/jre/ before running Matlab. A permanent solution is to add that line to /etc/profile.

See MatlabCentral for more details.

This entry was posted on Tuesday, November 25th, 2008 at 04:57:43 Europe/London and is filed under Misc. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a reply