JDK-8129405 : Unable to initialize applications on specific Macbook
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: 8u45
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: os_x
  • CPU: x86
  • Submitted: 2015-06-16
  • Updated: 2018-09-06
  • Resolved: 2015-11-12
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.
Other
tbdResolved
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Mac OS 10.10.3 Yosemite

EXTRA RELEVANT SYSTEM CONFIGURATION :
locale: en-GB UTF-8

A DESCRIPTION OF THE PROBLEM :
When trying to show a stage, get NullPointerException at MacFontFinder:99

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Problem only appears on one mac, tried on 10+ others with no issue.
Unable to call stage.show() without getting errors.

The problem even appears when trying to run the JAVAFX with FXML new project in Netbeans ("Hello world"), without any modifications to the source code.

Also tried in 1.8.0_40 with same effects.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
See application window open
ACTUAL -
Application will not display

ERROR MESSAGES/STACK TRACES THAT OCCUR :
Console output, also added some logging info:
ant -f /Users/john/NetBeansProjects/JavaFXApplication1 jfxsa-run
init:
Deleting: /Users/john/NetBeansProjects/JavaFXApplication1/build/built-jar.properties
deps-jar:
Updating property file: /Users/john/NetBeansProjects/JavaFXApplication1/build/built-jar.properties
Compiling 1 source file to /Users/john/NetBeansProjects/JavaFXApplication1/build/classes
compile:
Detected JavaFX Ant API version 1.3
Launching <fx:jar> task from /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/../lib/ant-javafx.jar
Warning: From JDK7u25 the Codebase manifest attribute should be used to restrict JAR repurposing.
         Please set manifest.custom.codebase property to override the current default non-secure value '*'.
Launching <fx:deploy> task from /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/../lib/ant-javafx.jar
jfx-deployment-script:
jfx-deployment:
jar:
Copying 12 files to /Users/john/NetBeansProjects/JavaFXApplication1/dist/run1825049548
jfx-project-run:
Executing /Users/john/NetBeansProjects/JavaFXApplication1/dist/run1825049548/JavaFXApplication1.jar using platform /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/bin/java
init controller
-- listing properties --
javafx.version=8.0.45
java.runtime.name=Java(TM) SE Runtime Environment
sun.boot.library.path=/Library/Java/JavaVirtualMachines/jdk...
java.vm.version=25.45-b02
user.country.format=GB
gopherProxySet=false
java.vm.vendor=Oracle Corporation
java.vendor.url=http://java.oracle.com/
path.separator=:
java.vm.name=Java HotSpot(TM) 64-Bit Server VM
file.encoding.pkg=sun.io
user.country=US
sun.java.launcher=SUN_STANDARD
sun.os.patch.level=unknown
java.vm.specification.name=Java Virtual Machine Specification
user.dir=/Users/john/NetBeansProjects/JavaFX...
java.runtime.version=1.8.0_45-b14
java.awt.graphicsenv=sun.awt.CGraphicsEnvironment
javafx.runtime.version=8.0.45-b11
java.endorsed.dirs=/Library/Java/JavaVirtualMachines/jdk...
os.arch=x86_64
java.io.tmpdir=/var/folders/xp/7zfm6xp10n100l5dkq8nt...
line.separator=

java.vm.specification.vendor=Oracle Corporation
os.name=Mac OS X
sun.jnu.encoding=UTF-8
java.library.path=/Applications/NetBeans/NetBeans 8.0.2...
java.specification.name=Java Platform API Specification
java.class.version=52.0
sun.management.compiler=HotSpot 64-Bit Tiered Compilers
os.version=10.10.3
http.nonProxyHosts=local|*.local|169.254/16|*.169.254/16
user.home=/Users/john
user.timezone=Europe/London
java.awt.printerjob=sun.lwawt.macosx.CPrinterJob
java.specification.version=1.8
file.encoding=UTF-8
user.name=john
java.class.path=/Users/john/NetBeansProjects/JavaFX...
java.vm.specification.version=1.8
sun.arch.data.model=64
java.home=/Library/Java/JavaVirtualMachines/jdk...
sun.java.command=/Users/john/NetBeansProjects/JavaFX...
java.specification.vendor=Oracle Corporation
user.language=en
awt.toolkit=sun.lwawt.macosx.LWCToolkit
java.vm.info=mixed mode
java.version=1.8.0_45
java.ext.dirs=/Users/john/Library/Java/Extensions...
sun.boot.class.path=/Library/Java/JavaVirtualMachines/jdk...
java.vendor=Oracle Corporation
file.separator=/
java.vendor.url.bug=http://bugreport.sun.com/bugreport/
sun.cpu.endian=little
sun.io.unicode.encoding=UnicodeBig
socksNonProxyHosts=local|*.local|169.254/16|*.169.254/16
ftp.nonProxyHosts=local|*.local|169.254/16|*.169.254/16
sun.cpu.isalist=
Exception in Application start method
java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:389)
	at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.RuntimeException: Exception in Application start method
	at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)
	at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$152(LauncherImpl.java:182)
	at com.sun.javafx.application.LauncherImpl$$Lambda$51/999661724.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
	at com.sun.javafx.font.MacFontFinder.populateFontFileNameMap(MacFontFinder.java:99)
	at com.sun.javafx.font.PrismFontFactory.getFullNameToFileMap(PrismFontFactory.java:1736)
	at com.sun.javafx.font.PrismFontFactory.getFontResource(PrismFontFactory.java:465)
	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:138)
	at javafx.scene.text.Text.getTextLayout(Text.java:229)
	at javafx.scene.text.Text.needsFullTextLayout(Text.java:184)
	at javafx.scene.text.Text.access$200(Text.java:95)
	at javafx.scene.text.Text$5.invalidated(Text.java:501)
	at javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:111)
	at javafx.beans.property.ObjectPropertyBase.bind(ObjectPropertyBase.java:174)
	at javafx.css.StyleableObjectProperty.bind(StyleableObjectProperty.java:75)
	at com.sun.javafx.scene.control.skin.LabeledText.<init>(LabeledText.java:82)
	at com.sun.javafx.scene.control.skin.LabeledSkinBase.<init>(LabeledSkinBase.java:125)
	at com.sun.javafx.scene.control.skin.ButtonSkin.<init>(ButtonSkin.java:44)
	at javafx.scene.control.Button.createDefaultSkin(Button.java:191)
	at javafx.scene.control.Control.impl_processCSS(Control.java:859)
	at javafx.scene.Parent.impl_processCSS(Parent.java:1269)
	at javafx.scene.Node.processCSS(Node.java:9035)
	at javafx.scene.Scene.doCSSPass(Scene.java:545)
	at javafx.scene.Scene.preferredSize(Scene.java:1643)
	at javafx.scene.Scene.impl_preferredSize(Scene.java:1720)
	at javafx.stage.Window$9.invalidated(Window.java:834)
	at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:109)
	at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:144)
	at javafx.stage.Window.setShowing(Window.java:910)
	at javafx.stage.Window.show(Window.java:925)
	at javafx.stage.Stage.show(Stage.java:256)
	at javafxapplication1.JavaFXApplication1.start(JavaFXApplication1.java:35)
	at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$159(LauncherImpl.java:863)
	at com.sun.javafx.application.LauncherImpl$$Lambda$54/1718143836.run(Unknown Source)
	at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$172(PlatformImpl.java:326)
	at com.sun.javafx.application.PlatformImpl$$Lambda$47/254413710.run(Unknown Source)
	at com.sun.javafx.application.PlatformImpl.lambda$null$170(PlatformImpl.java:295)
	at com.sun.javafx.application.PlatformImpl$$Lambda$49/499110940.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.sun.javafx.application.PlatformImpl.lambda$runLater$171(PlatformImpl.java:294)
	at com.sun.javafx.application.PlatformImpl$$Lambda$48/553264065.run(Unknown Source)
	at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
Exception running application javafxapplication1.JavaFXApplication1
Java Result: 1
Deleting directory /Users/john/NetBeansProjects/JavaFXApplication1/dist/run1825049548
jfxsa-run:
BUILD SUCCESSFUL (total time: 2 seconds)


REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
Use new project in Netbeans 8.0.2 - JavaFX project with FXML.
Run as standalone project.
---------- END SOURCE ----------


Comments
Caused by: java.lang.NullPointerException at com.sun.javafx.font.MacFontFinder.populateFontFileNameMap(MacFontFinder.java:99) Same as 8189838.
12-11-2015

Changing sub-component to graphics since the cause of the failure is an NPE in MacFontFinder.populateFontFileNameMap
20-06-2015