Matlab 2018b cannot plot on Ubuntu 18.04

At first start I got an error from ubuntu terminal
Gtk-Message: 11:48:40.996: Failed to load module "canberra-gtk-module"
Then I installed the package, the terminal error is gone. But in matlab command window, there are red letters like this:
com.jogamp.opengl.GLException: X11GLXDrawableFactory - Could not initialize shared resources for X11GraphicsDevice[type .x11, connection :0, unitID 0, handle 0x0, owner false, ResourceToolkitLock[obj 0x455753f2, isOwner false, <653fc108, 7569f1fc>[count 0, qsz 0, owner <NULL>]]]
at jogamp.opengl.x11.glx.X11GLXDrawableFactory$SharedResourceImplementation.createSharedResource(X11GLXDrawableFactory.java:326)
at jogamp.opengl.SharedResourceRunner.run(SharedResourceRunner.java:297)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:688)
at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:580)
at jogamp.opengl.x11.glx.X11GLXDrawableFactory$SharedResourceImplementation.createSharedResource(X11GLXDrawableFactory.java:297)
... 2 more
Exception in thread "Startup Class Loader" java.lang.InternalError: XXX0 profile[1]: GL3bc -> profileImpl GL4bc !!! not mapped
at com.jogamp.opengl.GLProfile.computeProfileMap(GLProfile.java:2047)
at com.jogamp.opengl.GLProfile.initProfilesForDeviceCritical(GLProfile.java:1917)
at com.jogamp.opengl.GLProfile.initProfilesForDevice(GLProfile.java:1866)
at com.jogamp.opengl.GLProfile.initProfilesForDefaultDevices(GLProfile.java:1835)
at com.jogamp.opengl.GLProfile.access$000(GLProfile.java:79)
at com.jogamp.opengl.GLProfile$1.run(GLProfile.java:229)
at java.security.AccessController.doPrivileged(Native Method)
at com.jogamp.opengl.GLProfile.initSingleton(GLProfile.java:215)
at com.mathworks.hg.peer.JavaSceneServerPeer.initializeJOGL(JavaSceneServerPeer.java:150)
at com.mathworks.hg.peer.JavaSceneServerPeer.<clinit>(JavaSceneServerPeer.java:120)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.mathworks.mde.desk.StartupClassLoader.loadClass(StartupClassLoader.java:241)
at com.mathworks.mde.desk.StartupClassLoader.access$800(StartupClassLoader.java:25)
at com.mathworks.mde.desk.StartupClassLoader$2.run(StartupClassLoader.java:228)
at java.lang.Thread.run(Thread.java:748)
I cannot plot when this happens.
Your help is appreciated!

1 件のコメント

Clemente Gotelli
Clemente Gotelli 2019 年 4 月 16 日
編集済み: Clemente Gotelli 2019 年 4 月 16 日
You should try this:
sudo apt install libcanberra-gtk-module
I had the same issue on R2018a and it worked!

サインインしてコメントする。

回答 (4 件)

Leo LEE
Leo LEE 2018 年 12 月 8 日

1 投票

Try
sudo apt install libcanberra-gtk0
https://github.com/MajeurAndroid/Adb-Remote-Screen/issues/14
Ulrich Herter
Ulrich Herter 2018 年 7 月 11 日

0 投票

I have the same issue... but with 2018a
Jafar Ting
Jafar Ting 2018 年 8 月 8 日

0 投票

Seems like the same question as 'https://ch.mathworks.com/matlabcentral/answers/377644-hardware-opengl-failure-on-ubuntu-16-04-3-can-not-initialize-shared-resources'
David MUNOZ
David MUNOZ 2018 年 10 月 5 日

0 投票

Same thing here.. I got "Caught unexpected fl::except::IInternalException" everytime is use plot

カテゴリ

ヘルプ センター および File ExchangeIntroduction to Installation and Licensing についてさらに検索

製品

質問済み:

2018 年 6 月 21 日

編集済み:

2019 年 4 月 16 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by