8

I can't open Matlab 2013a after I upgrade Ubuntu 14.10 to 15.04. I have also tried to open from the location folder, and when I try to open it from the console using $

$ cd /usr/local/MATLAB/R2013a/bin/
$ ./matlab

I get the following message.

  • Did you click Details to see if it had more info about the problem Matlab encountered? Did you send the error report to MathWorks? – chaskes Apr 29 '15 at 02:38
  • Yes, I get Segmentation Violation Detected. – lmiguelvargasf Apr 29 '15 at 03:13
  • If there's more info in the details, please edit your question to include the full details. Please also be sure to report the error to MathWorks if you haven't already done so. – chaskes Apr 29 '15 at 03:50
  • So I ended up removing MATLAB 2013a, and I have installed MATLAB 2014b. I couldn't find a solution, and I need to have MATLAB for performing a simulation. – lmiguelvargasf Apr 30 '15 at 04:12
  • This is also the problem and removing the jayatana package the solution w.r.t. Matlab R2012b on Ubuntu 15.04. – Anne van Rossum Jul 23 '15 at 15:03

5 Answers5

13

I was having the same problem, I guess from the error messages that it was due to the the old libc libraries used by Matlab.

I installed the packages matlab-support and matlab-support-dev and things started to work.

One more thing: Chose to rename the old GCC libraries form MATLAB and use the new ones from Ubuntu when asked!!!

Jorge Castro
  • 71,754
Pedro
  • 131
11

According to the following line from your message, you have the jayatana package installed:

Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar

This package is responsible for application menu support for Java swing applications, and seems to be the cause for the segfault. Removing it worked for me:

sudo apt-get remove jayatana

Don't forget to restart your session afterwards as the package installs the JAVA_TOOL_OPTIONS environment variable. Or try it from a terminal window:

JAVA_TOOL_OPTIONS= /path/to/your/matlab
Seebicah
  • 126
0

One stackoverflow thread showed that segmentation violation error can be solved by changing the default renderer to zbuffer. Add this line to the startup.m file:

set(0, 'DefaultFigureRenderer', 'zbuffer');

Ron
  • 20,638
  • It does not work. I have gotten the following message: Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar
       Segmentation violation detected at Wed Apr 29 18:03:36 2015
    

    If this problem is reproducible, please submit a Service Request via: http://www.mathworks.com/support/contact_us/ Thank you for your help.** This crash report has been saved to disk as /home/m/matlab_crash_dump.9070-1 ** MATLAB is exiting because of fatal error Killed

    – lmiguelvargasf Apr 29 '15 at 23:04
  • I had to add that I have updated JDK 7 to 8, so because of my error is related with java, I wonder if this is the reason. – lmiguelvargasf Apr 30 '15 at 03:58
0

A simple solution is to unset the environment variable causing the problem before running Matlab. Seems to work so far without side effects:

$ unset JAVA_TOOL_OPTIONS
$ matlab
0

For me, graphics card(Nvidia) was a problem. Try switching to default graphics. Then reboot your system and run matlab.

  • Hi @SundeepJoshi you say: "Try switching to default graphics" - how? Maybe you should edit your answer to include instructions on how to switch to default graphics. – Tshilidzi Mudau Oct 25 '16 at 07:37