-
Bug
-
Resolution: Duplicate
-
P4
-
16, 17
-
x86_64
-
os_x
The following test failed in the JDK16 CI:
javax/swing/Headless/HeadlessJCheckBoxMenuItem.java
Here's a snippet from the log file:
#section:main
----------messages:(5/291)----------
command: main -Djava.awt.headless=true HeadlessJCheckBoxMenuItem
reason: User specified action: run main/othervm -Djava.awt.headless=true HeadlessJCheckBoxMenuItem
Mode: othervm [/othervm specified]
Additional options from @modules: --add-modules java.desktop
elapsed time (seconds): 2.338
----------configuration:(3/40)----------
Boot Layer
add modules: java.desktop
----------System.out:(0/0)----------
----------System.err:(29/2856)----------
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 "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 "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/sun.swing.MenuItemLayoutHelper.reset(MenuItemLayoutHelper.java:125)
at java.desktop/sun.swing.MenuItemLayoutHelper.<init>(MenuItemLayoutHelper.java:107)
at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI.getPreferredMenuItemSize(BasicMenuItemUI.java:563)
at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI.getPreferredSize(BasicMenuItemUI.java:504)
at java.desktop/javax.swing.JComponent.getPreferredSize(JComponent.java:1680)
at HeadlessJCheckBoxMenuItem.main(HeadlessJCheckBoxMenuItem.java:45)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
at java.base/java.lang.Thread.run(Thread.java:831)
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/5177)*----------
javax/swing/Headless/HeadlessJCheckBoxMenuItem.java
Here's a snippet from the log file:
#section:main
----------messages:(5/291)----------
command: main -Djava.awt.headless=true HeadlessJCheckBoxMenuItem
reason: User specified action: run main/othervm -Djava.awt.headless=true HeadlessJCheckBoxMenuItem
Mode: othervm [/othervm specified]
Additional options from @modules: --add-modules java.desktop
elapsed time (seconds): 2.338
----------configuration:(3/40)----------
Boot Layer
add modules: java.desktop
----------System.out:(0/0)----------
----------System.err:(29/2856)----------
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 "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 "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/sun.swing.MenuItemLayoutHelper.reset(MenuItemLayoutHelper.java:125)
at java.desktop/sun.swing.MenuItemLayoutHelper.<init>(MenuItemLayoutHelper.java:107)
at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI.getPreferredMenuItemSize(BasicMenuItemUI.java:563)
at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI.getPreferredSize(BasicMenuItemUI.java:504)
at java.desktop/javax.swing.JComponent.getPreferredSize(JComponent.java:1680)
at HeadlessJCheckBoxMenuItem.main(HeadlessJCheckBoxMenuItem.java:45)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
at java.base/java.lang.Thread.run(Thread.java:831)
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/5177)*----------
- duplicates
-
JDK-8253120 [macos] intermittent failures to locate system fonts in headless testing.
- Open
- relates to
-
JDK-8253120 [macos] intermittent failures to locate system fonts in headless testing.
- Open