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

NPE at com.sun.glass.ui.Screen.initScreens(Screen.java:412)

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      os_x

      Description

      ADDITIONAL SYSTEM INFORMATION :
      MacOSX 10.15.5
      'AdoptOpenJDK' URL 'https://adoptopenjdk.net/' Version '11.0.7'

      A DESCRIPTION OF THE PROBLEM :
      We have had a few reports of the following bug:

      java.lang.NullPointerException
      at com.sun.glass.ui.Screen.initScreens(Screen.java:412)
      at com.sun.glass.ui.Screen.notifySettingsChanged(Screen.java:381)

      I can't reproduce this locally.

      It looks as if Application.application is null on line 412 of Screen.initScreens().

      Looking at the code, I'm wondering if there is a possibility to get a Screen.notifySettingsChanged native callback from the Mac (which calls initScreens) while Application.run line 144 is initialising the MacApplication.

      This is the line that creates that MacAppliation and assigns it to the Application.application member variable.

      Note however that MacApplication has a static block which loads the native glass library which could possibly send back screen change notifications before MacApplication is fully constructed.
      Just a thought.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Can't reliably reproduce but many customers have experienced this issue.


      FREQUENCY : occasionally


        Attachments

          Activity

            People

            Assignee:
            pnarayanaswa Praveen Narayanaswamy
            Reporter:
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: