javax.swing.text.BadLocationException: Position not represented by view

GitHub | pmouawad | 3 years 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

    Getting BadLocationException: Position not represented by view

    GitHub | 3 years ago | pmouawad
    javax.swing.text.BadLocationException: Position not represented by view

    Root Cause Analysis

    1. javax.swing.text.BadLocationException

      Position not represented by view

      at org.fife.ui.rsyntaxtextarea.WrappedSyntaxView.modelToView()
    2. rsyntaxtextarea
      WrappedSyntaxView.modelToView
      1. org.fife.ui.rsyntaxtextarea.WrappedSyntaxView.modelToView(WrappedSyntaxView.java:726)
      1 frame
    3. Java RT
      JTextComponent.modelToView
      1. javax.swing.plaf.basic.BasicTextUI$RootView.modelToView(BasicTextUI.java:1498)
      2. javax.swing.plaf.basic.BasicTextUI.modelToView(BasicTextUI.java:1036)
      3. javax.swing.plaf.basic.BasicTextUI.modelToView(BasicTextUI.java:1011)
      4. javax.swing.text.JTextComponent.modelToView(JTextComponent.java:1400)
      4 frames
    4. rsyntaxtextarea
      FoldManager$Listener.removeUpdate
      1. org.fife.ui.rtextarea.RTextAreaBase.possiblyUpdateCurrentLineHighlightLocation(RTextAreaBase.java:721)
      2. org.fife.ui.rsyntaxtextarea.RSyntaxTextArea.foldToggled(RSyntaxTextArea.java:870)
      3. org.fife.ui.rsyntaxtextarea.folding.Fold.setCollapsed(Fold.java:508)
      4. org.fife.ui.rsyntaxtextarea.folding.Fold.toggleCollapsedState(Fold.java:537)
      5. org.fife.ui.rsyntaxtextarea.folding.FoldManager$Listener.removeUpdate(FoldManager.java:697)
      5 frames
    5. Java RT
      AbstractDocument.fireRemoveUpdate
      1. javax.swing.text.AbstractDocument.fireRemoveUpdate(AbstractDocument.java:243)
      1 frame
    6. rsyntaxtextarea
      RSyntaxDocument.fireRemoveUpdate
      1. org.fife.ui.rsyntaxtextarea.RSyntaxDocument.fireRemoveUpdate(RSyntaxDocument.java:252)
      1 frame
    7. Java RT
      JTextComponent.replaceSelection
      1. javax.swing.text.AbstractDocument.handleRemove(AbstractDocument.java:608)
      2. javax.swing.text.AbstractDocument.remove(AbstractDocument.java:576)
      3. javax.swing.text.AbstractDocument.replace(AbstractDocument.java:652)
      4. javax.swing.text.JTextComponent.replaceSelection(JTextComponent.java:1351)
      4 frames
    8. rsyntaxtextarea
      RTATextTransferHandler.importData
      1. org.fife.ui.rtextarea.RTextArea.handleReplaceSelection(RTextArea.java:853)
      2. org.fife.ui.rtextarea.RTextArea.replaceSelection(RTextArea.java:1226)
      3. org.fife.ui.rtextarea.RTATextTransferHandler.handleReaderImport(RTATextTransferHandler.java:172)
      4. org.fife.ui.rtextarea.RTATextTransferHandler.importData(RTATextTransferHandler.java:275)
      4 frames
    9. Java RT
      JTextComponent.paste
      1. javax.swing.TransferHandler.importData(TransferHandler.java:755)
      2. javax.swing.TransferHandler$TransferAction.actionPerformedImpl(TransferHandler.java:1696)
      3. javax.swing.TransferHandler$TransferAction.access$700(TransferHandler.java:1621)
      4. javax.swing.TransferHandler$TransferAction$1.run(TransferHandler.java:1645)
      5. javax.swing.TransferHandler$TransferAction$1.run(TransferHandler.java:1643)
      6. java.security.AccessController.doPrivileged(Native Method)
      7. java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
      8. java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:97)
      9. javax.swing.TransferHandler$TransferAction$2.run(TransferHandler.java:1660)
      10. javax.swing.TransferHandler$TransferAction$2.run(TransferHandler.java:1658)
      11. java.security.AccessController.doPrivileged(Native Method)
      12. java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
      13. javax.swing.TransferHandler$TransferAction.actionPerformed(TransferHandler.java:1657)
      14. javax.swing.text.JTextComponent.invokeAction(JTextComponent.java:1485)
      15. javax.swing.text.JTextComponent.paste(JTextComponent.java:1463)
      15 frames
    10. rsyntaxtextarea
      RecordableTextAction.actionPerformed
      1. org.fife.ui.rtextarea.RTextArea.paste(RTextArea.java:981)
      2. org.fife.ui.rtextarea.RTextAreaEditorKit$PasteAction.actionPerformedImpl(RTextAreaEditorKit.java:2020)
      3. org.fife.ui.rtextarea.RecordableTextAction.actionPerformed(RecordableTextAction.java:105)
      3 frames
    11. Java RT
      EventDispatchThread.run
      1. javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1645)
      2. javax.swing.JComponent.processKeyBinding(JComponent.java:2859)
      3. javax.swing.JComponent.processKeyBindings(JComponent.java:2894)
      4. javax.swing.JComponent.processKeyEvent(JComponent.java:2822)
      5. java.awt.Component.processEvent(Component.java:6191)
      6. java.awt.Container.processEvent(Container.java:2083)
      7. java.awt.Component.dispatchEventImpl(Component.java:4776)
      8. java.awt.Container.dispatchEventImpl(Container.java:2141)
      9. java.awt.Component.dispatchEvent(Component.java:4604)
      10. java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1856)
      11. java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:722)
      12. java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1000)
      13. java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:865)
      14. java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:686)
      15. java.awt.Component.dispatchEventImpl(Component.java:4648)
      16. java.awt.Container.dispatchEventImpl(Container.java:2141)
      17. java.awt.Window.dispatchEventImpl(Window.java:2489)
      18. java.awt.Component.dispatchEvent(Component.java:4604)
      19. java.awt.EventQueue.dispatchEventImpl(EventQueue.java:717)
      20. java.awt.EventQueue.access$400(EventQueue.java:82)
      21. java.awt.EventQueue$2.run(EventQueue.java:676)
      22. java.awt.EventQueue$2.run(EventQueue.java:674)
      23. java.security.AccessController.doPrivileged(Native Method)
      24. java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
      25. java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:97)
      26. java.awt.EventQueue$3.run(EventQueue.java:690)
      27. java.awt.EventQueue$3.run(EventQueue.java:688)
      28. java.security.AccessController.doPrivileged(Native Method)
      29. java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
      30. java.awt.EventQueue.dispatchEvent(EventQueue.java:687)
      31. java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
      32. java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
      33. java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
      34. java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
      35. java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
      36. java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
      36 frames