MATLAB freezes at splash screen on Ubuntu

19 views (last 30 days)
I am trying to start MATLAB 2018a on an Ubuntu machine. However, the application freezes at startup when showing the splash screen. I have attached a log file which shows the Java stack trace, starting with:
java.lang.RuntimeException: cannot load system cursor: CopyDrop.32x32
What I've seen from similar questions posed on this board seem to indicate it's related to a bug in Java and the X window system. It is possible to run MATLAB without GUI though and on a separate Windows machine I tried it also went without a hitch. I have therefore tried various other configurations such as running under GNOME, KDE, XFCE and on a different distro (Fedora), and rolling back to 2017a and 2017b. I have also updated OpenJDK. All are giving the same results. I hope someone knows of a workaround or, even better, a full fix.
  2 Comments
Rolling Osure
Rolling Osure on 26 Sep 2018
Are you running Linux inside a virtual (cloud) environment? I have the same problem. Running on VirtualBox is fine but on an actual cloud environment with the same OS I get this error.
Stefan van der Linden
Stefan van der Linden on 26 Sep 2018
Edited: Stefan van der Linden on 26 Sep 2018
No, we are running this on 'normal' hardware. Interesting that it may work within Virtualbox. I'll give it a try, although this is not a workable solution for us at the moment.

Sign in to comment.

Accepted Answer

Rolling Osure
Rolling Osure on 27 Sep 2018
Here is my final solution which worked on Ubuntu 16.04:
1- Edit following file:
nano /etc/default/grub
2- Edit the variable GRUB_CMDLINE_LINUX_DEFAULT to only have the content "nomodeset"
3- Run on terminal: sudo grub-mkconfig -o /boot/grub/grub.cfg
4- Reboot.
Matlab should now be able to start without any problems.
My reference was https://codedump.io/share/UJieoRlppEoJ/1/cannot-load-system-cursor-copydrop32x32-exception-in-java-on-centos-7
  2 Comments
Stefan van der Linden
Stefan van der Linden on 9 Oct 2018
Hi Rolling, thank you for looking into the answer. This seems to work, although R2018B also seems to include a fixed Java runtime itself. All problems are fixed now anyway!
Veethahavya Kootanoor Sheshadrivasan
Hi Rolling.
I have applied your fix but the problem still persists for me.
Could you please help?
Also how do I generate a log file?
I tried to run matlab -desktop logfile test.log. But that did not create a log or I couldn't find it (although I performed a systemwide search).
Thanks in advance!

Sign in to comment.

More Answers (1)

Rolling Osure
Rolling Osure on 26 Sep 2018
Found out something interesting. Starting matlab over SSH with X forwarding is successful!
ssh -X matlabhost
./matlab

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Products


Release

R2018a

Community Treasure Hunt

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

Start Hunting!