JDK-8221987 : NPE in javafx.graphics/javafx.stage.Window$TKBoundsConfigurator.apply
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: openjfx11
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: os_x
  • CPU: x86
  • Submitted: 2019-03-15
  • Updated: 2019-04-23
  • Resolved: 2019-04-16
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
openjfx13Fixed
Description
A DESCRIPTION OF THE PROBLEM :
In "javafx.graphics/javafx.stage.Window$TKBoundsConfigurator.apply(...)" is missing the check that the peer is Null for the call "peer.setBounds(...);"
I run in situations where the peer is Null.

Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
	at javafx.graphics/javafx.stage.Window$TKBoundsConfigurator.apply(Window.java:1550)
	at javafx.graphics/javafx.stage.Window$TKBoundsConfigurator.pulse(Window.java:1559)
	at javafx.graphics/com.sun.javafx.tk.Toolkit.lambda$runPulse$2(Toolkit.java:412)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at javafx.graphics/com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:411)
	at javafx.graphics/com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:435)
	at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:562)
	at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:542)
	at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:535)
	at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:341)
	at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Use org.controlsfx.samples.HelloNotifications from https://github.com/controlsfx/controlsfx/blob/master/controlsfx-samples/src/main/java/org/controlsfx/samples/HelloNotifications.java and press very frequent on "Top-right notification" then the NPE will occur. It is independent of the os. We tested it on windows and mac.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The NPE should not occur in in javafx.graphics/javafx.stage.Window$TKBoundsConfigurator.apply(...).
ACTUAL -
The NPE occurred.

CUSTOMER SUBMITTED WORKAROUND :
No workaround known at the moment.

FREQUENCY : often



Comments
Changeset: bdf63f7632c1 Author: arapte Date: 2019-04-16 14:11 +0530 URL: http://hg.openjdk.java.net/openjfx/jfx-dev/rt/rev/bdf63f7632c1 8221987: NPE in javafx.graphics/javafx.stage.Window$TKBoundsConfigurator.apply Reviewed-by: kcr, arapte Contributed-by: christian.heilmann@zeiss.com
16-04-2019

GitHub review is underway: https://github.com/javafxports/openjdk-jfx/pull/431
05-04-2019