java.lang.IllegalArgumentException: Invalid substring range

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Coderanch by Gaurav Mac Mathur, 1 year ago
via Oracle Community by 843805, 1 year ago
java.lang.IllegalArgumentException: Invalid substring range
at java.text.AttributedString$AttributedStringIterator.(AttributedString.java:587)
at java.text.AttributedString.getIterator(AttributedString.java:471)
at javax.swing.text.Utilities.drawComposedText(Utilities.java:611)
at javax.swing.text.PlainView.drawElement(PlainView.java:86)
at javax.swing.text.PlainView.drawLine(PlainView.java:70)
at javax.swing.text.PlainView.paint(PlainView.java:272)
at javax.swing.text.FieldView.paint(FieldView.java:169)
at javax.swing.plaf.basic.BasicTextUI$RootView.paint(BasicTextUI.java:1165)
at javax.swing.plaf.basic.BasicTextUI.paintSafely(BasicTextUI.java:518)
at javax.swing.plaf.basic.BasicTextUI.paint(BasicTextUI.java:652)
at javax.swing.plaf.basic.BasicTextUI.update(BasicTextUI.java:631)
at javax.swing.JComponent.paintComponent(JComponent.java:390)
at javax.swing.JComponent.paint(JComponent.java:686)
at javax.swing.JComponent._paintImmediately(JComponent.java:3831)
at javax.swing.JComponent.paintImmediately(JComponent.java:3671)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:450)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:119)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:149)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:332)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:126)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:88)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:80)

Users with the same issue

You are the first who have seen this exception.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.