You are not logged in.

#1 2016-03-06 03:41:45

kenotic
Member
Registered: 2016-03-06
Posts: 5

MATLAB R2016a crashes on startup

Hey all,

So MATLAB R2016a crashes within 5 or so seconds of starting up with a segmentation violation. ncurses5-compat-libs is installed to my knowledge (version 6.0.2).

If it helps, the stack trace is always from /usr/lib/libGLX_nvidia.so.[numbers]. Maybe my issue from somewhere external to MATLAB?

Any help would be appreciated.

Offline

#2 2016-03-06 12:41:53

Starfish
Member
From: Germany
Registered: 2015-10-21
Posts: 130

Re: MATLAB R2016a crashes on startup

Hi kenotic,

"so" stands for shared object, hence a library that is dynamically linked during runtime. It appears that there is an incompatibility between the latest Matlab version and an older library on your system Matlab depends on.
These are the things I would try do:

1.) Do a full system update if you have not yet done so
2.) Downgrade Matlab to an older version
3.) Try other nvidia drivers (https://wiki.archlinux.org/index.php/NVIDIA)
4.) Use the free Matlab-clone octave (https://wiki.archlinux.org/index.php/Octave)


"Yesterday is history, tomorrow is a mystery, but today is a gift. That is why it is called the present." - Master Oogway

Offline

#3 2016-03-06 15:11:38

TheChickenMan
Member
From: United States
Registered: 2015-07-25
Posts: 346

Re: MATLAB R2016a crashes on startup

Or remove the Nvidia driver and try running Matlab with nouveau.


If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet.
Niels Bohr

Offline

#4 2016-03-07 09:50:28

kenotic
Member
Registered: 2016-03-06
Posts: 5

Re: MATLAB R2016a crashes on startup

Thanks guys, using R2015b instead seems to work. Not sure if R2016a is incompatible in general or if it's just my setup; it seems the newest version's only been out for less than a week.

Last edited by kenotic (2016-03-07 09:54:50)

Offline

#5 2016-03-14 16:15:02

jacopo123
Member
Registered: 2015-09-18
Posts: 6

Re: MATLAB R2016a crashes on startup

Hi all,

I have the same issue.

It seems to be a problem between MATLAB 2016a and NVIDIA cards. MATLAB 2016a works fine on a another Arch computer with an Intel card. MathsWorks wasn't able to help. I have found no solution other than using an older MATLAB version.

Offline

#6 2016-03-14 20:36:35

lonaowna
Member
Registered: 2013-03-25
Posts: 28

Re: MATLAB R2016a crashes on startup

Same problem here.. Also using R2015b in the meantime. Hopefully MathWorks will be able to provide a fix!

Offline

#7 2016-03-16 08:35:34

rhinospike
Member
Registered: 2016-03-16
Posts: 1

Re: MATLAB R2016a crashes on startup

Switching to software OpenGL worked for me as a temporary fix.

At the matlab prompt (which still worked for me behind the error message):

opengl('save','software')

Obviously not ideal though.

Offline

#8 2016-03-16 14:12:34

rubenvb
Member
Registered: 2011-01-14
Posts: 84

Re: MATLAB R2016a crashes on startup

What helped me solve Matlab issues before is deletingrenaming its copies of libgcc and libstdc++. Graphics drivers use these (often through LLVM) and having the older Matlab version loaded does not help loading the driver which is linked to a newer version.

Basically, it comes down to this bit on the Arch Wiki:
https://wiki.archlinux.org/index.php/ma … g_graphics

Note I have always deleted the Matlab versions of the libraries, which lets the system version do its thing, as the runtime libraries are/should be backwards compatible.

Offline

#9 2016-03-16 18:07:39

jacopo123
Member
Registered: 2015-09-18
Posts: 6

Re: MATLAB R2016a crashes on startup

Is that working for anybody?

I tried various combinations by relinking the usual suspect libraries (libgfortran, libquadmat, libstdc++, libGL, libGLU), and also using different JRE versions. Unfortunately no breakthrough for me.

Offline

#10 2016-03-22 06:52:37

widdma
Member
Registered: 2016-03-21
Posts: 4

Re: MATLAB R2016a crashes on startup

I've got the same issue. Switching to the Nouveau driver allows me to use hardware rendering, but it's not ideal. Has anyone had any more contact with Mathworks?

Offline

#11 2016-03-22 11:02:20

jacopo123
Member
Registered: 2015-09-18
Posts: 6

Re: MATLAB R2016a crashes on startup

I've contacted Mathworks, but they weren't very proactive. They stressed that they don't support Arch.

Perhaps this issue is related to this?
https://devtalk.nvidia.com/default/topi … r-package/
https://bugs.archlinux.org/task/48109

Offline

#12 2016-03-26 02:17:14

widdma
Member
Registered: 2016-03-21
Posts: 4

Re: MATLAB R2016a crashes on startup

I think you're onto it there. I tried setting

__GLVND_DISALLOW_PATCHING=1

which fixes some steam games, but had no luck with MATLAB.

I've also tried the beta drivers (364.67). There's still a problem with those, but it appears to be different. This person on the Nvidia forums seems to have the same problem: https://devtalk.nvidia.com/default/topi … /?offset=2

For now, I'm using the 352 series from AUR https://aur.archlinux.org/packages/nvidia-352/. This works well with my card, and Matlab seems happy.

Hopefully GLVND will settle down soon and I can move back to the 360 series.

Offline

#13 2016-04-18 21:08:45

ataideneto
Member
Registered: 2016-04-18
Posts: 1

Re: MATLAB R2016a crashes on startup

The problem is with the "libstdc++.so.6" from MATLAB installation folder.

In order to solve this problem I've linked that library with the one in "/usr/lib" directory

1) make a back up just in case
sudo mv /YOUR-MATLAB-INSTALLATION-DIRECTORY/sys/os/glnxa64/libstdc++.so.6    /YOUR-MATLAB-INSTALLATION-DIRECTORY/sys/os/glnxa64/libstdc++.so.6.old

2) create symbolic link
sudo ln -s /usr/lib/libstdc++.so.6    /YOUR-MATLAB-INSTALLATION-DIRECTORY/sys/os/glnxa64/libstdc++.so.6

PS: In my case /YOUR-MATLAB-INSTALLATION-DIRECTORY is the default instalation folder -> /usr/local/MATLAB/R2016a

Good luck!

Offline

#14 2016-04-19 11:17:11

jacopo123
Member
Registered: 2015-09-18
Posts: 6

Re: MATLAB R2016a crashes on startup

That doesn't work for me. I still get the same opengl error.

I still believe it's an nvidia issue with matlab 2016a. Apparently it's still not solved with nvidia 364.16-3. Older matlab versions work just fine.

Offline

#15 2016-04-20 05:39:43

widdma
Member
Registered: 2016-03-21
Posts: 4

Re: MATLAB R2016a crashes on startup

ataideneto: Did you get 2016a working with hardware acceleration using this fix? To check if you're using hardware, in Matlab,  run

opengl info

What driver and card are you running? If you're not sure, use

nvidia-smi

I seem to recall I had to use the system libstdc++.so.6 just to get matlab to open. I'm fairly confident the OpenGL bug is driver related.

FYI, there seems to be a bit of action on the nvidia forum in the post I mentioned earlier: https://devtalk.nvidia.com/default/topi … /?offset=2

For now, running 352.79 is working well for me.

Offline

#16 2016-04-26 10:44:59

bouloumag
Member
Registered: 2009-12-24
Posts: 8

Re: MATLAB R2016a crashes on startup

I can start matlab 2016a with the following command

# LD_PRELOAD=/usr/lib/nvidia/libGL.so MATLAB_JAVA=/usr/lib/jvm/java-8-openjdk/jre /opt/MATLAB/R2016a/bin/matlab

then, in matlab enter the command

opengl('save','hardware')

and restart matlab.

Only remaining problem is this message at startup :

Warning: An error occurred while reading the desktop configuration file.
Using the default configuration.
The desktop configuration was not saved successfully

Offline

#17 2016-04-26 10:52:13

runical
Member
From: The Netherlands
Registered: 2012-03-03
Posts: 871

Re: MATLAB R2016a crashes on startup

The warning is because you use the wrong Java. If you were to use openjdk 7, the message disappears.

Offline

#18 2016-04-26 12:11:12

bouloumag
Member
Registered: 2009-12-24
Posts: 8

Re: MATLAB R2016a crashes on startup

With the default java from matlab and archlinux openjdk 7  I have invisible text in the UI. Exporting  J2D_D3D=false as suggested in the wiki does not work for me.
With openjdk 8 the text appear correctly, but I have the message about desktop configuration.

Offline

#19 2016-04-26 13:46:27

runical
Member
From: The Netherlands
Registered: 2012-03-03
Posts: 871

Re: MATLAB R2016a crashes on startup

Ah ok. I have it running without any troubles at the moment (although it uses mesa in an intel/nividia optimus setup). The last issue with redering appeared out of the blue and was fixed out of the blue as well. I tried replacing java with java 8 to fix it, but while it did improve rendering, it screwed up the layout and it had some trouble with some deprecated features.

It the worst case, you can always run it in the terminal. Lacks some features, but you'll always be able to do you calculations.

Offline

#20 2016-04-27 16:47:29

stephane
Forum Fellow
Registered: 2009-10-18
Posts: 25

Re: MATLAB R2016a crashes on startup

Using the system anti-aliased fonts fixed the rendering issue for me. You can find a description in the Arch Wiki: https://wiki.archlinux.org/index.php/ja … and_tricks         

LD_PRELOAD=/usr/lib/nvidia/libGL.so MATLAB_JAVA=/usr/lib/jvm/java-7-openjdk/jre _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true'  /path/to/matlab

Offline

#21 2016-05-10 02:14:54

widdma
Member
Registered: 2016-03-21
Posts: 4

Re: MATLAB R2016a crashes on startup

bouloumag: I had no luck using LD_PRELOAD with driver 364.19 and am still getting a segfault in libGLX_nvidia.so. Did you do anything else? What driver are you using?

Offline

#22 2016-06-13 14:45:29

jacopo123
Member
Registered: 2015-09-18
Posts: 6

Re: MATLAB R2016a crashes on startup

This issue seems to be solved for me with nvidia 367.18-1. See also the changelog at http://www.nvidia.com/download/driverRe … 2879/en-us
Matlab 2016 now runs smoothly.

Offline

#23 2016-06-13 16:05:40

uli
Member
Registered: 2016-06-13
Posts: 1

Re: MATLAB R2016a crashes on startup

Hi all,
I can confirm with nvidia 367.18-1, both R2016a and R2016b prerelease 9.1.0.390522 are running just fine. :-)
Cheers, Uli

Offline

Board footer

Powered by FluxBB