Uploaded image for project: 'Pivot'
  1. Pivot
  2. PIVOT-688

TextInput: java.lang.IndexOutOfBoundsException when Ctrl-C

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.1, 1.5.2
    • Fix Version/s: 2.0
    • Component/s: wtk
    • Labels:
      None
    • Environment:
      java version "1.6.0_21" + ubuntu 10.10

      Description

      in a textInput, enter following text: 123
      cursor at the right of character 3; then press shift and move cursor to the left, so that 23 is selected
      then hit Ctrl-C
      following exception is thrown:
      java.lang.IndexOutOfBoundsException
      at org.apache.pivot.wtk.text.TextNode.getRange(TextNode.java:255)
      at org.apache.pivot.wtk.TextInput.getSelectedText(TextInput.java:603)
      at org.apache.pivot.wtk.TextInput.copy(TextInput.java:438)
      at org.apache.pivot.wtk.skin.terra.TerraTextInputSkin.keyPressed(TerraTextInputSkin.java:1253)
      at org.apache.pivot.wtk.Component$ComponentKeyListenerList.keyPressed(Component.java:514)
      at org.apache.pivot.wtk.Component.keyPressed(Component.java:2656)
      at org.apache.pivot.wtk.ApplicationContext$DisplayHost.processKeyEvent(ApplicationContext.java:1221)
      at java.awt.Component.processEvent(Component.java:6044)
      at org.apache.pivot.wtk.ApplicationContext$DisplayHost.processEvent(ApplicationContext.java:655)
      at java.awt.Component.dispatchEventImpl(Component.java:4630)
      at java.awt.Component.dispatchEvent(Component.java:4460)
      at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1850)
      at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:712)
      at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:990)
      at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:855)
      at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:676)
      at java.awt.Component.dispatchEventImpl(Component.java:4502)
      at java.awt.Container.dispatchEventImpl(Container.java:2099)
      at java.awt.Window.dispatchEventImpl(Window.java:2478)
      at java.awt.Component.dispatchEvent(Component.java:4460)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

      Notes:

      • doesn't happen when selecting the text from left to right, only from right to left
      • doesn't happen when selecting the whole text from right to left

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              lgebus laurent Gebus
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: