-
Bug
-
Resolution: Fixed
-
P3
-
8u5
-
Win 7 64bit
Java 8u5
When a GridPane has managed children but they all change their managed property so there are no managed children left, a NPE is thrown in the layout code while computing the min height
This works in JavaFX 2.x
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
at javafx.scene.layout.GridPane.computeMinHeights(GridPane.java:1450)
at javafx.scene.layout.GridPane.computeMinHeight(GridPane.java:1224)
at javafx.scene.Parent.minHeight(Parent.java:946)
at javafx.scene.layout.Region.minHeight(Region.java:1404)
at javafx.scene.layout.Region.computeChildMinAreaHeight(Region.java:1700)
at javafx.scene.layout.Region.getMaxAreaHeight(Region.java:1981)
at javafx.scene.layout.Region.computeMaxMinAreaHeight(Region.java:1854)
at javafx.scene.layout.StackPane.computeMinHeight(StackPane.java:293)
at javafx.scene.Parent.minHeight(Parent.java:946)
at javafx.scene.layout.Region.minHeight(Region.java:1404)
at javafx.scene.layout.Region.computeChildPrefAreaHeight(Region.java:1765)
at javafx.scene.layout.Region.getMaxAreaHeight(Region.java:1982)
at javafx.scene.layout.Region.computeMaxPrefAreaHeight(Region.java:1884)
at javafx.scene.layout.StackPane.computePrefHeight(StackPane.java:310)
at javafx.scene.Parent.prefHeight(Parent.java:918)
at javafx.scene.layout.Region.prefHeight(Region.java:1438)
at com.sun.javafx.scene.control.skin.TitledPaneSkin.computePrefHeight(TitledPaneSkin.java:249)
at javafx.scene.control.Control.computePrefHeight(Control.java:543)
at javafx.scene.Parent.prefHeight(Parent.java:918)
at javafx.scene.layout.Region.prefHeight(Region.java:1438)
at javafx.scene.layout.Region.computeChildPrefAreaHeight(Region.java:1765)
at javafx.scene.layout.GridPane.computePrefHeights(GridPane.java:1407)
at javafx.scene.layout.GridPane.computePrefHeight(GridPane.java:1242)
at javafx.scene.Parent.prefHeight(Parent.java:918)
at javafx.scene.layout.Region.prefHeight(Region.java:1438)
at com.sun.javafx.scene.control.skin.ScrollPaneSkin.computeScrollNodeSize(ScrollPaneSkin.java:916)
at com.sun.javafx.scene.control.skin.ScrollPaneSkin.layoutChildren(ScrollPaneSkin.java:791)
at javafx.scene.control.Control.layoutChildren(Control.java:574)
at javafx.scene.Parent.layout(Parent.java:1076)
at javafx.scene.Parent.layout(Parent.java:1082)
at javafx.scene.Parent.layout(Parent.java:1082)
at javafx.scene.Parent.layout(Parent.java:1082)
at javafx.scene.Parent.layout(Parent.java:1082)
at javafx.scene.Parent.layout(Parent.java:1082)
at javafx.scene.Parent.layout(Parent.java:1082)
at javafx.scene.Parent.layout(Parent.java:1082)
at javafx.scene.Parent.layout(Parent.java:1082)
at javafx.scene.Parent.layout(Parent.java:1082)
at javafx.scene.Parent.layout(Parent.java:1082)
at javafx.scene.Parent.layout(Parent.java:1082)
at javafx.scene.Scene.doLayoutPass(Scene.java:576)
at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2386)
at com.sun.javafx.tk.Toolkit$3.run(Toolkit.java:321)
at com.sun.javafx.tk.Toolkit$3.run(Toolkit.java:319)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:319)
at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:348)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:479)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:460)
at com.sun.javafx.tk.quantum.QuantumToolkit$13.run(QuantumToolkit.java:327)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.access$300(WinApplication.java:39)
at com.sun.glass.ui.win.WinApplication$4$1.run(WinApplication.java:112)
at java.lang.Thread.run(Thread.java:745)
This works in JavaFX 2.x
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
at javafx.scene.layout.GridPane.computeMinHeights(GridPane.java:1450)
at javafx.scene.layout.GridPane.computeMinHeight(GridPane.java:1224)
at javafx.scene.Parent.minHeight(Parent.java:946)
at javafx.scene.layout.Region.minHeight(Region.java:1404)
at javafx.scene.layout.Region.computeChildMinAreaHeight(Region.java:1700)
at javafx.scene.layout.Region.getMaxAreaHeight(Region.java:1981)
at javafx.scene.layout.Region.computeMaxMinAreaHeight(Region.java:1854)
at javafx.scene.layout.StackPane.computeMinHeight(StackPane.java:293)
at javafx.scene.Parent.minHeight(Parent.java:946)
at javafx.scene.layout.Region.minHeight(Region.java:1404)
at javafx.scene.layout.Region.computeChildPrefAreaHeight(Region.java:1765)
at javafx.scene.layout.Region.getMaxAreaHeight(Region.java:1982)
at javafx.scene.layout.Region.computeMaxPrefAreaHeight(Region.java:1884)
at javafx.scene.layout.StackPane.computePrefHeight(StackPane.java:310)
at javafx.scene.Parent.prefHeight(Parent.java:918)
at javafx.scene.layout.Region.prefHeight(Region.java:1438)
at com.sun.javafx.scene.control.skin.TitledPaneSkin.computePrefHeight(TitledPaneSkin.java:249)
at javafx.scene.control.Control.computePrefHeight(Control.java:543)
at javafx.scene.Parent.prefHeight(Parent.java:918)
at javafx.scene.layout.Region.prefHeight(Region.java:1438)
at javafx.scene.layout.Region.computeChildPrefAreaHeight(Region.java:1765)
at javafx.scene.layout.GridPane.computePrefHeights(GridPane.java:1407)
at javafx.scene.layout.GridPane.computePrefHeight(GridPane.java:1242)
at javafx.scene.Parent.prefHeight(Parent.java:918)
at javafx.scene.layout.Region.prefHeight(Region.java:1438)
at com.sun.javafx.scene.control.skin.ScrollPaneSkin.computeScrollNodeSize(ScrollPaneSkin.java:916)
at com.sun.javafx.scene.control.skin.ScrollPaneSkin.layoutChildren(ScrollPaneSkin.java:791)
at javafx.scene.control.Control.layoutChildren(Control.java:574)
at javafx.scene.Parent.layout(Parent.java:1076)
at javafx.scene.Parent.layout(Parent.java:1082)
at javafx.scene.Parent.layout(Parent.java:1082)
at javafx.scene.Parent.layout(Parent.java:1082)
at javafx.scene.Parent.layout(Parent.java:1082)
at javafx.scene.Parent.layout(Parent.java:1082)
at javafx.scene.Parent.layout(Parent.java:1082)
at javafx.scene.Parent.layout(Parent.java:1082)
at javafx.scene.Parent.layout(Parent.java:1082)
at javafx.scene.Parent.layout(Parent.java:1082)
at javafx.scene.Parent.layout(Parent.java:1082)
at javafx.scene.Parent.layout(Parent.java:1082)
at javafx.scene.Scene.doLayoutPass(Scene.java:576)
at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2386)
at com.sun.javafx.tk.Toolkit$3.run(Toolkit.java:321)
at com.sun.javafx.tk.Toolkit$3.run(Toolkit.java:319)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:319)
at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:348)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:479)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:460)
at com.sun.javafx.tk.quantum.QuantumToolkit$13.run(QuantumToolkit.java:327)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.access$300(WinApplication.java:39)
at com.sun.glass.ui.win.WinApplication$4$1.run(WinApplication.java:112)
at java.lang.Thread.run(Thread.java:745)