MATLAB GUI JAVA Error (Matlab2018b, win10)

7 views (last 30 days)
Jan Backhaus
Jan Backhaus on 25 Jun 2019
Edited: Jan Backhaus on 14 Dec 2019
Error description
  • When moving the cursor in the MATLAB GUI over the error indicator (orange or red) at the right side of the editor I get a java error (see pic 1: java Error and exact error message below).
  • Also the help is not working properly when either pressing F1 or clicking on the question mark button in the upper right. The window opens but is empty and another java error is thrown (again a java.lang.NullPointerException).
  • This behavior of MATLAB started after I installed yED (https://www.yworks.com/products/yed) which comes with its own java version. It happend to me before in the past after installing java via java.com website. Unfortunately I have no clue how I solved the problem back then.
Further Info
Assumption
The problem seems to be linked to
  • java
  • the help function in MATLAB as the grey indicators showing where to find a marked variable in the code are working (see Picture 2)
Solutions (which did not work)
I have tried the following solutions
Outputs which might help you to understand my problem:
Picture 1: java Error
matlab_error.png
This is the exact error message:
Exception in thread "AWT-EventQueue-0": java.lang.NullPointerException
at com.mathworks.help.helpui.DocRoot.buildUrl(DocRoot.java:216)
at com.mathworks.help.helpui.DocRoot.buildDocPageUrl(DocRoot.java:44)
at com.mathworks.mlwidgets.help.CSHelpTopicMap.mapIdToUrl(CSHelpTopicMap.java:244)
at com.mathworks.mlwidgets.help.CSHelpTopicMap.mapID(CSHelpTopicMap.java:234)
at com.mathworks.mlwidgets.text.mcode.MatlabDocUtils.getMapID(MatlabDocUtils.java:88)
at com.mathworks.mlwidgets.text.mcode.MatlabDocUtils.idHasExtendedHelp(MatlabDocUtils.java:83)
at com.mathworks.mlwidgets.text.mcode.MatlabDocUtils.mlintTagHasExtendedHelp(MatlabDocUtils.java:99)
at com.mathworks.mlwidgets.text.mcode.MatlabDocUtils.access$200(MatlabDocUtils.java:16)
at com.mathworks.mlwidgets.text.mcode.MatlabDocUtils$CodeAnalyzerDocHelper.hasExtendedHelp(MatlabDocUtils.java:148)
at com.mathworks.widgets.text.mcode.analyzer.CodeAnalyzerMessageModel$CodeAnalyzerMessage.hasExtendedInformation(CodeAnalyzerMessageModel.java:177)
at com.mathworks.widgets.text.layer.EditorTip.makeButtonPanel(EditorTip.java:402)
at com.mathworks.widgets.text.layer.EditorTip.makeSingleMessageRow(EditorTip.java:377)
at com.mathworks.widgets.text.layer.EditorTip.addShortMessageComponentsToPanel(EditorTip.java:257)
at com.mathworks.widgets.text.layer.EditorTip.makeWholeTipComponent(EditorTip.java:244)
at com.mathworks.widgets.text.layer.EditorTip.makeWholeTipComponentWithoutExtendedMessage(EditorTip.java:213)
at com.mathworks.widgets.text.layer.EditorTip.setupBalloonTip(EditorTip.java:199)
at com.mathworks.widgets.text.layer.EditorTip.show(EditorTip.java:504)
at com.mathworks.widgets.text.STPMessagePanel$MessagePanelToolTipListener.movedInsideSource(STPMessagePanel.java:494)
at com.mathworks.widgets.tooltip.ToolTipAndComponentAWTListener.mouseMovedInsideSourceComponent(ToolTipAndComponentAWTListener.java:192)
at com.mathworks.widgets.tooltip.ToolTipAndComponentAWTListener.eventDispatched(ToolTipAndComponentAWTListener.java:154)
at java.awt.Toolkit$SelectiveAWTEventListener.eventDispatched(Unknown Source)
at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
at java.awt.Toolkit.notifyAWTEventListeners(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Picture 2:
matlab_error_2.png

Answers (1)

Jan
Jan on 25 Jun 2019
When uninstalling & re-installing Matlab does not help, the problem can be conserved in the preferences files. These are not replaced at a re-install. So try to recreate them: Stop Matlab and rename the preferences folder, see prefdir . Does it works afterwards? Then the installation of yED was most likely not the reason of the problem.
(Sorry for advertising my own thread, but you cannot mention too often, that backups are required for reliable work.)
  1 Comment
Jan Backhaus
Jan Backhaus on 25 Jun 2019
Edited: Jan Backhaus on 14 Dec 2019
Thank you for the asap answer.
Unfortunately renaming the folder did not work. The error is the same.
Additional Info
  • I still have an older MATLAB version (MATLAB 2017b) installed on my system. I just started it and there the error does not occur.
  • I renamed C:\Users\belmart\AppData\Roaming\MathWorks\MATLAB\R2018b
  • and then I tried it with the parent directory C:\Users\belmart\AppData\Roaming\MathWorks\MATLAB
  • Renameing and then unistalling & re-installing does not solve the problem.
(UPDATE, 17h after I wrote the text above)
After having performed the steps above and waiting roughly 17h the bug is gone. This is a very strange behavior. I would love to understand what MATLAB is doing here. Any ideas?
(UPDATE, roughly 90 days after I wrote the text above)
After over a month without any problems the bug reappears. The things which changed shortly before the bug reappeared:
  1. WIN10 auto-update to version 1903 (Build 18362.267).
  2. Installed several games via Steam. At least one of the is using Java.
Additional Info
  • Again MATLAB 2017b is not affected by the bug.
Any ideas what is going on?
(UPDATE, 14.12.2019)
I found this article which seems to explain the issue.
In short:
It seems to be a bug of MATLAB 2018b which appears in some cases if you have the Parallel Toolbox installed. Acc. to the author the reason is a licencing problem. He recommends
  1. Do not hide the Toolstrip, or
  2. Make sure a valid Parallel Computing Toolbox license is installed if you also really want to work with this toolbox, or
  3. Uninstall Parallel Computing Toolbox if you do not want to work with it anyway.
As I am using the Parallel Computing Toolbeox the only solution for me seems to be to be
4. upgrade to MATLAB 2019a.

Sign in to comment.

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!