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

javax/swing/Headless/HeadlessJTabbedPane.java failed with 'NullPointerException: Cannot read field "handle" because the return value of "sun.font.FontManager.findFont2D(String, int, int)" is null'

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 16
    • Fix Version/s: None
    • Component/s: client-libs

      Description

      The following test failed in the JDK16 CI:

      javax/swing/Headless/HeadlessJTabbedPane.java

      Here's a snippet from the log file:

      #section:main
      ----------messages:(5/279)----------
      command: main -Djava.awt.headless=true HeadlessJTabbedPane
      reason: User specified action: run main/othervm -Djava.awt.headless=true HeadlessJTabbedPane
      Mode: othervm [/othervm specified]
      Additional options from @modules: --add-modules java.desktop
      elapsed time (seconds): 1.441
      ----------configuration:(3/40)----------
      Boot Layer
        add modules: java.desktop

      ----------System.out:(0/0)----------
      ----------System.err:(33/3457)----------
      Warning: the fonts "Lucida Grande" and "Lucida Grande" are not available for the Java logical font "Dialog", which may have unexpected appearance or behavior. Re-enable the "Lucida Grande" font to remove this warning.
      Warning: the fonts "Times" and "Times" are not available for the Java logical font "Serif", which may have unexpected appearance or behavior. Re-enable the "Times" font to remove this warning.
      Warning: the fonts "Lucida Grande" and "Lucida Grande" are not available for the Java logical font "SansSerif", which may have unexpected appearance or behavior. Re-enable the "Lucida Grande" font to remove this warning.
      Warning: the fonts "Menlo" and "Courier" are not available for the Java logical font "Monospaced", which may have unexpected appearance or behavior. Re-enable the "Menlo" font to remove this warning.
      Warning: the fonts "Lucida Grande" and "Lucida Grande" are not available for the Java logical font "DialogInput", which may have unexpected appearance or behavior. Re-enable the "Lucida Grande" font to remove this warning.
      java.lang.NullPointerException: Cannot read field "handle" because the return value of "sun.font.FontManager.findFont2D(String, int, int)" is null
      at java.desktop/java.awt.Font.getFont2D(Font.java:527)
      at java.desktop/java.awt.Font$FontAccessImpl.getFont2D(Font.java:264)
      at java.desktop/sun.font.FontUtilities.getFont2D(FontUtilities.java:147)
      at java.desktop/sun.font.FontDesignMetrics.initMatrixAndMetrics(FontDesignMetrics.java:354)
      at java.desktop/sun.font.FontDesignMetrics.<init>(FontDesignMetrics.java:347)
      at java.desktop/sun.font.FontDesignMetrics.getMetrics(FontDesignMetrics.java:299)
      at java.desktop/sun.swing.SwingUtilities2.getFontMetrics(SwingUtilities2.java:1243)
      at java.desktop/javax.swing.JComponent.getFontMetrics(JComponent.java:1646)
      at java.desktop/javax.swing.plaf.basic.BasicTabbedPaneUI.getFontMetrics(BasicTabbedPaneUI.java:2140)
      at java.desktop/javax.swing.plaf.basic.BasicTabbedPaneUI.calculateMaxTabWidth(BasicTabbedPaneUI.java:2054)
      at java.desktop/javax.swing.plaf.basic.BasicTabbedPaneUI$TabbedPaneLayout.calculateSize(BasicTabbedPaneUI.java:2732)
      at java.desktop/javax.swing.plaf.basic.BasicTabbedPaneUI$TabbedPaneLayout.preferredLayoutSize(BasicTabbedPaneUI.java:2675)
      at java.desktop/java.awt.Container.preferredSize(Container.java:1824)
      at java.desktop/java.awt.Container.getPreferredSize(Container.java:1808)
      at java.desktop/javax.swing.JComponent.getPreferredSize(JComponent.java:1682)
      at HeadlessJTabbedPane.main(HeadlessJTabbedPane.java:44)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:564)
      at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
      at java.base/java.lang.Thread.run(Thread.java:832)

      JavaTest Message: Test threw exception: java.lang.NullPointerException: Cannot read field "handle" because the return value of "sun.font.FontManager.findFont2D(String, int, int)" is null
      JavaTest Message: shutting down test

      STATUS:Failed.`main' threw exception: java.lang.NullPointerException: Cannot read field "handle" because the return value of "sun.font.FontManager.findFont2D(String, int, int)" is null
      ----------rerun:(38/5657)*----------

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              prr Philip Race
              Reporter:
              dcubed Daniel Daugherty
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: