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

FXMLLoader.load may fail thanks an NPE from Text.setFont

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not an Issue
    • P4
    • 9
    • fx2.0
    • javafx
    • presidio build #200

    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

      Attachments

        Issue Links

          Activity

            People

              msladecek Martin Sládeček
              yjoan Yves Joan (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported: