Java errors in Matlab 2018b on Windows 10
5 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I get the following error messages when running certain matlab scripts. In only seems to happen when running specific scripts, however if I use the debugger to try to pinpoint the exact line where it happens, the error is not reproducible: it doesn't always happen at the same line.
The error messages do not stop my scripts, however they make the command window unreadable due to the large number of errors.
Sometimes (usually after running Matlab for a while, or so it seems) I also get the same error message when scrolling down the command window with the mousewheel or using the scroll bar.
This happens on all versions of Matlab I tried (2017a to 2018b, Windows 10 64 bit).
Exception in thread "AWT-EventQueue-0": javax.swing.text.StateInvariantError: Can't render line: 1036
at javax.swing.text.PlainView.drawLine(Unknown Source)
at com.mathworks.mde.cmdwin.CmdWinSyntaxUI$SyntaxPlainView.drawLine(CmdWinSyntaxUI.java:539)
at javax.swing.text.PlainView.paint(Unknown Source)
at com.mathworks.mde.cmdwin.CmdWinSyntaxUI$SyntaxPlainView.paint(CmdWinSyntaxUI.java:325)
at javax.swing.plaf.basic.BasicTextUI$RootView.paint(Unknown Source)
at javax.swing.plaf.basic.BasicTextUI.paintSafely(Unknown Source)
at javax.swing.plaf.basic.BasicTextUI.paint(Unknown Source)
at javax.swing.plaf.basic.BasicTextUI.update(Unknown Source)
at javax.swing.JComponent.paintComponent(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JViewport.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintToOffscreen(Unknown Source)
at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)
at javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
at javax.swing.RepaintManager.paint(Unknown Source)
at javax.swing.JComponent._paintImmediately(Unknown Source)
at javax.swing.JComponent.paintImmediately(Unknown Source)
at javax.swing.RepaintManager$4.run(Unknown Source)
at javax.swing.RepaintManager$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.access$1200(Unknown Source)
at javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(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.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)
0 件のコメント
回答 (1 件)
ZH SU
2023 年 6 月 29 日
I met this question as well, and I can't solve this problem either. But I think the reason is that operation
fprintf('\b')
is so frequent that command window can't refresh correctly. If
pause(0.01)
is added after each fprintf('\b'), it will be ok, but this will slow the program severly. I guess that introducing an output buffer to solw down the frequency may help.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Startup and Shutdown についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!