Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 7u6
    • Fix Version/s: 7u6
    • Component/s: javafx
    • Labels:

      Description

      T2KFontFactory walksback with NPE when creating a embedded font with an invalid font file:
      Exception in Application start method
      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$0(LauncherImpl.java:154)
      at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:115)
      at java.lang.Thread.run(Thread.java:722)
      Caused by: java.lang.NullPointerException
      at com.sun.t2k.T2KFontFactory.loadEmbeddedFont(T2KFontFactory.java:1319)
      at com.sun.t2k.T2KFontFactory.loadEmbeddedFont(T2KFontFactory.java:1249)
      at com.sun.javafx.font.PrismFontLoader.loadFont(PrismFontLoader.java:134)
      at javafx.scene.text.Font.loadFont(Font.java:360)
      at helloworld.HelloDFont.start(HelloDFont.java:86)
      at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:319)
      at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:206)
      at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:173)
      at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:76)



      Test case:
      Font.loadFont("file://System/Library/Fonts/Monaco.dfont", 6);

      This bug was introduced by the fix for RT-21714
      see
      http://jfxsrc.us.oracle.com/javafx/2.2/scrum/graphics/rt-closed/rev/7543dd2d0128

      These lines should not have being removed:
         8.168 - if (t2kFF == null) {
         8.169 - return null; // yes, this means the caller needs to handle null.
         8.170 - }


        Attachments

          Activity

            People

            • Assignee:
              fheidric Felipe Heidrich (Inactive)
              Reporter:
              fheidric Felipe Heidrich (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: