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

Intermittent font loading failure on macOS with JFXPanel application

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 9
    • 8u40, 9
    • client-libs
    • 9 b134, osx

    • 2d
    • b150
    • os_x

    Description

      Swing frame that contains JFXPanel (the project is attached) is not shown stochastically (50%) probably due to the fonts loading problems:

      "AWT-EventQueue-0"
      at sun.font.CFontManager.loadNativeDirFonts(CFontManager.java)
      at sun.font.CFontManager.registerFontsInDir(CFontManager.java:145)
      at sun.font.SunFontManager$2.run(SunFontManager.java:426)
      at java.security.AccessController.doPrivileged(AccessController.java)
      at sun.font.SunFontManager.<init>(SunFontManager.java:377)
      at sun.font.CFontManager.<init>(CFontManager.java:46)
      at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(NativeConstructorAccessorImpl.java)
      at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:455)
      at java.lang.Class.newInstance(Class.java:565)
      at sun.font.FontManagerFactory$1.run(FontManagerFactory.java:83)
      at java.security.AccessController.doPrivileged(AccessController.java)
      at sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:74)
      at sun.font.SunFontManager.getInstance(SunFontManager.java:251)
      at sun.font.FontDesignMetrics.getMetrics(FontDesignMetrics.java:264)
      at sun.swing.SwingUtilities2.getFontMetrics(SwingUtilities2.java:1055)
      at javax.swing.JComponent.getFontMetrics(JComponent.java:1644)
      at javax.swing.plaf.basic.BasicGraphicsUtils.getPreferredButtonSize(BasicGraphicsUtils.java:351)
      at com.apple.laf.AquaButtonUI.getPreferredSize(AquaButtonUI.java:443)
      at com.apple.laf.AquaButtonUI.getMinimumSize(AquaButtonUI.java:431)
      at javax.swing.JComponent.getMinimumSize(JComponent.java:1758)
      at javax.swing.BoxLayout.checkRequests(BoxLayout.java:478)
      at javax.swing.BoxLayout.layoutContainer(BoxLayout.java:420)
      at java.awt.Container.layout(Container.java:1533)
      at java.awt.Container.doLayout(Container.java:1522)
      at java.awt.Container.validateTree(Container.java:1718)
      at java.awt.Container.validateTree(Container.java:1727)
      at java.awt.Container.validateTree(Container.java:1727)
      at java.awt.Container.validateTree(Container.java:1727)
      at java.awt.Container.validate(Container.java:1653)
      at java.awt.Container.validateUnconditionally(Container.java:1690)
      at java.awt.Window.show(Window.java:1032)
      at java.awt.Component.show(Component.java:1693)
      at java.awt.Component.setVisible(Component.java:1640)
      at java.awt.Window.setVisible(Window.java:1013)
      at app.App.<init>(App.java:144)
      at app.App$7.run(App.java:221)
      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:759)
      at java.awt.EventQueue.access$500(EventQueue.java:97)
      at java.awt.EventQueue$3.run(EventQueue.java:712)
      at java.awt.EventQueue$3.run(EventQueue.java:706)
      at java.security.AccessController.doPrivileged(AccessController.java)
      at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:77)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:729)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:199)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
      "AWT-Shutdown"
      at java.lang.Object.wait(Object.java)
      at java.lang.Object.wait(Object.java:516)
      at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:291)
      at java.lang.Thread.run(Thread.java:843)
      "Common-Cleaner"
      at java.lang.Object.wait(Object.java)
      at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:151)
      at jdk.internal.ref.CleanerImpl.run(CleanerImpl.java:148)
      at java.lang.Thread.run(Thread.java:843)
      at jdk.internal.misc.InnocuousThread.run(InnocuousThread.java:122)
      "Finalizer"
      at java.lang.Object.wait(Object.java)
      at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:151)
      at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:172)
      at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:216)
      "FX Access Thread (Visual Debugger)"
      at java.lang.Thread.sleep(Thread.java)
      at org.netbeans.modules.debugger.jpda.visual.remote.RemoteFXService$FXAccessLoop.run(RemoteFXService.java:133)
      "InvokeLaterDispatcher"
      at java.lang.Object.wait(Object.java)
      at java.lang.Object.wait(Object.java:516)
      at com.sun.glass.ui.InvokeLaterDispatcher.run(InvokeLaterDispatcher.java:127)at java.lang.Thread.run(Thread.java:843)
      "Java2D Disposer"
      at java.lang.Object.wait(Object.java)
      at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:151)
      at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:172)
      at sun.java2d.Disposer.run(Disposer.java:144)
      at java.lang.Thread.run(Thread.java:843)
      "Java2D Queue Flusher"
      at java.lang.Object.wait(Object.java)
      at sun.java2d.opengl.OGLRenderQueue$QueueFlusher.run(OGLRenderQueue.java:205)
      at java.lang.Thread.run(Thread.java:843)
      "JavaFX Application Thread"
      at com.sun.javafx.font.coretext.OS.CTFontManagerRegisterFontsForURL(OS.java)
      at com.sun.javafx.font.coretext.CTFontFile.registerFont(CTFontFile.java:58)
      at com.sun.javafx.font.coretext.CTFactory.registerEmbeddedFont(CTFactory.java:56)
      at com.sun.javafx.font.PrismFontFactory.populateFontFileNameMapGeneric(PrismFontFactory.java:1933)
      at com.sun.javafx.font.PrismFontFactory.getFullNameToFileMap(PrismFontFactory.java:1835)
      at com.sun.javafx.font.PrismFontFactory.getFontResource(PrismFontFactory.java:494)
      at com.sun.javafx.font.LogicalFont.getSlot0Resource(LogicalFont.java:194)
      at com.sun.javafx.font.LogicalFont.getDefaultAAMode(LogicalFont.java:409)
      at com.sun.javafx.font.LogicalFont.getStrike(LogicalFont.java:413)
      at com.sun.javafx.font.PrismFont.getStrike(PrismFont.java:73)
      at com.sun.javafx.text.PrismTextLayout.setContent(PrismTextLayout.java:137)
      at javafx.scene.text.Text.getTextLayout(Text.java:278)
      at javafx.scene.text.Text.needsFullTextLayout(Text.java:233)
      at javafx.scene.text.Text.access$900(Text.java:104)
      at javafx.scene.text.Text$3.invalidated(Text.java:438)
      at javafx.beans.property.StringPropertyBase.markInvalid(StringPropertyBase.java:110)
      at javafx.beans.property.StringPropertyBase.set(StringPropertyBase.java:145)
      at javafx.beans.property.StringPropertyBase.set(StringPropertyBase.java:50)
      at javafx.scene.text.Text.setText(Text.java:419)
      at com.sun.javafx.scene.control.skin.Utils.computeTruncationIndex(Utils.java:150)
      at com.sun.javafx.scene.control.skin.Utils.computeClippedText(Utils.java:232)
      at javafx.scene.control.skin.LabeledSkinBase.updateDisplayedText(LabeledSkinBase.java:1095)
      at javafx.scene.control.skin.LabeledSkinBase.layoutLabelInArea(LabeledSkinBase.java:505)
      at javafx.scene.control.skin.LabeledSkinBase.layoutLabelInArea(LabeledSkinBase.java:430)
      at javafx.scene.control.skin.LabeledSkinBase.layoutChildren(LabeledSkinBase.java:414)
      at javafx.scene.control.Control.layoutChildren(Control.java:599)
      at javafx.scene.Parent.layout(Parent.java:1222)
      at javafx.scene.Parent.layout(Parent.java:1229)
      at javafx.scene.Parent.layout(Parent.java:1229)
      at javafx.scene.Scene.doLayoutPass(Scene.java:585)
      at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2501)
      at com.sun.javafx.tk.Toolkit.lambda$runPulse$3(Toolkit.java:366)
      at com.sun.javafx.tk.Toolkit$$Lambda$467.814296929.run
      at java.security.AccessController.doPrivileged(AccessController.java)
      at com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:365)
      at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:392)
      at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:510)
      at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:490)
      at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:319)
      at com.sun.javafx.tk.quantum.QuantumToolkit$$Lambda$112.1923707970.run
      at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
      "Prism Font Disposer"
      at java.lang.Object.wait(Object.java)
      at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:151)
      at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:172)
      at com.sun.javafx.font.Disposer.run(Disposer.java:93)
      at java.lang.Thread.run(Thread.java:843)
      "QuantumRenderer-0"
      at jdk.internal.misc.Unsafe.park(Unsafe.java)
      at java.util.concurrent.locks.LockSupport.park(LockSupport.java:192)
      at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2062)
      at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
      at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1086)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
      at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125)
      at java.lang.Thread.run(Thread.java:843)
      "Reference Handler"
      at java.lang.Object.wait(Object.java)
      at java.lang.Object.wait(Object.java:516)
      at java.lang.ref.Reference.tryHandlePending(Reference.java:193)
      at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:155)

      Attachments

        Activity

          People

            prr Philip Race
            ogb Oleg Barbashov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: