-
Bug
-
Resolution: Incomplete
-
P4
-
None
-
8u202
-
x86_64
-
linux
A DESCRIPTION OF THE PROBLEM :
Similar toJDK-8208266 and JDK-8186280. The stack trace is the same.
We have done extensive investigation apart from doing a deep inspection of the JavaFX library code. It is highly likely the exception arises related to a finalizer call.
1. The exception occurs soon after garbage collection
2. When the exception occurs, there's a pause in logging that happens continously, suggesting it's from a stop-the-world event
3. The exception occurs where we don't call methods that are known to produce side effects on the GUI objects
4. It may be related to this earlier change: https://bugs.openjdk.java.net/browse/JDK-8096057
5. We tried to work around the issue by timing System.gc calls, hoping to avoid race conditions at specific times, but then we notice a change in the timings of the occurrence of the NPE, so it appears the problem is indeed highly correlated with garbage collection, and most probably finalizer calls.
It also appears to be independent of OS type, and happens across a wide range of Java release versions.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Although we use "often" as the frequency, this is when we have a large user base and the issue occurs fairly randomly. It may be difficult to reproduce using a small program.
CUSTOMER SUBMITTED WORKAROUND :
We have tried timing System.gc() to avoid possible race conditions with the processing in the application thread, but it only changes the timing of the NPE, with little apparent change in the frequency.
FREQUENCY : often
Similar to
We have done extensive investigation apart from doing a deep inspection of the JavaFX library code. It is highly likely the exception arises related to a finalizer call.
1. The exception occurs soon after garbage collection
2. When the exception occurs, there's a pause in logging that happens continously, suggesting it's from a stop-the-world event
3. The exception occurs where we don't call methods that are known to produce side effects on the GUI objects
4. It may be related to this earlier change: https://bugs.openjdk.java.net/browse/JDK-8096057
5. We tried to work around the issue by timing System.gc calls, hoping to avoid race conditions at specific times, but then we notice a change in the timings of the occurrence of the NPE, so it appears the problem is indeed highly correlated with garbage collection, and most probably finalizer calls.
It also appears to be independent of OS type, and happens across a wide range of Java release versions.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Although we use "often" as the frequency, this is when we have a large user base and the issue occurs fairly randomly. It may be difficult to reproduce using a small program.
CUSTOMER SUBMITTED WORKAROUND :
We have tried timing System.gc() to avoid possible race conditions with the processing in the application thread, but it only changes the timing of the NPE, with little apparent change in the frequency.
FREQUENCY : often