You are not logged in.

#1 2008-08-03 09:18:24

radumash
Member
From: Bucharest & Brasov / Romania
Registered: 2007-02-25
Posts: 26

Matlab in Awesome

Hello, I hope I'm posting in the right section of the forum.
I have recently installed awesome window manager, using the 2.3 package in the community repo.
As far as I can tell, it's working great. The only problem I'm having with it so far si that Matlab doesn't
appear correctly. Let me explain.

I'm using Matlab 2008a and I'm running it with the following command "matlab -desktop", as I am running it
using awesome's launcher (Mod4-F2). It's the only window on the workspace and I have tried different layouts, I have also tried running it from a terminal. Here is the output:

Locking assertion failure.  Backtrace:
#0 /usr/lib/libxcb-xlib.so.0 [0xb548f767]
#1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_unlock+0x31) [0xb548f8b1]
#2 /usr/lib/libX11.so.6(_XReply+0x244) [0xb57579e4]
#3 /opt/Matlab/sys/java/jre/glnx86/jre1.6.0/lib/i386/xawt/libmawt.so [0xae88a2be]
#4 /opt/Matlab/sys/java/jre/glnx86/jre1.6.0/lib/i386/xawt/libmawt.so [0xae868ed7]
#5 /opt/Matlab/sys/java/jre/glnx86/jre1.6.0/lib/i386/xawt/libmawt.so [0xae869188]
#6 /opt/Matlab/sys/java/jre/glnx86/jre1.6.0/lib/i386/xawt/libmawt.so(Java_sun_awt_X11GraphicsEnvironment_initDisplay+0x2f) [0xae86948f]
#7 [0xafa6c68e]
#8 [0xafa64e9d]
#9 [0xafa64e9d]
#10 [0xafa62207]
#11 /opt/Matlab/sys/java/jre/glnx86/jre1.6.0/lib/i386/client/libjvm.so [0x6209a4d]
#12 /opt/Matlab/sys/java/jre/glnx86/jre1.6.0/lib/i386/client/libjvm.so [0x6305bc8]
#13 /opt/Matlab/sys/java/jre/glnx86/jre1.6.0/lib/i386/client/libjvm.so [0x62098e0]
#14 /opt/Matlab/sys/java/jre/glnx86/jre1.6.0/lib/i386/client/libjvm.so(JVM_DoPrivileged+0x34b) [0x625f77b]
#15 /opt/Matlab/sys/java/jre/glnx86/jre1.6.0/lib/i386/libjava.so(Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2+0x3d) [0xb1b3196d]
#16 [0xafa6c68e]
#17 [0xafa64d37]
#18 [0xafa62207]
#19 /opt/Matlab/sys/java/jre/glnx86/jre1.6.0/lib/i386/client/libjvm.so [0x6209a4d]
Locking assertion failure.  Backtrace:

The problem is that the Matlab window is created correctly, but it is empty, with the exception of the "Start" button in the lower left corner. The matlab workspace isn't visible, or the menus and toolbar.

As far as I know, Matlab uses a Java GUI (AWT ?), so are there any issues with Java GUI apps in awesome? What other application should I try to find out if it's a Java issue or a Matlab one.

Also, Matlab works perfectly in Openbox.

That's pretty much all I got. Any help is appreciated.

Radu

Last edited by radumash (2008-08-03 09:24:50)

Offline

#2 2008-08-03 11:59:28

ghostHack
Member
From: Bristol UK
Registered: 2008-02-29
Posts: 261

Re: Matlab in Awesome

Sounds like you could be getting this problem

awesome wiki wrote:

GUI Java apps appear as a gray screen!

man awesome:

Java applications which use the XToolkit/XAWT backend may draw grey windows only. The XToolkit/XAWT backend breaks ICCCM-compliance in recent JDK 1.5 and early JDK 1.6 versions, because it assumes a reparenting window manager. As a workaround you can use JDK 1.4 (which doesn´t contain the XToolkit/XAWT backend) or you can set the following environment variable (to use the older Motif backend instead): AWT_TOOLKIT=MToolkit

http://awesome.naquadah.org/wiki/index.php?title=FAQ

Offline

#3 2008-08-03 14:18:58

radumash
Member
From: Bucharest & Brasov / Romania
Registered: 2007-02-25
Posts: 26

Re: Matlab in Awesome

Thanks.
I'm going to try the Motif workaround.

Offline

#4 2008-08-13 04:52:28

SyXbiT
Member
From: Seattle, WA
Registered: 2008-06-28
Posts: 177
Website

Re: Matlab in Awesome

I just installed matlab 2008a (x86), and on first run i get this error

Locking assertion failure.  Backtrace:
#0 /usr/lib/libxcb-xlib.so.0 [0x7c336767]
#1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_unlock+0x31) [0x7c3368b1]
#2 /usr/lib/libX11.so.6(_XReply+0x244) [0x7c37c9e4]
#3 /usr/local/matlab76/sys/java/jre/glnx86/jre1.6.0/lib/i386/xawt/libmawt.so [0x7c48a2be]
#4 /usr/local/matlab76/sys/java/jre/glnx86/jre1.6.0/lib/i386/xawt/libmawt.so [0x7c468ed7]
#5 /usr/local/matlab76/sys/java/jre/glnx86/jre1.6.0/lib/i386/xawt/libmawt.so [0x7c469188]
#6 /usr/local/matlab76/sys/java/jre/glnx86/jre1.6.0/lib/i386/xawt/libmawt.so(Java_sun_awt_X11GraphicsEnvironment_initDisplay+0x2f) [0x7c46948f]
#7 [0xb4d3ab5b]
#8 [0xb4d32ecd]
#9 [0xb4d32ecd]
#10 [0xb4d30207]
#11 /usr/local/matlab76/sys/java/jre/glnx86/jre1.6.0/lib/i386/server/libjvm.so [0x62b55ed]
#12 /usr/local/matlab76/sys/java/jre/glnx86/jre1.6.0/lib/i386/server/libjvm.so [0x643dd98]
#13 /usr/local/matlab76/sys/java/jre/glnx86/jre1.6.0/lib/i386/server/libjvm.so [0x62b5480]
#14 /usr/local/matlab76/sys/java/jre/glnx86/jre1.6.0/lib/i386/server/libjvm.so(JVM_DoPrivileged+0x34b) [0x630b31b]
#15 /usr/local/matlab76/sys/java/jre/glnx86/jre1.6.0/lib/i386/libjava.so(Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2+0x3d) [0xb7d3a96d]
#16 [0xb4d3ab5b]
#17 [0xb4d32d67]
#18 [0xb4d30207]
#19 /usr/local/matlab76/sys/java/jre/glnx86/jre1.6.0/lib/i386/server/libjvm.so [0x62b55ed]
Locking assertion failure.  Backtrace:
#0 /usr/lib/libxcb-xlib.so.0 [0x7c336767]
#1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_lock+0x2e) [0x7c33681e]
#2 /usr/lib/libX11.so.6 [0x7c37bba9]
#3 /usr/lib/libX11.so.6(XGetVisualInfo+0x26) [0x7c371fe6]
#4 /usr/local/matlab76/sys/java/jre/glnx86/jre1.6.0/lib/i386/xawt/libmawt.so [0x7c468189]
#5 /usr/local/matlab76/sys/java/jre/glnx86/jre1.6.0/lib/i386/xawt/libmawt.so [0x7c4683d5]
#6 /usr/local/matlab76/sys/java/jre/glnx86/jre1.6.0/lib/i386/xawt/libmawt.so [0x7c469239]
#7 /usr/local/matlab76/sys/java/jre/glnx86/jre1.6.0/lib/i386/xawt/libmawt.so(Java_sun_awt_X11GraphicsEnvironment_initDisplay+0x2f) [0x7c46948f]
#8 [0xb4d3ab5b]
#9 [0xb4d32ecd]
#10 [0xb4d32ecd]
#11 [0xb4d30207]
#12 /usr/local/matlab76/sys/java/jre/glnx86/jre1.6.0/lib/i386/server/libjvm.so [0x62b55ed]
#13 /usr/local/matlab76/sys/java/jre/glnx86/jre1.6.0/lib/i386/server/libjvm.so [0x643dd98]
#14 /usr/local/matlab76/sys/java/jre/glnx86/jre1.6.0/lib/i386/server/libjvm.so [0x62b5480]
#15 /usr/local/matlab76/sys/java/jre/glnx86/jre1.6.0/lib/i386/server/libjvm.so(JVM_DoPrivileged+0x34b) [0x630b31b]
#16 /usr/local/matlab76/sys/java/jre/glnx86/jre1.6.0/lib/i386/libjava.so(Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2+0x3d) [0xb7d3a96d]
#17 [0xb4d3ab5b]
#18 [0xb4d32d67]
#19 [0xb4d30207]
Gtk-Message: Failed to load module "gnomebreakpad": /usr/local/matlab76/sys/os/glnx86/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /usr/lib/bug-buddy/libbreakpad.so.0)

any ideas?

Last edited by SyXbiT (2008-08-14 03:12:21)

Offline

#5 2008-08-13 11:09:29

SiC
Member
From: Liverpool, England
Registered: 2008-01-10
Posts: 430

Re: Matlab in Awesome

Not seen that error myself, which version of matlab have you installed x86_64 or i686 ?

Offline

#6 2008-08-13 12:51:34

Berticus
Member
Registered: 2008-06-11
Posts: 731

Re: Matlab in Awesome

Do you have gnomebreakpad installed in that particular location that it's finding?

While we're talking about mathematics programs, I think you should check out Sage. It's an open source alternative to Matlab, Mathematica, Magma, Maple, et cetera. It also doesn't use an arbitrary language since it's python-based. I've heard it actually lives up to what it says it does.

If you're installing Matlab for a class, I'd still suggest checking out Sage. I had Matlab once (probably will need it again for a class), and I hate how large the install is. I seem to remember it taking more than half a Gig or something like that.

---Edit---
Having a quick look online I saw that gnomebreakpad is indeed the issue (for a lot of other java-based programs) and there doesn't seem to be a solution. I would personally try to install gnomebreakpad, find the module it's looking for and then link the module there.

Last edited by Berticus (2008-08-13 12:59:05)

Offline

#7 2008-08-13 18:50:54

SiC
Member
From: Liverpool, England
Registered: 2008-01-10
Posts: 430

Re: Matlab in Awesome

I don't really have much of a choice when it comes to using Matlab, I'm doing research into Neural Networks, and the toolkit that is included is invaluable.  I could work around it, but to be honest, I like Matlab. It works, and it works well. Although the Java GUI is a bit of a bugger and isn't particularly quick.  Plus for some reason Matlab won't launch from the K menu, it needs to be run from a terminal hmm I do also use Mathematica for a lot, but then seeing as I am provided with the software by the University, it's not a big deal for me.

Offline

#8 2008-08-14 03:03:35

SyXbiT
Member
From: Seattle, WA
Registered: 2008-06-28
Posts: 177
Website

Re: Matlab in Awesome

I'm using i686. haven't have much time to figure out a fix yet.
i used matlab 2007b, and had that working perfectly in debian. I as able to run it from the gnome menu with this command. "/locationOfMatlab/bin/matlab -desktop" try that

as for my gnomebreakpad issue, I'm not sure. a locate yields this:

syxbit@SyXbiT-D:~$ locate gnomebreakpad
/usr/lib/gtk-2.0/modules/libgnomebreakpad.so

and

syxbit@SyXbiT-D:~$ locate libbreakpad
/usr/lib/bug-buddy/libbreakpad.a
/usr/lib/bug-buddy/libbreakpad.so
/usr/lib/bug-buddy/libbreakpad.so.0
/usr/lib/bug-buddy/libbreakpad.so.0.0.0

I too would rather switch to something open source, but I'm taking a probability class (last EE course!) and doubt think it would go over too well

also, i notice a log file (which implies it's java's fault)
giving this:

(Aug 13, 2008 21:16:19)MATHWORKS ACTIVATION IS STARTING UP.
(Aug 13, 2008 21:16:41)/usr/local/matlab76/licenses/license_SyXbiT-D_161051_R2008a.lic (Permission denied)
java.io.FileOutputStream.open(Native Method)
java.io.FileOutputStream.<init>(Unknown Source)
com.mathworks.instwiz.LicenseUtility.writeLicenseFile(LicenseUtility.java:278)
com.mathworks.instwiz.LicenseUtility.installLicense(LicenseUtility.java:244)
com.mathworks.activationclient.model.ActivationModelImpl.installLicense(ActivationModelImpl.java:125)
com.mathworks.activationclient.command.InstallLicenseCommand.execute(InstallLicenseCommand.java:20)
com.mathworks.activationclient.command.ActivateCommand.execute(ActivateCommand.java:20)
com.mathworks.activationclient.controller.BasePanelController.nextButton(BasePanelController.java:69)
com.mathworks.activationclient.view.options.ActivationOptionsPanelImpl$2.actionPerformed(ActivationOptionsPanelImpl.java:51)
javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
javax.swing.DefaultButtonModel.setPressed(Unknown Source)
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
java.awt.Component.processMouseEvent(Unknown Source)
javax.swing.JComponent.processMouseEvent(Unknown Source)
java.awt.Component.processEvent(Unknown Source)
java.awt.Container.processEvent(Unknown Source)
java.awt.Component.dispatchEventImpl(Unknown Source)
java.awt.Container.dispatchEventImpl(Unknown Source)
java.awt.Component.dispatchEvent(Unknown Source)
java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
java.awt.Container.dispatchEventImpl(Unknown Source)
java.awt.Window.dispatchEventImpl(Unknown Source)
java.awt.Component.dispatchEvent(Unknown Source)
java.awt.EventQueue.dispatchEvent(Unknown Source)
java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
java.awt.EventDispatchThread.pumpEvents(Unknown Source)
java.awt.EventDispatchThread.pumpEvents(Unknown Source)
java.awt.EventDispatchThread.run(Unknown Source)

(Aug 13, 2008 21:17:17)MATHWORKS ACTIVATION IS STARTING UP.
(Aug 13, 2008 21:17:37)/usr/local/matlab76/licenses/license_SyXbiT-D_161051_R2008a.lic (Permission denied)
java.io.FileOutputStream.open(Native Method)
java.io.FileOutputStream.<init>(Unknown Source)
com.mathworks.instwiz.LicenseUtility.writeLicenseFile(LicenseUtility.java:278)
com.mathworks.instwiz.LicenseUtility.installLicense(LicenseUtility.java:244)
com.mathworks.activationclient.model.ActivationModelImpl.installLicense(ActivationModelImpl.java:125)
com.mathworks.activationclient.command.InstallLicenseCommand.execute(InstallLicenseCommand.java:20)
com.mathworks.activationclient.command.ActivateCommand.execute(ActivateCommand.java:20)
com.mathworks.activationclient.controller.BasePanelController.nextButton(BasePanelController.java:69)
com.mathworks.activationclient.view.options.ActivationOptionsPanelImpl$2.actionPerformed(ActivationOptionsPanelImpl.java:51)
javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
javax.swing.DefaultButtonModel.setPressed(Unknown Source)
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
java.awt.Component.processMouseEvent(Unknown Source)
javax.swing.JComponent.processMouseEvent(Unknown Source)
java.awt.Component.processEvent(Unknown Source)
java.awt.Container.processEvent(Unknown Source)
java.awt.Component.dispatchEventImpl(Unknown Source)
java.awt.Container.dispatchEventImpl(Unknown Source)
java.awt.Component.dispatchEvent(Unknown Source)
java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
java.awt.Container.dispatchEventImpl(Unknown Source)
java.awt.Window.dispatchEventImpl(Unknown Source)
java.awt.Component.dispatchEvent(Unknown Source)
java.awt.EventQueue.dispatchEvent(Unknown Source)
java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
java.awt.EventDispatchThread.pumpEvents(Unknown Source)
java.awt.EventDispatchThread.pumpEvents(Unknown Source)
java.awt.EventDispatchThread.run(Unknown Source)

any ideas?

P.S. i tried installing this on Hardy Heron x86, and it worked perfectly and smoothly. so it's unlikely a GNOME issue. It's java. Likely cause stuff is in a different place here sad sad sad The older I get the less I like having to fiddle to get something (that should just work) working smile

Last edited by SyXbiT (2008-08-14 03:50:58)

Offline

#9 2008-09-07 04:42:56

SyXbiT
Member
From: Seattle, WA
Registered: 2008-06-28
Posts: 177
Website

Re: Matlab in Awesome

any ideas what could make this work in Ubuntu but not in Arch?
i've tried with both 'jre' and 'openjdk'

Offline

#10 2008-09-07 07:58:10

