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

on Linux installed in headless mode with added X-Server com.sun.t2k.LogicalFont.getDefaultAAMode throws NPE

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • fx2.1
    • fx2.1
    • javafx
    • 2.1 b04
      ubuntu 10.04

      see http://javafx-jira.kenai.com/browse/RT-18489

      next applications throws NPE.

      import javafx.application.*;
      import javafx.stage.*;
      import javafx.scene.text.*;
      import javafx.scene.*;

      public class dofx extends Application {
      public static void main(String[] args) { launch(); }

        public void start(Stage stage) throws Exception {
      stage.setTitle("test");
      stage.setScene(new Scene(new Group(new Text(25,25,"text"))));
      stage.show();
      } }

      ---------------------------------

      $ java -cp javafx-sdk2.1.0-beta/rt/lib/jfxrt.jar:. dofx
      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:379)
      at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:28)
      at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:98)
      at java.lang.Thread.run(Thread.java:636)
      Caused by: java.lang.NullPointerException
      at com.sun.t2k.LogicalFont.getDefaultAAMode(LogicalFont.java:300)
      at com.sun.t2k.LogicalFont.getStrike(LogicalFont.java:304)
      at com.sun.t2k.T2KFont.getStrike(T2KFont.java:70)
      at com.sun.javafx.font.PrismFontUtils.getFontMetrics(PrismFontUtils.java:14)
      at com.sun.javafx.font.PrismFontLoader.getFontMetrics(PrismFontLoader.java:434)
      at javafx.scene.text.Text.<init>(Text.java:105)
      at javafx.scene.text.Text.<init>(Text.java:113)
      at javafx.scene.text.Text.<init>(Text.java:125)
      at dofx.start(dofx.java:13)
      at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:299)
      at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:153)
      at com.sun.javafx.application.PlatformImpl$3.run(PlatformImpl.java:120)
      at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
      at com.sun.glass.ui.gtk.GtkApplication$1$1.run(GtkApplication.java:36)
      ... 1 more

            msladecek Martin Sládeček
            sgrinev Sergey Grinev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: