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

javax/swing/text/html/StyleSheet/8260687/BodyInheritedFontSize.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: 18
    • Fix Version/s: 18
    • Component/s: client-libs
    • Labels:

      Description

      The following test failed in the JDK18 CI:

      javax/swing/text/html/StyleSheet/8260687/BodyInheritedFontSize.java

      Here's a snippet from the log file

      #section:main
      ----------messages:(5/204)----------
      command: main BodyInheritedFontSize
      reason: User specified action: run main BodyInheritedFontSize
      Mode: othervm
      Additional options from @modules: --add-modules java.desktop
      elapsed time (seconds): 2.591
      ----------configuration:(3/40)----------
      Boot Layer
        add modules: java.desktop

      ----------System.out:(0/0)----------
      ----------System.err:(69/5501)----------
      java.lang.reflect.InvocationTargetException
      at java.desktop/java.awt.EventQueue.invokeAndWait(EventQueue.java:1371)
      at java.desktop/java.awt.EventQueue.invokeAndWait(EventQueue.java:1346)
      at java.desktop/javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1480)
      at BodyInheritedFontSize.main(BodyInheritedFontSize.java:96)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:76)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:51)
      at java.base/java.lang.reflect.Method.invoke(Method.java:569)
      at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
      at java.base/java.lang.Thread.run(Thread.java:833)
      Caused by: 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:529)
      at java.desktop/java.awt.Font$FontAccessImpl.getFont2D(Font.java:265)
      at java.desktop/sun.font.FontUtilities.getFont2D(FontUtilities.java:151)
      at java.desktop/sun.font.FontUtilities.fontSupportsDefaultEncoding(FontUtilities.java:342)
      at java.desktop/javax.swing.text.StyleContext.getFont(StyleContext.java:284)
      at java.desktop/javax.swing.text.html.CSS.getFont(CSS.java:916)
      at java.desktop/javax.swing.text.html.StyleSheet.getFont(StyleSheet.java:914)
      at java.desktop/javax.swing.text.DefaultStyledDocument.getFont(DefaultStyledDocument.java:947)
      at java.desktop/javax.swing.text.LabelView.setPropertiesFromAttributes(LabelView.java:145)
      at java.desktop/javax.swing.text.html.InlineView.setPropertiesFromAttributes(InlineView.java:187)
      at java.desktop/javax.swing.text.LabelView.sync(LabelView.java:56)
      at java.desktop/javax.swing.text.LabelView.getFont(LabelView.java:209)
      at java.desktop/javax.swing.text.GlyphPainter1.sync(GlyphPainter1.java:224)
      at java.desktop/javax.swing.text.GlyphPainter1.getSpan(GlyphPainter1.java:59)
      at java.desktop/javax.swing.text.GlyphView.getPreferredSpan(GlyphView.java:585)
      at java.desktop/javax.swing.text.FlowView$LogicalView.getPreferredSpan(FlowView.java:753)
      at java.desktop/javax.swing.text.FlowView.calculateMinorAxisRequirements(FlowView.java:241)
      at java.desktop/javax.swing.text.ParagraphView.calculateMinorAxisRequirements(ParagraphView.java:710)
      at java.desktop/javax.swing.text.html.ParagraphView.calculateMinorAxisRequirements(ParagraphView.java:162)
      at java.desktop/javax.swing.text.BoxView.checkRequests(BoxView.java:936)
      at java.desktop/javax.swing.text.BoxView.getMinimumSpan(BoxView.java:569)
      at java.desktop/javax.swing.text.html.ParagraphView.getMinimumSpan(ParagraphView.java:275)
      at java.desktop/javax.swing.text.BoxView.calculateMinorAxisRequirements(BoxView.java:904)
      at java.desktop/javax.swing.text.html.BlockView.calculateMinorAxisRequirements(BlockView.java:146)
      at java.desktop/javax.swing.text.BoxView.checkRequests(BoxView.java:936)
      at java.desktop/javax.swing.text.BoxView.getMinimumSpan(BoxView.java:569)
      at java.desktop/javax.swing.text.html.BlockView.getMinimumSpan(BlockView.java:378)
      at java.desktop/javax.swing.text.BoxView.calculateMinorAxisRequirements(BoxView.java:904)
      at java.desktop/javax.swing.text.html.BlockView.calculateMinorAxisRequirements(BlockView.java:146)
      at java.desktop/javax.swing.text.BoxView.checkRequests(BoxView.java:936)
      at java.desktop/javax.swing.text.BoxView.setSpanOnAxis(BoxView.java:344)
      at java.desktop/javax.swing.text.BoxView.layout(BoxView.java:709)
      at java.desktop/javax.swing.text.BoxView.setSize(BoxView.java:398)
      at java.desktop/javax.swing.plaf.basic.BasicTextUI$RootView.setSize(BasicTextUI.java:1826)
      at java.desktop/javax.swing.plaf.basic.BasicTextUI.getPreferredSize(BasicTextUI.java:951)
      at java.desktop/javax.swing.JComponent.getPreferredSize(JComponent.java:1735)
      at java.desktop/javax.swing.JEditorPane.getPreferredSize(JEditorPane.java:1401)
      at BodyInheritedFontSize.createEditorPane(BodyInheritedFontSize.java:85)
      at BodyInheritedFontSize.lambda$main$0(BodyInheritedFontSize.java:98)
      at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:308)
      at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
      at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
      at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
      at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
      at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
      at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
      at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
      at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
      at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
      at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
      at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
      at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

      JavaTest Message: Test threw exception: java.lang.reflect.InvocationTargetException
      JavaTest Message: shutting down test

      STATUS:Failed.`main' threw exception: java.lang.reflect.InvocationTargetException
      ----------rerun:(36/5705)*----------

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              psadhukhan Prasanta Sadhukhan
              Reporter:
              dcubed Daniel Daugherty
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: