JDK-8127121 : Gtk: FX doesn't start on Linux when a Stage is shown without a Scene
  • Type: Bug
  • Component: javafx
  • Sub-Component: window-toolkit
  • Affected Version: fx2.1
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2011-12-13
  • Updated: 2015-06-17
  • Resolved: 2012-04-11
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 7
7u6Fixed
Related Reports
Relates :  
Relates :  
Description
on the box ubuntu was installed headless, but x server was added later on.

Swing works correctly on that box, but JavaFX fails with next exception:


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.glass.ui.gtk.GtkWindow.syncWithXServer(Native Method)
	at com.sun.glass.ui.gtk.GtkWindow._setVisible(GtkWindow.java:122)
	at com.sun.glass.ui.Window.setVisible(Window.java:371)
	at com.sun.javafx.tk.quantum.WindowStage.setVisible(WindowStage.java:346)
	at javafx.stage.Window$13.invalidated(Window.java:704)
	at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:88)
	at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:122)
	at javafx.stage.Window.setShowing(Window.java:744)
	at javafx.stage.Window.show(Window.java:759)
	at javafx.stage.Stage.show(Stage.java:129)
	at dofx.start(dofx.java:11)
	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

Comments
We know about this issue and Eva is working on it. This happens when there's a Stage without Scene.
14-12-2011

Can you post the source code of the application you used? I think it's irrelevant of the installation of Xserver.
14-12-2011

removed comments about Text and filed that issue as http://javafx-jira.kenai.com/browse/RT-18500
14-12-2011