JDK-8143907 : All FX apps fail on OS X 10.11 due to NPE in MacFontFinder
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: 7,7u95
  • Priority: P1
  • Status: Resolved
  • Resolution: Fixed
  • OS: os_x
  • CPU: x86
  • Submitted: 2015-11-24
  • Updated: 2016-01-30
  • Resolved: 2015-12-09
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7u101 b01Fixed
Description
Reproducible: always
Testsuite name: FXSamples manual
Product(s) tested: JDK7u95b09 (64bit)
Platform-specific: yes
OS/architecture: Mac10.11

Steps to reproduce:  Try to execute Ensemble.jar or other fx GUI application.
Expected result: application started.
Actual result: Application fails with a headless-mode related text.

Same for -Xint and software rendering mode.
Suprisingly, BrickBreaker still works.  Looks like, sometimes application could be launched.


Comments
Safe fix. SQE OK to take it in 7u95.
10-12-2015

Fixed for 7u101 but asking (via critical request) for inclusion in 7u95 - 16_01 - Jan
09-12-2015

Here is the output with various debug options. $ java -version java version "1.7.0_95" Java(TM) SE Runtime Environment (build 1.7.0_95-b10) Java HotSpot(TM) 64-Bit Server VM (build 24.95-b01, mixed mode) $ java -Dprism.verbose=true -Djavafx.verbose=true -Dprism.debugfonts=true HelloText Prism pipeline init order: es2 j2d Using t2k for text rasterization Using dirty region optimizations Opting in for HiDPI pixel scaling Prism pipeline name = com.sun.prism.es2.ES2Pipeline Loading ES2 native library ... prism-es2 succeeded. GLFactory using com.sun.prism.es2.MacGLFactory (X) Got class = class com.sun.prism.es2.ES2Pipeline Initialized prism pipeline: com.sun.prism.es2.ES2Pipeline JavaFX: using com.sun.javafx.tk.quantum.QuantumToolkit Maximum supported texture size: 16384 Maximum texture size clamped to 4096 Graphics Vendor: ATI Technologies Inc. Renderer: AMD Radeon R9 M370X OpenGL Engine Version: 2.1 ATI-1.38.3 java.lang.Exception: Font name not found. at com.sun.t2k.T2KFontFile.init(T2KFontFile.java:686) at com.sun.t2k.T2KFontFile.<init>(T2KFontFile.java:188) at com.sun.t2k.T2KFontFile.createFontResource(T2KFontFile.java:155) at com.sun.t2k.T2KFontFile.createFontResource(T2KFontFile.java:129) at com.sun.t2k.MacFontFinder.getMacFontResource(MacFontFinder.java:548) at com.sun.t2k.T2KFontFactory.getFontResource(T2KFontFactory.java:215) at com.sun.t2k.LogicalFont.getSlot0Resource(LogicalFont.java:184) at com.sun.t2k.LogicalFont.getSlotResource(LogicalFont.java:228) at com.sun.t2k.CompositeStrike.getStrikeSlot(CompositeStrike.java:86) at com.sun.t2k.CompositeStrike.getMetrics(CompositeStrike.java:132) at com.sun.javafx.font.PrismFontUtils.getFontMetrics(PrismFontUtils.java:31) at com.sun.javafx.font.PrismFontLoader.getFontMetrics(PrismFontLoader.java:466) at javafx.scene.text.Text.<init>(Text.java:153) at javafx.scene.text.Text.<init>(Text.java:162) at HelloText.start(HelloText.java:14) at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:319) at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:219) at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:182) at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:179) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:179) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:76) Exception in Application start method QuantumRenderer: shutdown Exception in thread "main" java.lang.RuntimeException: Exception in Application start method at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:403) at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:47) at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:115) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.NullPointerException at com.sun.t2k.MacFontFinder.initPSFontNameToPathMap(MacFontFinder.java:339) at com.sun.t2k.MacFontFinder.getFontNamesOfFontFamily(MacFontFinder.java:390) at com.sun.t2k.T2KFontFactory.getFontResource(T2KFontFactory.java:233) at com.sun.t2k.LogicalFont.getSlot0Resource(LogicalFont.java:184) at com.sun.t2k.LogicalFont.getSlotResource(LogicalFont.java:228) at com.sun.t2k.CompositeStrike.getStrikeSlot(CompositeStrike.java:86) at com.sun.t2k.CompositeStrike.getMetrics(CompositeStrike.java:132) at com.sun.javafx.font.PrismFontUtils.getFontMetrics(PrismFontUtils.java:31) at com.sun.javafx.font.PrismFontLoader.getFontMetrics(PrismFontLoader.java:466) at javafx.scene.text.Text.<init>(Text.java:153) at javafx.scene.text.Text.<init>(Text.java:162) at HelloText.start(HelloText.java:14) at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:319) at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:219) at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:182) at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:179) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:179) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:76)
01-12-2015

Attached a simple test program that reproduces the bug. I confirmed the bug on my OS X 10.11.1 system.
01-12-2015

In progress flip - under investigation.
30-11-2015

adding to tony's update, reproduce the issue on 10.11 Looks like its only reproducible on 10.11 and with earlier release of 7u. Not reproducible on 8u. There are significant differences between both codes.
25-11-2015

fx sample was done in 7u85 b15 using 10.11 beta, we did not see the issues. (Now we upgraded all to GA and has no beta image). We found this major issue in 7u95 b09 on 10.11 GA and tried 7u85 b15 already , all failed. Another point is that there is no issue on 10.10 for both two builds. We do not think this is a regression.
25-11-2015

The failure is caused by the following: Caused by: java.lang.NullPointerException at com.sun.t2k.MacFontFinder.initPSFontNameToPathMap(MacFontFinder.java:339) at com.sun.t2k.MacFontFinder.getFontNamesOfFontFamily(MacFontFinder.java:390) at com.sun.t2k.T2KFontFactory.getFontResource(T2KFontFactory.java:233) at com.sun.t2k.LogicalFont.getSlot0Resource(LogicalFont.java:184) at com.sun.t2k.LogicalFont.getSlotResource(LogicalFont.java:228) at com.sun.t2k.CompositeStrike.getStrikeSlot(CompositeStrike.java:86) at com.sun.t2k.CompositeStrike.getMetrics(CompositeStrike.java:132) at com.sun.javafx.font.PrismFontUtils.getFontMetrics(PrismFontUtils.java:31) at com.sun.javafx.font.PrismFontLoader.getFontMetrics(PrismFontLoader.java:466) at javafx.scene.text.Text.<init>(Text.java:153) at javafx.scene.text.Text.<init>(Text.java:162) at ensemble.config.ProxyDialog.<init>(ProxyDialog.java:90) at ensemble.Ensemble2.start(Ensemble2.java:284) at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:319) at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:219) at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:182) at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:179) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:179) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:76)
24-11-2015

Initial assignment. Review and resolve to follow
24-11-2015

The part of Sample cases that need to run Ensemble.jar. so all cases can not be ran, like tests/samples/Ensemble_01_Toolbar.html, tests/samples/Ensemble_04_Chart_Area.html and so on.
24-11-2015

Confirmed. Looks like FX2 is totally broken on MacOS 10.11.
24-11-2015