1

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
asked Nov 13, 2021 at 16:55
2
  • do you have some unusual characters in the sketch? Commented 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. Commented Nov 18, 2021 at 1:59

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.