JDK-8211435 : Exception in thread "AWT-EventQueue-1" java.lang.IllegalArgumentException: null source
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7,8u144,11,12
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-10-03
  • Updated: 2019-09-04
  • Resolved: 2018-11-11
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.
JDK 11 JDK 12 Other
11.0.2Fixed 12 b20Fixed openjdk7uFixed
Related Reports
Relates :  
Description
In the DefaultKeyboardFocusManager class we have a special field "activeWindow", which stores the currently active window. It is used in two similar cases:
  1. If the java window gets "WINDOW_ACTIVATED" event it will try to send "WINDOW_DEACTIVATED" to the old active window, which is stored in the "activeWindow" field.
  2. If the java component lost the focus, and the opposite component is not a java component, then it will try to send "WINDOW_DEACTIVATED" to the old active window, which is stored in the "activeWindow" field.

The difference in these two cases is that in "case 1" we check the old active window to null[1], and the second case has no such check. The bug is reproduced in non-standalone mode, when we have a few Appcontexts and this field might be updated by different EDT in parallel.

Note that the test is for OSX only, because of another bug: JDK-8204142[2]

[1] http://hg.openjdk.java.net/jdk/jdk/file/ad9077f044be/src/java.desktop/share/classes/java/awt/DefaultKeyboardFocusManager.java#l527
[2] https://bugs.openjdk.java.net/browse/JDK-8204142

Comments
Fix Request JDK-8 is also affected by this bug. See [1]. [1] - https://bugs.openjdk.java.net/browse/JDK-8211435?focusedCommentId=14246527&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14246527
22-02-2019

Fix Request This bug affects JDK-11. The backport of JDK-8204142 may increase the probability of occurrence. Backport was trivial. The risk introduced by this fix is very low because it's just replicating the same logic on an uncovered path (see description above). There is a regression test which I enabled for all platforms.
20-02-2019

Pending 11u and 8u back ports
11-11-2018

I am able to reproduce the bug using custom stress test.
18-10-2018