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$selectTab$52(Editor.java:1457)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.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)
2
  • do you have some unusual characters in the sketch?
    – Juraj
    Nov 13 '21 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
    Nov 18 '21 at 1:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.