Details
-
Bug
-
Status: Resolved
-
P4
-
Resolution: Fixed
-
jfx11, 8, 9, 10
-
x86_64
-
generic
Description
FULL PRODUCT VERSION :
1.8.0_111 32-Bit
ADDITIONAL OS VERSION INFORMATION :
Windows 7 SP1 32 Bit
A DESCRIPTION OF THE PROBLEM :
In our JavaFX-application´s log we found the following Exception:
java.lang.NullPointerException
at
com.sun.javafx.tk.quantum.WindowStage.setPlatformEnabled(WindowStage.java:840)
at
com.sun.javafx.tk.quantum.GlassStage.windowsSetEnabled(GlassStage.java:171)
at
com.sun.javafx.tk.quantum.WindowStage.setVisible(WindowStage.java:488)
at javafx.stage.Window$9.invalidated(Window.java:872)
at
javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:109)
at
javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:144)
at javafx.stage.Window.setShowing(Window.java:922)
at javafx.stage.Window.hide(Window.java:947)
This NPE indicates that the value for the platformWindow field in the WindowStage instance is null.
There are many places in the WindowsStage´s code where a Null-value of platformWindow is checked. At the line where the NPE occurs there is no check. In this situation (closing a modal window and therefore enabling _all_ other windows) it is quite likely that some windows with unclear state also might be accessed. So I wonder why there is no null-pointer-check at this place.
In other places there explicit comments like "platformWindow can be null here, if this window is owned, and its owner is being closed."
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
this bug is not reproducible. Probably this occurs due to a rare timing problem or a special user action in a complex application (about 400 forms)
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
no Exception when closing a window
ERROR MESSAGES/STACK TRACES THAT OCCUR :
java.lang.NullPointerException
at
com.sun.javafx.tk.quantum.WindowStage.setPlatformEnabled(WindowStage.java:840)
at
com.sun.javafx.tk.quantum.GlassStage.windowsSetEnabled(GlassStage.java:171)
at
com.sun.javafx.tk.quantum.WindowStage.setVisible(WindowStage.java:488)
at javafx.stage.Window$9.invalidated(Window.java:872)
at
javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:109)
at
javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:144)
at javafx.stage.Window.setShowing(Window.java:922)
at javafx.stage.Window.hide(Window.java:947)
REPRODUCIBILITY :
This bug can be reproduced occasionally.
1.8.0_111 32-Bit
ADDITIONAL OS VERSION INFORMATION :
Windows 7 SP1 32 Bit
A DESCRIPTION OF THE PROBLEM :
In our JavaFX-application´s log we found the following Exception:
java.lang.NullPointerException
at
com.sun.javafx.tk.quantum.WindowStage.setPlatformEnabled(WindowStage.java:840)
at
com.sun.javafx.tk.quantum.GlassStage.windowsSetEnabled(GlassStage.java:171)
at
com.sun.javafx.tk.quantum.WindowStage.setVisible(WindowStage.java:488)
at javafx.stage.Window$9.invalidated(Window.java:872)
at
javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:109)
at
javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:144)
at javafx.stage.Window.setShowing(Window.java:922)
at javafx.stage.Window.hide(Window.java:947)
This NPE indicates that the value for the platformWindow field in the WindowStage instance is null.
There are many places in the WindowsStage´s code where a Null-value of platformWindow is checked. At the line where the NPE occurs there is no check. In this situation (closing a modal window and therefore enabling _all_ other windows) it is quite likely that some windows with unclear state also might be accessed. So I wonder why there is no null-pointer-check at this place.
In other places there explicit comments like "platformWindow can be null here, if this window is owned, and its owner is being closed."
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
this bug is not reproducible. Probably this occurs due to a rare timing problem or a special user action in a complex application (about 400 forms)
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
no Exception when closing a window
ERROR MESSAGES/STACK TRACES THAT OCCUR :
java.lang.NullPointerException
at
com.sun.javafx.tk.quantum.WindowStage.setPlatformEnabled(WindowStage.java:840)
at
com.sun.javafx.tk.quantum.GlassStage.windowsSetEnabled(GlassStage.java:171)
at
com.sun.javafx.tk.quantum.WindowStage.setVisible(WindowStage.java:488)
at javafx.stage.Window$9.invalidated(Window.java:872)
at
javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:109)
at
javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:144)
at javafx.stage.Window.setShowing(Window.java:922)
at javafx.stage.Window.hide(Window.java:947)
REPRODUCIBILITY :
This bug can be reproduced occasionally.