JDK-8046564 : REGRESSION:NPE in getActiveWindowHandles
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 9
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_7
  • CPU: x86
  • Submitted: 2014-06-11
  • Updated: 2014-09-26
  • Resolved: 2014-06-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 9
9Resolved
Related Reports
Duplicate :  
Description
With Java 9 we see the follow NPE in the Java Console if we open a new
window. With Java 8 all is ok.

java.lang.NullPointerException
    at sun.awt.windows.WWindowPeer.getActiveWindowHandles(Unknown Source)
    at sun.awt.windows.WToolkit.eventLoop(Native Method)
    at sun.awt.windows.WToolkit.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

A follow up error is:
Exception in thread "AWT-EventQueue-2"
java.awt.IllegalComponentStateException: component must be showing on
the screen to determine its location
    at java.awt.Component.getLocationOnScreen_NoTreeLock(Unknown Source)
    at java.awt.Component.getLocationOnScreen(Unknown Source)
    at
com.inet.looks.plastic.PlasticRootPaneUI$MouseInputHandler.mouseDragged(PlasticRootPaneUI.java:814)
    at java.awt.Component.processMouseMotionEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Window.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$400(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown
Source)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown
Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown
Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)

Our simple code is:
        public void mouseDragged( MouseEvent ev ) {
            Window w = (Window)ev.getSource();
            Point windowPt = w.getLocationOnScreen();
            ...
        }


Java Web Start 12.0.2.12
JRE-Version verwenden 1.9.0-ea-b12 Java HotSpot(TM) Client VM

Steps to reproduce the problem:

1) go to URL: http://helpdesk.inetsoftware.de/jnlp

2) In the last line of the Java console you see where the console output is redirected. It is a file HelpdeskClient.txt in the temp directory.

3) Press the "Search Requests" button in the toolbar. The dialog you can close with the "Cancel" button. The dialog does not close with Java 9,  but a NPE is showing in the console (in file HelpdeskClient.txt).


Comments
Can still be reproduced in JDK 9 b16, it might not be the same problem as JDK8041896.
11-06-2014