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

[Mac,Font] NPE in MacFontFinder.populateFontFileNameMap

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8
    • Fix Version/s: 10
    • Component/s: javafx
    • Environment:

      Mac OS X 10.10 and 10.9.5
      Java 8u25

      Description

      Unfortunately we can't reproduce this bug locally but we have had various customer reports of our app not starting due to a NULL pointer exception in com.sun.javafx.font.MacFontFinder.populateFontFileNameMap(MacFontFinder.java:99).

      This seems to occur on the Mac when they have updated to java 8u25 from java 7.
      The users have seen this issue when using both Mac OS X 10.10 and 10.9.5.
      Interestingly both users seemed to have Microsoft Office fonts installed.

      One user resolved the issue by "Restoring Standard Fonts" in the Font Book application.

      We got the customer to enable font debug by running -Dprism.debugfonts=true.

      I’ve attached the stack trace and the output with the prism.debugfonts set to true.

      From what I can tell, it seems to be due to a call to JFXPanel.setScene during the app startup process.

      Looking at the source code of MacFontFinder, it seems that the call to getFontData() at line 74 contains a null string in the list it returns when it is towards the end of the list. At line 99 there is no null check when it calls toLowerCase on this returned string.

      Thanks

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                prr Philip Race
                Reporter:
                dgonzalezjfx Daniel Gonzalez (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: