Steps to reproduce:
1. Create a simple javafx application, e.g. just having a Button or Text.
2. Set the button text to multi-byte string, either hardcode or in resource bundle.
NPE reported as following. This didn't happen in b34 or before.
*** Fallback to Prism SW pipeline
Exception in Application start method
Exception in thread "main" java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:171)
at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:17)
at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:55)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException
at com.sun.t2k.CompositeGlyphMapper.getSlotMapper(CompositeGlyphMapper.java:52)
at com.sun.t2k.CompositeGlyphMapper.convertToGlyph(CompositeGlyphMapper.java:73)
at com.sun.t2k.CompositeGlyphMapper.getGlyphCode(CompositeGlyphMapper.java:128)
at com.sun.t2k.CharToGlyphMapper.charToGlyph(CharToGlyphMapper.java:113)
at com.sun.t2k.CompositeStrike.getCharAdvance(CompositeStrike.java:183)
at com.sun.t2k.CompositeStrike.getStringBounds(CompositeStrike.java:265)
at com.sun.javafx.sg.prism.NGText.computeBoundsLogicalIdentity(NGText.java:1164)
at com.sun.javafx.sg.prism.NGText.computeBoundsLogical(NGText.java:1127)
at com.sun.javafx.sg.prism.NGText.computeContentBounds(NGText.java:1096)
at com.sun.javafx.tk.quantum.PrismTextHelper.computeLayoutBounds(PrismTextHelper.java:33)
at javafx.scene.text.Text.impl_computeLayoutBoundsInt(Text.java:792)
at javafx.scene.text.Text.impl_computeLayoutBounds(Text.java:812)
at javafx.scene.Node$14.computeBounds(Node.java:2123)
at javafx.scene.Node$LazyBoundsProperty.get(Node.java:5513)
at javafx.scene.Node$LazyBoundsProperty.get(Node.java:5504)
at javafx.scene.Node.getLayoutBounds(Node.java:2128)
at javafx.scene.Node.prefWidth(Node.java:1856)
at com.sun.javafx.scene.control.skin.Utils.computeTextWidth(Utils.java:30)
at com.sun.javafx.scene.control.skin.LabelSkin.computePrefWidth(LabelSkin.java:620)
at javafx.scene.Parent.prefWidth(Parent.java:780)
at javafx.scene.layout.Region.prefWidth(Region.java:781)
at javafx.scene.control.Control.computePrefWidth(Control.java:577)
at javafx.scene.Parent.prefWidth(Parent.java:780)
at javafx.scene.control.Control.prefWidth(Control.java:503)
at com.sun.javafx.scene.control.skin.ButtonSkin.layoutChildren(ButtonSkin.java:81)
at javafx.scene.Parent.layout(Parent.java:852)
at javafx.scene.Parent.layout(Parent.java:859)
at javafx.scene.Scene.layoutDirtyRoots(Scene.java:481)
at javafx.scene.Scene.doLayoutPass(Scene.java:454)
at javafx.scene.Scene.preferredSize(Scene.java:1064)
at javafx.scene.Scene.impl_preferredSize(Scene.java:1087)
at javafx.stage.Window.adjustSize(Window.java:108)
at javafx.stage.Window.access$600(Window.java:41)
at javafx.stage.Window$12.invalidated(Window.java:494)
at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:62)
at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:116)
at javafx.stage.Window.setVisible(Window.java:534)
at javafx.stage.Stage.setVisible(Stage.java:105)
at Main.start(Main.java:49)
at com.sun.javafx.application.LauncherImpl$3.run(LauncherImpl.java:130)
at com.sun.javafx.application.PlatformImpl$3.run(PlatformImpl.java:87)
at com.sun.javafx.application.PlatformImpl$2.run(PlatformImpl.java:65)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:29)
at com.sun.glass.ui.win.WinApplication$1$1.run(WinApplication.java:49)
... 1 more
1. Create a simple javafx application, e.g. just having a Button or Text.
2. Set the button text to multi-byte string, either hardcode or in resource bundle.
NPE reported as following. This didn't happen in b34 or before.
*** Fallback to Prism SW pipeline
Exception in Application start method
Exception in thread "main" java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:171)
at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:17)
at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:55)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException
at com.sun.t2k.CompositeGlyphMapper.getSlotMapper(CompositeGlyphMapper.java:52)
at com.sun.t2k.CompositeGlyphMapper.convertToGlyph(CompositeGlyphMapper.java:73)
at com.sun.t2k.CompositeGlyphMapper.getGlyphCode(CompositeGlyphMapper.java:128)
at com.sun.t2k.CharToGlyphMapper.charToGlyph(CharToGlyphMapper.java:113)
at com.sun.t2k.CompositeStrike.getCharAdvance(CompositeStrike.java:183)
at com.sun.t2k.CompositeStrike.getStringBounds(CompositeStrike.java:265)
at com.sun.javafx.sg.prism.NGText.computeBoundsLogicalIdentity(NGText.java:1164)
at com.sun.javafx.sg.prism.NGText.computeBoundsLogical(NGText.java:1127)
at com.sun.javafx.sg.prism.NGText.computeContentBounds(NGText.java:1096)
at com.sun.javafx.tk.quantum.PrismTextHelper.computeLayoutBounds(PrismTextHelper.java:33)
at javafx.scene.text.Text.impl_computeLayoutBoundsInt(Text.java:792)
at javafx.scene.text.Text.impl_computeLayoutBounds(Text.java:812)
at javafx.scene.Node$14.computeBounds(Node.java:2123)
at javafx.scene.Node$LazyBoundsProperty.get(Node.java:5513)
at javafx.scene.Node$LazyBoundsProperty.get(Node.java:5504)
at javafx.scene.Node.getLayoutBounds(Node.java:2128)
at javafx.scene.Node.prefWidth(Node.java:1856)
at com.sun.javafx.scene.control.skin.Utils.computeTextWidth(Utils.java:30)
at com.sun.javafx.scene.control.skin.LabelSkin.computePrefWidth(LabelSkin.java:620)
at javafx.scene.Parent.prefWidth(Parent.java:780)
at javafx.scene.layout.Region.prefWidth(Region.java:781)
at javafx.scene.control.Control.computePrefWidth(Control.java:577)
at javafx.scene.Parent.prefWidth(Parent.java:780)
at javafx.scene.control.Control.prefWidth(Control.java:503)
at com.sun.javafx.scene.control.skin.ButtonSkin.layoutChildren(ButtonSkin.java:81)
at javafx.scene.Parent.layout(Parent.java:852)
at javafx.scene.Parent.layout(Parent.java:859)
at javafx.scene.Scene.layoutDirtyRoots(Scene.java:481)
at javafx.scene.Scene.doLayoutPass(Scene.java:454)
at javafx.scene.Scene.preferredSize(Scene.java:1064)
at javafx.scene.Scene.impl_preferredSize(Scene.java:1087)
at javafx.stage.Window.adjustSize(Window.java:108)
at javafx.stage.Window.access$600(Window.java:41)
at javafx.stage.Window$12.invalidated(Window.java:494)
at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:62)
at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:116)
at javafx.stage.Window.setVisible(Window.java:534)
at javafx.stage.Stage.setVisible(Stage.java:105)
at Main.start(Main.java:49)
at com.sun.javafx.application.LauncherImpl$3.run(LauncherImpl.java:130)
at com.sun.javafx.application.PlatformImpl$3.run(PlatformImpl.java:87)
at com.sun.javafx.application.PlatformImpl$2.run(PlatformImpl.java:65)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:29)
at com.sun.glass.ui.win.WinApplication$1$1.run(WinApplication.java:49)
... 1 more
- duplicates
-
JDK-8111513 Prism incorrectly render FontPosture.ITALIC and FontWeight.BOLD
-
- Closed
-