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

CAccessibility throws null pointer at line 626

XMLWordPrintable

      FULL PRODUCT VERSION :
      java version "1.8.0_45"
      Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
      Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Darwin macpro 14.3.0 Darwin Kernel Version 14.3.0: Mon Mar 23 11:59:05 PDT 2015; root:xnu-2782.20.48~5/RELEASE_X86_64 x86_64

      A DESCRIPTION OF THE PROBLEM :
      CAccessibility in the package sun.lwawt.macosx does not check for null when getting JAVA_AX_VISIBLE_CHILDREN. It does not seem to consider that context.getAccessibleComponent() could return null, so the stack trace and such is getting spammed to the log.
      I suspect that this will happen with ac.getAccessibleSelection() as well on line 628

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      No Null pointer exception
      ACTUAL -
      Null pointer exception

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      java.lang.NullPointerException
      at sun.lwawt.macosx.CAccessibility._addChildren(CAccessibility.java:626)
      at sun.lwawt.macosx.CAccessibility.access$000(CAccessibility.java:38)
      at sun.lwawt.macosx.CAccessibility$33.call(CAccessibility.java:571)
      at sun.lwawt.macosx.CAccessibility$33.call(CAccessibility.java:568)
      at sun.lwawt.macosx.LWCToolkit$CallableWrapper.run(LWCToolkit.java:598)
      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:301)
      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
      at java.awt.EventQueue.access$500(EventQueue.java:97)
      at java.awt.EventQueue$3.run(EventQueue.java:709)
      at java.awt.EventQueue$3.run(EventQueue.java:703)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
      at java.awt.EventQueue$4.run(EventQueue.java:731)
      at java.awt.EventQueue$4.run(EventQueue.java:729)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
      at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

      REPRODUCIBILITY :
      This bug can be reproduced always.

            ptbrunet Pete Brunet (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: