The following code which takes a snapshot of an empty scene will throw an exception. A similar exception is thrown for a node with an empty bounds.
Scene s = new Scene(new Group());
s.snapshot(null);
Image dimensions must be > 0
java.lang.IllegalArgumentException: Image dimensions must be > 0
at com.sun.prism.Image.<init>(Image.java:135)
at com.sun.prism.Image.<init>(Image.java:118)
at com.sun.prism.Image.fromByteBgraPreData(Image.java:44)
at com.sun.javafx.tk.quantum.QuantumToolkit.createPlatformImage(QuantumToolkit.java:1312)
at javafx.scene.image.Image.<init>(Image.java:662)
at javafx.scene.image.WritableImage.<init>(WritableImage.java:70)
at javafx.scene.Scene.doSnapshot(Scene.java:1110)
at javafx.scene.Scene.doSnapshot(Scene.java:1167)
at javafx.scene.Scene.snapshot(Scene.java:1237)