I'm running IDE version 1.8.16 under Windows 10. Frequently I get the error message. The situation is solved only when exiting the IDE. Afterwards the compilation may be finished with or without sketch errors. Is there anything to do?
Exception in thread "AWT-EventQueue-0" Exception in thread
"Thread-18" java.lang.IndexOutOfBoundsException: len=-12
at sun.font.FontDesignMetrics.charsWidth(FontDesignMetrics.java:501)
at org.fife.ui.rsyntaxtextarea.TokenImpl.getWidthUpTo(TokenImpl.java:601)
at org.fife.ui.rsyntaxtextarea.TokenImpl.getWidth(TokenImpl.java:570)
at org.fife.ui.rsyntaxtextarea.RSyntaxUtilities.getTokenListWidth(RSyntaxUtilities.java:1180)
at org.fife.ui.rsyntaxtextarea.RSyntaxUtilities.getTokenListWidth(RSyntaxUtilities.java:1159)
at org.fife.ui.rsyntaxtextarea.SyntaxView.getLineWidth(SyntaxView.java:307)
at org.fife.ui.rsyntaxtextarea.SyntaxView.calculateLongestLine(SyntaxView.java:110)
at org.fife.ui.rsyntaxtextarea.RSyntaxTextArea.refreshFontMetrics(RSyntaxTextArea.java:2106)
at org.fife.ui.rsyntaxtextarea.RSyntaxTextArea.setFont(RSyntaxTextArea.java:2545)
at processing.app.EditorTab.applyPreferences(EditorTab.java:333)
at processing.app.Editor.lambda$selectTab52ドル(Editor.java:1457)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access500ドル(EventQueue.java:97)
at java.awt.EventQueue3ドル.run(EventQueue.java:709)
at java.awt.EventQueue3ドル.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
java.lang.IndexOutOfBoundsException: len=-12
at sun.font.FontDesignMetrics.charsWidth(FontDesignMetrics.java:501)
at org.fife.ui.rsyntaxtextarea.TokenImpl.getWidthUpTo(TokenImpl.java:601)
at org.fife.ui.rsyntaxtextarea.TokenImpl.getWidth(TokenImpl.java:570)
at org.fife.ui.rsyntaxtextarea.RSyntaxUtilities.getTokenListWidth(RSyntaxUtilities.java:1180)
at org.fife.ui.rsyntaxtextarea.RSyntaxUtilities.getTokenListWidth(RSyntaxUtilities.java:1159)
at org.fife.ui.rsyntaxtextarea.SyntaxView.getLineWidth(SyntaxView.java:307)
at org.fife.ui.rsyntaxtextarea.SyntaxView.calculateLongestLine(SyntaxView.java:110)
at org.fife.ui.rsyntaxtextarea.SyntaxView.updateMetrics(SyntaxView.java:903)
at org.fife.ui.rsyntaxtextarea.SyntaxView.yForLine(SyntaxView.java:988)
at org.fife.ui.rsyntaxtextarea.SyntaxView.yForLineContaining(SyntaxView.java:1013)
at org.fife.ui.rsyntaxtextarea.RSyntaxTextAreaUI.yForLineContaining(RSyntaxTextAreaUI.java:263)
at org.fife.ui.rtextarea.RTextAreaBase.yForLineContaining(RTextAreaBase.java:1218)
at org.fife.ui.rtextarea.LineHighlightManager.repaintLine(LineHighlightManager.java:174)
at org.fife.ui.rtextarea.LineHighlightManager.addLineHighlight(LineHighlightManager.java:69)
at org.fife.ui.rtextarea.RTextArea.addLineHighlight(RTextArea.java:296)
at processing.app.Editor.addLineHighlight(Editor.java:1670)
at processing.app.Editor.statusError(Editor.java:2552)
at processing.app.Editor$BuildHandler.run(Editor.java:1646)
at java.lang.Thread.run(Thread.java:748)
jsotola
1,5342 gold badges12 silver badges20 bronze badges
-
do you have some unusual characters in the sketch?Juraj– Juraj ♦2021年11月13日 17:02:28 +00:00Commented Nov 13, 2021 at 17:02
-
I see this a lot and I am using Linux. It appears when there is an error in my code, sometimes as simple as a parenthesis missing sometimes it just crashes. I close it and restart and everything is fine. This only messes with the current instance of the IDE, other windows and IDEs operating in the same and different work spaces and they are OK. The only consistent thing is it crashes during upload and I get lots of java errors. It will usually close, so I do not have to kill it. Sorry this does not solve the problem but lets you know it is not a windows only problem.Gil– Gil2021年11月18日 01:59:09 +00:00Commented Nov 18, 2021 at 1:59