kett
Member
Registered: 2008-04-21
Posts: 104

Re: Matlab in Awesome

I think I figured out a fix for 2008a, which may work for older versions as well.  The trouble is that matlab uses it's own java files, so simplying installing new different java's won't help.  From what I gathered, java 1.7 has a fix for this issue.  Basically the solution is to create a symbolic link from matlab's java directory to the Java1.7. 

I downloaded the Java1.7 binaries from http://download.java.net/jdk7/binaries/. In my case, I downloaded the x86_64 JDK self-extracting bin.  From there, these are the steps I took.  You are going to need root permissions for some of these commands. 

chmod +x jdk-7-ea-bin-b34-linux-x64-28_aug_2008.bin
./jdk-7-ea-bin-b34-linux-x64-28_aug_2008.bin  
mv jdk1.7.0/ /opt
cd /path/to/matlab/sys/java/jre/glnxa64

In the last line, make sure to change /path/to/matlab to wherever you installed it. Also, if you are on 32-bit arch, the glnxa64 directory in the last line will be named something else, but there should be only one directory there.

mv jre1.6.0 jre1.6.0-backup

This backups the matlab's jre.  You could save some diskspace space by deleting it, since it won't be used, but I prefer to back things up.

ln -s /opt/jdk1.7.0/jre jre1.6.0

Now, fire up matlab and it should work.  I haven't done any sort of testing to see how functional it is, but the interface shows up and a few of the buttons work.

Offline

#11 2008-09-10 14:26:49

SyXbiT
Member
From: Seattle, WA
Registered: 2008-06-28
Posts: 177
Website

Re: Matlab in Awesome

you're a genius.
it worked!
thanks a bunch.

it doesn't make much sense though. if the problem is the java that matlab has included, the it shouldn't work on any linux system, right?
(i had it working just fine in Ubuntu 8.04)

i'm really happy now though smile. hopefully there will be no more issues in the soon to be released 2008b smile

Last edited by SyXbiT (2008-09-10 21:13:22)

Offline

#12 2008-10-20 20:52:41

burningbunny
Member
Registered: 2008-10-16
Posts: 2

Re: Matlab in Awesome

This doesn't seem to work for 2007a (which uses jre1.5.0) - any more ideas except for upgrading matlab? I've tried using AWT_TOOLKIT=MToolkit, which didn't work, and j2sdk 1.4, which doesn't have amd64 libs. Now I'm out of ideas...

Offline

#13 2008-10-20 23:56:50

zhuqin
Member
Registered: 2008-01-31
Posts: 61

Re: Matlab in Awesome

There's no need to do any dirty hack to matlab, just put

export MATLAB_JAVA=/path/to/jre

in your ~/.profile or ~/.bashrc.
And jdk7 snapshot is a very nice replacement for jre6.

Offline

#14 2008-10-21 08:27:20

burningbunny
Member
Registered: 2008-10-16
Posts: 2

Re: Matlab in Awesome

Nope, no luck. I can see the embedded windows (command window, history, ...) but everything else is transparent or gray (same as before).
Matlab -n correctly reports that "MATLAB_JAVA         = /opt/jdk1.7.0/jre/"

Offline

#15 2009-01-04 20:26:19

horsecool
Member
Registered: 2008-12-22
Posts: 55

Re: Matlab in Awesome

same here. It works in Gnome, but not in Awesome...

Offline

#16 2009-01-05 23:02:16

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Matlab in Awesome

Yes the symlink works for matlab and also other programs that use their own versions of java.
For matlab you can also edit the launch script and put the path to your system java too, I have done that before (I have seen that fix in the documentation). These days I just use the symlink trick though ... I don't fancy looking for the environment variable that will fix the problem, sometimes there isn't one.
Oh and I do use jre, everything else seems to break some of the java programs.

Last edited by R00KIE (2009-01-05 23:04:44)


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#17 2011-08-16 19:58:54

knuckles
Member
Registered: 2008-01-24
Posts: 13

Re: Matlab in Awesome

I am using Matlab R2011a in awesome. I get the grey screen. The links in this post do not lead to anywhere useful. Did anyone ever solve this issue?

Offline

#18 2011-08-16 20:21:42

ZekeSulastin
Member
Registered: 2010-09-20
Posts: 266

Offline

Board footer

Powered by FluxBB