java.lang.ArrayIndexOutOfBoundsException: -1

Coderanch | Gary Newcombe | 1 decade ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Help with UndoManager

    Coderanch | 1 decade ago | Gary Newcombe
    java.lang.ArrayIndexOutOfBoundsException: -1

    Root Cause Analysis

    1. java.lang.ArrayIndexOutOfBoundsException

      -1

      at javax.swing.text.AbstractDocument$BranchElement.getEndOffset()
    2. Java RT
      UndoManager.undo
      1. javax.swing.text.AbstractDocument$BranchElement.getEndOffset(AbstractDocument.java:2333)
      2. javax.swing.text.PlainView.getLineWidth(PlainView.java:631)
      3. javax.swing.text.PlainView.updateDamage(PlainView.java:507)
      4. javax.swing.text.PlainView.removeUpdate(PlainView.java:434)
      5. javax.swing.plaf.basic.BasicTextUI$RootView.removeUpdate(BasicTextUI.java:1501)
      6. javax.swing.plaf.basic.BasicTextUI$UpdateHandler.removeUpdate(BasicTextUI.java:1741)
      7. javax.swing.text.AbstractDocument.fireRemoveUpdate(AbstractDocument.java:242)
      8. javax.swing.text.AbstractDocument$DefaultDocumentEvent.undo(AbstractDocument.java:2799)
      9. javax.swing.undo.UndoManager.undoTo(UndoManager.java:210)
      10. javax.swing.undo.UndoManager.undo(UndoManager.java:275)
      10 frames
    3. Unknown
      UndoManagerTest$UndoAction.actionPerformed
      1. UndoManagerTest$UndoAction.actionPerformed(UndoManagerTest.java:107)
      1 frame
    4. Java RT
      EventDispatchThread.run
      1. javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
      2. javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
      3. javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
      4. javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
      5. javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
      6. java.awt.Component.processMouseEvent(Component.java:5100)
      7. java.awt.Component.processEvent(Component.java:4897)
      8. java.awt.Container.processEvent(Container.java:1569)
      9. java.awt.Component.dispatchEventImpl(Component.java:3615)
      10. java.awt.Container.dispatchEventImpl(Container.java:1627)
      11. java.awt.Component.dispatchEvent(Component.java:3477)
      12. java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
      13. java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
      14. java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
      15. java.awt.Container.dispatchEventImpl(Container.java:1613)
      16. java.awt.Window.dispatchEventImpl(Window.java:1606)
      17. java.awt.Component.dispatchEvent(Component.java:3477)
      18. java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
      19. java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
      20. java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
      21. java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
      22. java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
      23. java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
      23 frames