java.lang.NullPointerException macOS Sierra R2016a
古いコメントを表示
Anyone know how to fix this issue?
-Thomas
6 件のコメント
Walter Roberson
2017 年 1 月 22 日
Please post the first few lines of the crash report; the traceback will help us isolate the cause.
Note that R2016a is not officially supported on Sierra; https://www.mathworks.com/matlabcentral/answers/308320-is-matlab-compatible-with-macos-sierra
Nikunj Kothari
2017 年 1 月 25 日
The above error can be generated upon start up is related to "accessibility", also known as Universal Access ( this is under Apple menu > System preferences > Universal Access). Such errors are getting generated with third-party applications like "bettertouchtool, bettersnaptool , cinch" installed on the system.
If the system has the above mentioned or any other third party extensions that require "Universal Access" to be enabled, then uninstall them, restart the system and then open MATLAB to see if the issue has been resolved.
Here is a list of some of the third-party Accessibility software that results in java errors in MATLAB:
- Bettertouchtool
- Bettersnaptool
- Cinch
- Moom
- PopClip
- Window Magnet or Magnet
Also, it would be a good idea to update to MATLAB R2016b as previous versions of MATLAB are not fully compatible with macOS Sierra.
Dom
2017 年 3 月 30 日
To confirm the solution posted by Nikunj Kothari. I am using R2017a on OSX Sierra 10.12.2 and had the same problem.
The Universal Access menu is no longer available so it is: System Preferences > Security and Privacy > Privacy > unlock
And then uncheck the offending app.
In my case it was an app I recently downloaded called Magnet.
Other apps on the list such as Dropbox and Snagit don't appear to conflict.
Marc Haldenwang
2018 年 2 月 14 日
Thanks for the solution, in my case it was the same App "Magnet" and it took me really long to figure out what the problem was. Until I had the brilliant idea to google it ;)
Justin Chu
2018 年 3 月 1 日
In my case, quitting Magnet will resolve the issue so that you don't have to uninstall it.
David Nerger
2020 年 7 月 9 日
Settings - Safety - Privacy - full harddrive access - tick matlab, that did it for me.
回答 (2 件)
Shengjie Xu
2018 年 8 月 1 日
6 投票
It is the same app Magnet for me too... In the menu of Magnet, there is an option to ignore certain applications and ignoring MATLAB make the issue disappear. I'd like to know why the two apps conflict though just out of curiosity.
6 件のコメント
Carlos Alberto Rodriguez
2019 年 7 月 18 日
This work for me !!! Thank's
Thao Do
2019 年 7 月 28 日
Also work for me too. Thanks
Rui Xue
2020 年 4 月 3 日
Works for me, thanks. Don't know how Magnet piss MATLAB off
Jiri Lahoda
2020 年 4 月 5 日
Thank tou very much! It heals my nerves.
Yu Wang
2020 年 4 月 30 日
Works for me too! It's amazing how people figure out these things.
Ann Cui
2020 年 9 月 30 日
It works like a charm! Thanks for the solution!
LiTuX Sol
2019 年 7 月 27 日
0 投票
The exact same issue still exist on R2019a, High Sierra. If so many tools can be 'conflict' with MATLAB, I think it should be an issue of MATLAB itself, not other apps.
Currently I use the method given by @Shengjie Xu to bypass the issue. But you know, the issue is still there! Unless mathworks fix it.
Here is how I can reproduce the issue 100% of the time, hope to be useful:
- Install Magnet and enable it in Universal Access
- Open MATLAB
- Click on the triangle of Help, where a popup menu should come out (but not immediately this time);
- Click the triangle again (before popup menu shows), the cursor should change to busy;
- After the cursor back to arrow, click the triangle again, the popup menu is now shown;
- Click any items (e.g., about);
- You'll see the java exception text (mainly in red, the 'n' on the first line is in black) in the console window:

カテゴリ
ヘルプ センター および File Exchange で Standalone Applications についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!