On Tue, 10 Jun 2025 02:51:34 GMT, Michael Strauß <mstra...@openjdk.org> wrote:
>> Implementation of >> [`StageStyle.EXTENDED`](https://gist.github.com/mstr2/0befc541ee7297b6db2865cc5e4dbd09). > > Michael Strauß has updated the pull request incrementally with one additional > commit since the last revision: > > only dispose ViewSceneOverlay when non-null On Windows, when switching to fullscreen mode, the application crashes with an endless repetition of the error. Example: @Override public void start(Stage stage) { var headerBar = new HeaderBar(); var root = new BorderPane(); root.setTop(headerBar); Button btnFullScreen = new Button("FullScreen"); btnFullScreen.setOnAction((_) -> stage.setFullScreen(!stage.isFullScreen())); root.setCenter(btnFullScreen); stage.setScene(new Scene(root, 640, 480)); stage.initStyle(StageStyle.EXTENDED); stage.show(); } When you press a button in the console, the error repeats endlessly: Exception in thread "JavaFX Application Thread" java.lang.IndexOutOfBoundsException: Index -1 out of bounds for length 2 at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:100) at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106) at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302) at java.base/java.util.Objects.checkIndex(Objects.java:365) at java.base/java.util.ArrayList.get(ArrayList.java:428) at javafx.base@25-internal/com.sun.javafx.collections.ObservableListWrapper.get(ObservableListWrapper.java:88) at javafx.base@25-internal/com.sun.javafx.collections.VetoableListDecorator.get(VetoableListDecorator.java:326) at javafx.graphics@25-internal/javafx.scene.Parent.updateCachedBounds(Parent.java:1772) at javafx.graphics@25-internal/javafx.scene.Parent.recomputeBounds(Parent.java:1716) at javafx.graphics@25-internal/javafx.scene.Parent.doComputeGeomBounds(Parent.java:1569) at javafx.graphics@25-internal/javafx.scene.Parent$1.doComputeGeomBounds(Parent.java:116) at javafx.graphics@25-internal/com.sun.javafx.scene.ParentHelper.computeGeomBoundsImpl(ParentHelper.java:84) at javafx.graphics@25-internal/com.sun.javafx.scene.layout.RegionHelper.superComputeGeomBoundsImpl(RegionHelper.java:78) at javafx.graphics@25-internal/com.sun.javafx.scene.layout.RegionHelper.superComputeGeomBounds(RegionHelper.java:62) at javafx.graphics@25-internal/javafx.scene.layout.Region.doComputeGeomBounds(Region.java:3347) at javafx.graphics@25-internal/javafx.scene.layout.Region$1.doComputeGeomBounds(Region.java:166) at javafx.graphics@25-internal/com.sun.javafx.scene.layout.RegionHelper.computeGeomBoundsImpl(RegionHelper.java:89) at javafx.graphics@25-internal/com.sun.javafx.scene.NodeHelper.computeGeomBounds(NodeHelper.java:103) at javafx.graphics@25-internal/javafx.scene.Node.updateGeomBounds(Node.java:3923) at javafx.graphics@25-internal/javafx.scene.Node.getGeomBounds(Node.java:3885) at javafx.graphics@25-internal/javafx.scene.Node.getLocalBounds(Node.java:3833) at javafx.graphics@25-internal/javafx.scene.Node.updateTxBounds(Node.java:3987) at javafx.graphics@25-internal/javafx.scene.Node.getTransformedBounds(Node.java:3779) at javafx.graphics@25-internal/javafx.scene.Node.updateBounds(Node.java:843) at javafx.graphics@25-internal/javafx.scene.Parent.updateBounds(Parent.java:1903) at javafx.graphics@25-internal/javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2688) at javafx.graphics@25-internal/com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:380) at javafx.graphics@25-internal/com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:401) at javafx.graphics@25-internal/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:592) at javafx.graphics@25-internal/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:572) at javafx.graphics@25-internal/com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:565) at javafx.graphics@25-internal/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$0(QuantumToolkit.java:346) at javafx.graphics@25-internal/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at javafx.graphics@25-internal/com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at javafx.graphics@25-internal/com.sun.glass.ui.win.WinApplication.lambda$runLoop$0(WinApplication.java:168) at java.base/java.lang.Thread.run(Thread.java:1447) ------------- PR Comment: https://git.openjdk.org/jfx/pull/1605#issuecomment-2966145323