Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8107041

TextBox with text being "Hello \n World" caused exception

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: fx1.1.1
    • Fix Version/s: fx1.3
    • Component/s: javafx
    • Labels:
    • Environment:

      WinXP SP2 + JDK 1.6.0_11

      Description

      Can be re-produced by below source codes,

      import javafx.stage.Stage;
      import javafx.scene.Scene;
      import javafx.scene.control.TextBox;

      /**
      * @author Lianqi.Li
      */
      Stage {
         title: "Application title"
         width: 600
         height: 600
         scene: Scene {
             content: [
                 TextBox {
                     text: "Hello \n World"
                     columns: 32
                     height: 100
                     editable: true
                     selectOnFocus: true
                 }
             ]
         }
      }

      The exception is:

      Exception in trigger:
      java.lang.IllegalArgumentException: Range is invalid in TextLayout.getLogicalHighlightShape()
             at java.awt.font.TextLayout.getLogicalHighlightShape(TextLayout.java:2263)
             at java.awt.font.TextLayout.getLogicalHighlightShape(TextLayout.java:2345)
             at com.sun.scenario.scenegraph.SGText.getSelectionShape(SGText.java:522)
             at javafx.scene.text.Text.updateDecorationShapes$impl(Text.fx:334)
             at javafx.scene.text.Text.updateDecorationShapes(Text.fx:72)
             at javafx.scene.text.Text$13.onChange(Text.fx:239)
             at com.sun.javafx.runtime.location.IntVariable$4.onAction(IntVariable.java:173)
             at com.sun.javafx.runtime.location.IntVariable$4.onAction(IntVariable.java:170)
             at com.sun.javafx.runtime.location.DependencyIterator.action(AbstractLocation.java:503)
             at com.sun.javafx.runtime.location.DependencyIterator.action(AbstractLocation.java:491)
             at com.sun.javafx.runtime.util.Linkables.iterate(Linkables.java:82)
             at com.sun.javafx.runtime.location.AbstractLocation.iterateChildren(AbstractLocation.java:282)
             at com.sun.javafx.runtime.location.IntVariable.notifyListeners(IntVariable.java:170)
             at com.sun.javafx.runtime.location.IntVariable.replaceValue(IntVariable.java:94)
             at com.sun.javafx.runtime.location.IntVariable.update(IntVariable.java:149)
             at com.sun.javafx.runtime.location.AbstractVariable.invalidate(AbstractVariable.java:170)
             at com.sun.javafx.runtime.location.AbstractLocation$2.onAction(AbstractLocation.java:216)
             at com.sun.javafx.runtime.location.AbstractLocation$2.onAction(AbstractLocation.java:210)
             at com.sun.javafx.runtime.location.AbstractLocation$MutativeIterator.action(AbstractLocation.java:191)
             at com.sun.javafx.runtime.location.AbstractLocation$MutativeIterator.action(AbstractLocation.java:178)
             at com.sun.javafx.runtime.util.Linkables.iterate(Linkables.java:88)
             at com.sun.javafx.runtime.location.AbstractLocation.iterateChildren(AbstractLocation.java:175)
             at com.sun.javafx.runtime.location.AbstractLocation.invalidateDependencies(AbstractLocation.java:236)
             at com.sun.javafx.runtime.location.AbstractLocation.invalidate(AbstractLocation.java:110)
             at com.sun.javafx.runtime.location.AbstractVariable.invalidate(AbstractVariable.java:168)
             at com.sun.javafx.runtime.location.AbstractLocation$2.onAction(AbstractLocation.java:216)
             at com.sun.javafx.runtime.location.AbstractLocation$2.onAction(AbstractLocation.java:210)
             at com.sun.javafx.runtime.location.AbstractLocation$MutativeIterator.action(AbstractLocation.java:191)
             at com.sun.javafx.runtime.location.AbstractLocation$MutativeIterator.action(AbstractLocation.java:178)
             at com.sun.javafx.runtime.util.Linkables.iterate(Linkables.java:88)
             at com.sun.javafx.runtime.location.AbstractLocation.iterateChildren(AbstractLocation.java:175)
             at com.sun.javafx.runtime.location.AbstractLocation.invalidateDependencies(AbstractLocation.java:236)
             at com.sun.javafx.runtime.location.IntVariable.notifyListeners(IntVariable.java:168)
             at com.sun.javafx.runtime.location.IntVariable.replaceValue(IntVariable.java:94)
             at com.sun.javafx.runtime.location.IntVariable.setAsInt(IntVariable.java:113)
             at com.sun.javafx.scene.control.skins.TextBoxSkin$Behavior.selectAll$impl(TextBoxSkin.fx:534)
             at com.sun.javafx.scene.control.skins.TextBoxSkin$Behavior.selectAll(TextBoxSkin.fx:331)
             at com.sun.javafx.scene.control.skins.TextBoxSkin$Behavior.focus$impl(TextBoxSkin.fx:908)
             at com.sun.javafx.scene.control.skins.TextBoxSkin$Behavior.focus(TextBoxSkin.fx:331)
             at com.sun.javafx.scene.control.skins.AbstractSkin$3.onChange(AbstractSkin.fx:75)
             at com.sun.javafx.runtime.location.BooleanVariable$4.onAction(BooleanVariable.java:173)
             at com.sun.javafx.runtime.location.BooleanVariable$4.onAction(BooleanVariable.java:170)
             at com.sun.javafx.runtime.location.DependencyIterator.action(AbstractLocation.java:503)
             at com.sun.javafx.runtime.location.DependencyIterator.action(AbstractLocation.java:491)
             at com.sun.javafx.runtime.util.Linkables.iterate(Linkables.java:82)
             at com.sun.javafx.runtime.location.AbstractLocation.iterateChildren(AbstractLocation.java:282)
             at com.sun.javafx.runtime.location.BooleanVariable.notifyListeners(BooleanVariable.java:170)
             at com.sun.javafx.runtime.location.BooleanVariable.replaceValue(BooleanVariable.java:94)
             at com.sun.javafx.runtime.location.BooleanVariable.update(BooleanVariable.java:149)
             at com.sun.javafx.runtime.location.AbstractVariable.invalidate(AbstractVariable.java:170)
             at com.sun.javafx.runtime.location.AbstractLocation$2.onAction(AbstractLocation.java:216)
             at com.sun.javafx.runtime.location.AbstractLocation$2.onAction(AbstractLocation.java:210)
             at com.sun.javafx.runtime.location.AbstractLocation$MutativeIterator.action(AbstractLocation.java:191)
             at com.sun.javafx.runtime.location.AbstractLocation$MutativeIterator.action(AbstractLocation.java:178)
             at com.sun.javafx.runtime.util.Linkables.iterate(Linkables.java:88)
             at com.sun.javafx.runtime.location.AbstractLocation.iterateChildren(AbstractLocation.java:175)
             at com.sun.javafx.runtime.location.AbstractLocation.invalidateDependencies(AbstractLocation.java:236)
             at com.sun.javafx.runtime.location.AbstractLocation.invalidate(AbstractLocation.java:110)
             at com.sun.javafx.runtime.location.AbstractVariable.invalidate(AbstractVariable.java:168)
             at com.sun.javafx.runtime.location.AbstractLocation$2.onAction(AbstractLocation.java:216)
             at com.sun.javafx.runtime.location.AbstractLocation$2.onAction(AbstractLocation.java:210)
             at com.sun.javafx.runtime.location.AbstractLocation$MutativeIterator.action(AbstractLocation.java:191)
             at com.sun.javafx.runtime.location.AbstractLocation$MutativeIterator.action(AbstractLocation.java:178)
             at com.sun.javafx.runtime.util.Linkables.iterate(Linkables.java:88)
             at com.sun.javafx.runtime.location.AbstractLocation.iterateChildren(AbstractLocation.java:175)
             at com.sun.javafx.runtime.location.AbstractLocation.invalidateDependencies(AbstractLocation.java:236)
             at com.sun.javafx.runtime.location.BooleanVariable.notifyListeners(BooleanVariable.java:168)
             at com.sun.javafx.runtime.location.BooleanVariable.replaceValue(BooleanVariable.java:94)
             at com.sun.javafx.runtime.location.BooleanVariable.setAsBoolean(BooleanVariable.java:113)
             at javafx.scene.Node$1SGFocusListener$anon31.focusGained(Node.fx:1420)
             at com.sun.scenario.scenegraph.SGNode.processFocusEvent(SGNode.java:1086)
             at com.sun.scenario.scenegraph.FocusHandler$FocusOwnerContainer.processFocusEvent(FocusHandler.java:510)
             at java.awt.Component.processEvent(Component.java:5890)
             at java.awt.Container.processEvent(Container.java:2023)
             at java.awt.Component.dispatchEventImpl(Component.java:4501)
             at java.awt.Container.dispatchEventImpl(Container.java:2081)
             at java.awt.Component.dispatchEvent(Component.java:4331)
             at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1848)
             at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:880)
             at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:511)
             at java.awt.Component.dispatchEventImpl(Component.java:4373)
             at java.awt.Container.dispatchEventImpl(Container.java:2081)
             at java.awt.Window.dispatchEventImpl(Window.java:2458)
             at java.awt.Component.dispatchEvent(Component.java:4331)
             at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
             at java.awt.SequencedEvent.dispatch(SequencedEvent.java:101)
             at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
             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)

        Attachments

          Activity

            People

            • Assignee:
              rbair Richard Bair
              Reporter:
              lianqli Lianqi Li (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: