I have installed matlab-mode from the melpa repository. However when I do

M-x: matlab-shell [RET]

It gives me the following error.

objc[4164]: Class JavaLaunchHelper is implemented in both

/Applications/MATLAB_R2016b.app/sys/java/jre/maci64/jre/bin/java and /Applications/MATLAB_R2016b.app/sys/java/jre/maci64/jre/lib/jli/libjli.dylib. One of the two will be used. Which one is undefined

M-shell segmentation fault 11

Can anyone help me with this?.

  • If Emacs crashes there is a bug somewhere. Can you reproduce the problem starting with emacs -Q (no init file)? If not, recursively bisect your init file to find the cause/culprit. You can use comment-region to comment out (or uncomment, with C-u) selected text. If you can give a reproducible recipe starting from emacs -Q, please file a bug report: M-x report-emacs-bug. – Drew Nov 13 '16 at 19:22
  • Hi emacs doesn't crash, matlab does. I can run matlab in my terminal as usual but not in emacs. Not even using the terminal emulator inside emacs. – minibuffer Nov 13 '16 at 19:29
  • In that case, please edit your question (e.g. title) to make clear that it is not function matlab-shell (which is Emacs) that crashes. Also, what is M-shell? (The question is not yet clear to me, but hopefully it is clear to someone who is familiar with MatLab.) – Drew Nov 13 '16 at 19:59
  • I don't know what M -shell is. It is in the error thrown when it crashes. Apparently other people who use matlab-mode have run into this problem in MATLAB_R2016b. So it might be a bug in MATLAB. But then again I can run MATLAB from my terminal just fine. – minibuffer Nov 13 '16 at 22:07
  • OK, thanks. Hopefully someone else can shed some light on this and provide a useful answer for you. – Drew Nov 13 '16 at 23:08

Supposedly, this is a bug in MATLAB R2016b. A solution is to downgrade to R2016a!

I installed R2016b to find out that MATLAB crashes upon start up. What is strange however, is that I managed to run R2016b from Emacs once. My first thought was a bad configuration, but it kept crashing despite having cleared the config from ~/Library/Application\ Support/MathWorks/MATLAB/ (which is the new configuration path for R2016b).

It's difficult to point fingers from the stack trace (not knowing the source code), but around a "Run Path Dependent Initialization" is where mine crashes.

I have reported the segmentation fault to MathWorks (with a link to this question).

  • I reported the same to MATLAB many months ago. They either don't want or don't know how to fix it. The problem remains the same. So much for commercial software. – minibuffer Mar 6 '17 at 22:12
  • I just installed R2017a and the issue seems to be gone. – martinjlowm Mar 14 '17 at 13:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.