Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8046564

REGRESSION:NPE in getActiveWindowHandles

XMLWordPrintable

    • x86
    • windows_7

      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).

            serb Sergey Bylokhov
            tyao Ting-Yun Ingrid Yao (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: