JDK-8113776 : FXMLLoader.load may fail thanks an NPE from Text.setFont
  • Type: Bug
  • Component: javafx
  • Sub-Component: fxml
  • Affected Version: fx2.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Not an Issue
  • Submitted: 2011-07-11
  • Updated: 2015-06-16
  • Resolved: 2013-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 9
9Resolved
Related Reports
Blocks :  
Relates :  
Description
I pushed two unit tests in the fxml repo. They're green thanks @Ignore but run #66 exhibits the failures: http://jfx.sfbay.sun.com/hudson/job/presidio-fxml-sandbox/label=windows-i586-14/66/console
There's something vicious in the fact if you run the test on only the test flagged as "faulty" then it might pass: it's only because there's plenty of FXMLLoader.load() calls that are done that at some point some of them fail.

    [junit] WARNING: Failed to build instance of class javafx.scene.text.Text using class javafx.builders.TextBuilder
    [junit] java.lang.reflect.InvocationTargetException
    [junit] 	at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
    [junit] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [junit] 	at java.lang.reflect.Method.invoke(Method.java:597)
    [junit] 	at javafx.fxml.JavaFXBuilder$ObjectBuilder.build(JavaFXBuilder.java:64)
    [junit] 	at javafx.fxml.FXMLLoader$ValueElement.processEndElement(FXMLLoader.java:332)
    [junit] 	at javafx.fxml.FXMLLoader.processEndElement(FXMLLoader.java:1464)
    [junit] 	at javafx.fxml.FXMLLoader.load(FXMLLoader.java:1321)
    [junit] 	at javafx.fxml.FXMLLoader.load(FXMLLoader.java:1818)
    [junit] 	at testloadfxml.LoadFXMLTestBase.loadAllFiles(LoadFXMLTestBase.java:43)
    [junit] 	at testloadfxml.LoadFXML_1_Test.start(LoadFXML_1_Test.java:38)
    [junit] 	at com.sun.javafx.application.LauncherImpl$3.run(LauncherImpl.java:130)
    [junit] 	at com.sun.javafx.application.PlatformImpl$3.run(PlatformImpl.java:87)
    [junit] 	at com.sun.javafx.application.PlatformImpl$2.run(PlatformImpl.java:65)
    [junit] 	at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    [junit] 	at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:29)
    [junit] 	at com.sun.glass.ui.win.WinApplication$1$1.run(WinApplication.java:49)
    [junit] 	at java.lang.Thread.run(Thread.java:619)
    [junit] Caused by: java.lang.NullPointerException
    [junit] 	at javafx.scene.text.Text$4.invalidated(Text.java:234)
    [junit] 	at javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:62)
    [junit] 	at javafx.beans.property.ObjectPropertyBase.set(ObjectPropertyBase.java:116)
    [junit] 	at javafx.scene.text.Text.setFont(Text.java:218)
    [junit] 	at javafx.builders.TextBuilder.applyTo(TextBuilder.java:29)
    [junit] 	at javafx.builders.TextBuilder.build(TextBuilder.java:229)
    [junit] 	... 17 more
Comments
No, this isn't an issue any more.
09-12-2013

Yves, can you please check if this is still an issue?
09-12-2013

After RT-32859, TextBuilder should not be used anymore (if it still is), so this can be closed.
31-10-2013

Hi Yves, Is this still an issue in 2.0.x or 2.1? Greg
02-11-2011