{"action":"closed","issue":{"url":"https://api.github.com/repos/arduino/Arduino/issues/3475","repository_url":"https://api.github.com/repos/arduino/Arduino","labels_url":"https://api.github.com/repos/arduino/Arduino/issues/3475/labels{/name}","comments_url":"https://api.github.com/repos/arduino/Arduino/issues/3475/comments","events_url":"https://api.github.com/repos/arduino/Arduino/issues/3475/events","html_url":"https://github.com/arduino/Arduino/issues/3475","id":93548824,"number":3475,"title":"IndexOutOfBoundsException when compilation/upload output window updated","user":{"login":"Yoda12999","id":1204409,"avatar_url":"https://avatars.githubusercontent.com/u/1204409?v=3","gravatar_id":"","url":"https://api.github.com/users/Yoda12999","html_url":"https://github.com/Yoda12999","followers_url":"https://api.github.com/users/Yoda12999/followers","following_url":"https://api.github.com/users/Yoda12999/following{/other_user}","gists_url":"https://api.github.com/users/Yoda12999/gists{/gist_id}","starred_url":"https://api.github.com/users/Yoda12999/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yoda12999/subscriptions","organizations_url":"https://api.github.com/users/Yoda12999/orgs","repos_url":"https://api.github.com/users/Yoda12999/repos","events_url":"https://api.github.com/users/Yoda12999/events{/privacy}","received_events_url":"https://api.github.com/users/Yoda12999/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/arduino/Arduino/labels/Component:%20IDE%20user%20interface","name":"Component: IDE user interface","color":"009800"},{"url":"https://api.github.com/repos/arduino/Arduino/labels/Type:%20Bug","name":"Type: Bug","color":"0052cc"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-07-07T14:49:56Z","updated_at":"2016-03-07T17:23:05Z","closed_at":"2016-03-07T17:23:05Z","body":"Every once and a while (maybe once every three times) when the compile or upload button is hit, an IndexOutOfBoundsException is created and the requested action does not happen. Generally hitting the button again clears the error and everything works fine.\r\n\r\nError:\r\n```\r\njava.lang.IndexOutOfBoundsException: len=-1\r\n\tat sun.font.FontDesignMetrics.charsWidth(FontDesignMetrics.java:501)\r\n\tat org.fife.ui.rsyntaxtextarea.TokenImpl.getWidthUpTo(TokenImpl.java:528)\r\n\tat org.fife.ui.rsyntaxtextarea.TokenImpl.getWidth(TokenImpl.java:499)\r\n\tat org.fife.ui.rsyntaxtextarea.RSyntaxUtilities.getTokenListWidth(RSyntaxUtilities.java:1142)\r\n\tat org.fife.ui.rsyntaxtextarea.RSyntaxUtilities.getTokenListWidth(RSyntaxUtilities.java:1121)\r\n\tat org.fife.ui.rsyntaxtextarea.SyntaxView.getLineWidth(SyntaxView.java:304)\r\n\tat org.fife.ui.rsyntaxtextarea.SyntaxView.calculateLongestLine(SyntaxView.java:110)\r\n\tat org.fife.ui.rsyntaxtextarea.SyntaxView.updateMetrics(SyntaxView.java:892)\r\n\tat org.fife.ui.rsyntaxtextarea.SyntaxView.setSize(SyntaxView.java:802)\r\n\tat javax.swing.plaf.basic.BasicTextUI$RootView.setSize(BasicTextUI.java:1722)\r\n\tat javax.swing.plaf.basic.BasicTextUI.getPreferredSize(BasicTextUI.java:912)\r\n\tat javax.swing.plaf.basic.BasicTextAreaUI.getPreferredSize(BasicTextAreaUI.java:120)\r\n\tat javax.swing.JComponent.getPreferredSize(JComponent.java:1662)\r\n\tat javax.swing.JTextArea.getPreferredSize(JTextArea.java:619)\r\n\tat javax.swing.JViewport.getViewSize(JViewport.java:999)\r\n\tat javax.swing.plaf.basic.BasicScrollPaneUI.syncScrollPaneWithViewport(BasicScrollPaneUI.java:278)\r\n\tat javax.swing.plaf.basic.BasicScrollPaneUI$Handler.stateChanged(BasicScrollPaneUI.java:1033)\r\n\tat javax.swing.JViewport.fireStateChanged(JViewport.java:1369)\r\n\tat javax.swing.JViewport.setView(JViewport.java:969)\r\n\tat javax.swing.JScrollPane.setViewportView(JScrollPane.java:1007)\r\n\tat org.fife.ui.rtextarea.RTextScrollPane.setViewportView(RTextScrollPane.java:253)\r\n\tat processing.app.Editor.setCode(Editor.java:1766)\r\n\tat processing.app.Sketch.setCurrentCode(Sketch.java:1000)\r\n\tat processing.app.Sketch.load(Sketch.java:121)\r\n\tat processing.app.Sketch.prepare(Sketch.java:1071)\r\n\tat processing.app.Sketch.exportApplet(Sketch.java:1123)\r\n\tat processing.app.Sketch.exportApplet(Sketch.java:1113)\r\n\tat processing.app.Editor$DefaultExportHandler.run(Editor.java:2380)\r\n\tat java.lang.Thread.run(Thread.java:745)\r\n```\r\n\r\n"}}