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

[macos] NullPointerException originating from LWCToolkit.java

    XMLWordPrintable

    Details

      Description

      ADDITIONAL SYSTEM INFORMATION :
      Mac OS Big Sur/Java 15

      A DESCRIPTION OF THE PROBLEM :
      With a complex Swing application running on Mac with Java 15, sometimes I find in the console this stack trace:

      java.lang.NullPointerException: Null component provided to invokeAndWait
      at java.base/java.util.Objects.requireNonNull(Objects.java:233)
      at java.desktop/sun.lwawt.macosx.LWCToolkit.invokeAndWait(LWCToolkit.java:705)
      at java.desktop/sun.lwawt.macosx.LWCToolkit.invokeAndWait(LWCToolkit.java:667)
      at java.desktop/sun.lwawt.macosx.CAccessibility.invokeAndWait(CAccessibility.java:119)
      at java.desktop/sun.lwawt.macosx.CAccessibility.getAccessibleComponent(CAccessibility.java:326)
      at java.desktop/sun.lwawt.macosx.LWCToolkit.doAWTRunLoopImpl(Native Method)
      at java.desktop/sun.lwawt.macosx.LWCToolkit.doAWTRunLoop(LWCToolkit.java:920)
      at java.desktop/sun.lwawt.macosx.LWCToolkit.invokeAndWait(LWCToolkit.java:722)
      at java.desktop/sun.lwawt.macosx.LWCToolkit.invokeAndWait(LWCToolkit.java:667)
      at java.desktop/sun.lwawt.macosx.CAccessibility.invokeAndWait(CAccessibility.java:119)
      at java.desktop/sun.lwawt.macosx.CAccessibility.getFocusOwner(CAccessibility.java:612)

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Not sure, probably moving the keyboard focus between various components causes this.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      I have not found a problem, it's just that the stack trace appears.
      ACTUAL -
      The stack trace should not appear.

      ---------- BEGIN SOURCE ----------
      I'm afraid I do not have a sample source code to consistently reproduce this.
      ---------- END SOURCE ----------

      FREQUENCY : rarely


        Attachments

          Issue Links

            Activity

              People

              Assignee:
              kizune Alexander Zuev
              Reporter:
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: