HanSolo / tilesfx

A JavaFX library containing tiles that can be used for dashboards.
Apache License 2.0
1.43k stars 202 forks source link

java.lang.IllegalArgumentException: dash lengths all zero #71

Closed clausia closed 5 years ago

clausia commented 5 years ago

Hi,

I'm trying to run TilesFx on java12 and JavaFx12, but I'm getting this error. I know that this happened when in Demo.java the stage is about to show: stage.show();

But, i cannot track down the reason, in order to try to fix it

Any idea what could it be?

Message is: "dash lengths all zero" which means nothing to me

Stacktrace:

Initialization: 1211ms Exception in Application start method check 1 check 2 Exception in thread "JavaFX Application Thread" java.lang.IllegalArgumentException: dash lengths all zero at javafx.graphics/com.sun.prism.BasicStroke.set(BasicStroke.java:146) at javafx.graphics/com.sun.javafx.sg.prism.NGShape.setDrawStroke(NGShape.java:155) at javafx.graphics/javafx.scene.shape.Shape.updatePGShape(Shape.java:943) at javafx.graphics/javafx.scene.shape.Shape.doUpdatePeer(Shape.java:998) at javafx.graphics/javafx.scene.shape.Shape$1.doUpdatePeer(Shape.java:131) at javafx.graphics/com.sun.javafx.scene.shape.ShapeHelper.updatePeerImpl(ShapeHelper.java:74) at javafx.graphics/com.sun.javafx.scene.shape.LineHelper.updatePeerImpl(LineHelper.java:65) at javafx.graphics/com.sun.javafx.scene.NodeHelper.updatePeer(NodeHelper.java:102) at javafx.graphics/javafx.scene.Node.syncPeer(Node.java:710) at javafx.graphics/javafx.scene.Scene$ScenePulseListener.syncAll(Scene.java:2380) at javafx.graphics/javafx.scene.Scene$ScenePulseListener.syncAll(Scene.java:2389) at javafx.graphics/javafx.scene.Scene$ScenePulseListener.syncAll(Scene.java:2389) at javafx.graphics/javafx.scene.Scene$ScenePulseListener.syncAll(Scene.java:2389) at javafx.graphics/javafx.scene.Scene$ScenePulseListener.synchronizeSceneNodes(Scene.java:2356) at javafx.graphics/javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2512) at javafx.graphics/com.sun.javafx.tk.Toolkit.lambda$runPulse$2(Toolkit.java:412) at java.base/java.security.AccessController.doPrivileged(AccessController.java:389) at javafx.graphics/com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:411) at javafx.graphics/com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:438) at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:562) at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:542) at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:535) at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:341) at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)

HanSolo commented 5 years ago

Can you provide some example code to reproduce the problem?

clausia commented 5 years ago

I just try to run eu.hansolo.tilesfx.Demo.java, this class is included in TilesFx project, and in line 870, when stage.show(); is executed, the error mentioned is thrown.

midi-foot-controller commented 5 years ago

Same with Tiles 11.0.2 and JDK 11.0.3 mac os x, Intellij 2018.3

eu.hansolo.tilesfx.Demo Initialization: 3071ms Exception in Application start method check 1 check 2 Exception in thread "JavaFX Application Thread" java.lang.IllegalArgumentException: dash lengths all zero at javafx.graphics/com.sun.prism.BasicStroke.set(BasicStroke.java:146)

clausia commented 5 years ago

By adding all required modules, there is no error anymore:

--add-modules javafx.graphics,javafx.base,javafx.controls,javafx.fxml,javafx.web

HanSolo commented 5 years ago

it should be enough to add javafx.controls and javafx.web