After upgrading to the latest maven artefacts (11-ea+23) from the previous
(11-ea+19), I get the following error when I try to run the javafx11sample
hello3d from gradle:
> Task :run
RenderJob.run: internal exception
java.lang.ArrayIndexOutOfBoundsException: 0
at java.base/java.util.Arrays$ArrayList.get(Arrays.java:4351)
at
java.base/java.util.Collections$UnmodifiableList.get(Collections.java:1306)
at javafx.graphics/com.sun.glass.ui.Screen.getMainScreen(Screen.java:61)
at
javafx.graphics/com.sun.prism.sw.SWPipeline.getDefaultResourceFactory(SWPipeline.java:82)
at
javafx.graphics/com.sun.prism.GraphicsPipeline.getDefaultResourceFactory(GraphicsPipeline.java:120)
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer.lambda$createResourceFactory$2(QuantumRenderer.java:161)
at
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at
java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
at javafx.graphics/com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)
at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125)
at java.base/java.lang.Thread.run(Thread.java:831)
All context can be found at https://github.com/johanvos/javafx11samples/pull/1
<https://github.com/johanvos/javafx11samples/pull/1> .
The program runs fine when launched via maven or directly from the command
line, so there must be some peculiarity concerning how gradle launches a
program, but I can't figure out what.
Note that I can run from gradle when I use the 11-ea+19 snapshots, so something
must have changed in 11-ea+23 which causes this error.
I'd really appreciate any help or insights with this. I get the same error when
upgrading my real application, not just these samples, to 11-ea+23.
This is on a Mac, BTW.