Skip to content
This repository was archived by the owner on Jun 24, 2021. It is now read-only.

Error initializing QuantumRenderer no suitable pipeline found when running through jlink's custom runtime image #237

Closed
lploom opened this issue Oct 3, 2018 · 7 comments

Comments

@lploom
Copy link

lploom commented Oct 3, 2018

Steps to reproduce are here https://github.com/lploom/javafx-11-modular-hello-world
Likely I am just missing something

I am on Windows 10 Java 11 both x64

java -version
java version "11" 2018-09-25
Java(TM) SE Runtime Environment 18.9 (build 11+28)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11+28, mixed mode)

Error occurs when running the sample program with the custom jre. Works fine when running normally.

jigsaw-jfx>dist\bin\start
Graphics Device initialization failed for : d3d, sw
Error initializing QuantumRenderer: no suitable pipeline found
java.lang.RuntimeException: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(QuantumRenderer.java:280)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:222)
at javafx.graphics/com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:260)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:409)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:363)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1051)
Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:94)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
at java.base/java.lang.Thread.run(Thread.java:834)
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1051)
Caused by: java.lang.RuntimeException: No toolkit found
at javafx.graphics/com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:272)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:409)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:363)
... 5 more

@kevinrushforth
Copy link
Collaborator

Can you run your app with java -Djavafx.verbose=true -Dprism.verbose=true ... and paste the output?

@lploom
Copy link
Author

lploom commented Oct 4, 2018

Sure. Looks like the root cause is

Loading D3D native library ...
GraphicsPipeline.createPipeline failed for com.sun.prism.d3d.D3DPipeline
java.lang.UnsatisfiedLinkError: no prism_d3d in java.library.path

Full output

C:\jigsaw-jfx>dist\bin\java -Djavafx.verbose=true -Dprism.verbose=true --module-path C:\javafx-sdk-> 11\lib;build\hellomodule --module hellomodule/com.ameus.Main
JavaFX launchApplication method: launchMode=LM_MODULE
Loaded C:\jigsaw-jfx\dist\bin\api-ms-win-core-console-l1-1-0.dll from java.library.path
Loaded C:\jigsaw-jfx\dist\bin\api-ms-win-core-datetime-l1-1-0.dll from java.library.path
Loaded C:\jigsaw-jfx\dist\bin\api-ms-win-core-debug-l1-1-0.dll from java.library.path
Loaded C:\jigsaw-jfx\dist\bin\api-ms-win-core-errorhandling-l1-1-0.dll from java.library.path
Loaded C:\jigsaw-jfx\dist\bin\api-ms-win-core-file-l1-1-0.dll from java.library.path
Loaded C:\jigsaw-jfx\dist\bin\api-ms-win-core-file-l1-2-0.dll from java.library.path
Loaded C:\jigsaw-jfx\dist\bin\api-ms-win-core-file-l2-1-0.dll from java.library.path
Loaded C:\jigsaw-jfx\dist\bin\api-ms-win-core-handle-l1-1-0.dll from java.library.path
Loaded C:\jigsaw-jfx\dist\bin\api-ms-win-core-heap-l1-1-0.dll from java.library.path
Loaded C:\jigsaw-jfx\dist\bin\api-ms-win-core-interlocked-l1-1-0.dll from java.library.path
Loaded C:\jigsaw-jfx\dist\bin\api-ms-win-core-libraryloader-l1-1-0.dll from java.library.path
Loaded C:\jigsaw-jfx\dist\bin\api-ms-win-core-localization-l1-2-0.dll from java.library.path
Loaded C:\jigsaw-jfx\dist\bin\api-ms-win-core-memory-l1-1-0.dll from java.library.path
Loaded C:\jigsaw-jfx\dist\bin\api-ms-win-core-namedpipe-l1-1-0.dll from java.library.path
Loaded C:\jigsaw-jfx\dist\bin\api-ms-win-core-processenvironment-l1-1-0.dll from java.library.path
Loaded C:\jigsaw-jfx\dist\bin\api-ms-win-core-processthreads-l1-1-0.dll from java.library.path
Loaded C:\jigsaw-jfx\dist\bin\api-ms-win-core-processthreads-l1-1-1.dll from java.library.path
Loaded C:\jigsaw-jfx\dist\bin\api-ms-win-core-profile-l1-1-0.dll from java.library.path
Loaded C:\jigsaw-jfx\dist\bin\api-ms-win-core-rtlsupport-l1-1-0.dll from java.library.path
Loaded C:\jigsaw-jfx\dist\bin\api-ms-win-core-string-l1-1-0.dll from java.library.path
Loaded C:\jigsaw-jfx\dist\bin\api-ms-win-core-synch-l1-1-0.dll from java.library.path
Loaded C:\jigsaw-jfx\dist\bin\api-ms-win-core-synch-l1-2-0.dll from java.library.path
Loaded C:\jigsaw-jfx\dist\bin\api-ms-win-core-sysinfo-l1-1-0.dll from java.library.path
Loaded C:\jigsaw-jfx\dist\bin\api-ms-win-core-timezone-l1-1-0.dll from java.library.path
Loaded C:\jigsaw-jfx\dist\bin\api-ms-win-core-util-l1-1-0.dll from java.library.path
Loaded C:\jigsaw-jfx\dist\bin\api-ms-win-crt-conio-l1-1-0.dll from java.library.path
Loaded C:\jigsaw-jfx\dist\bin\api-ms-win-crt-convert-l1-1-0.dll from java.library.path
Loaded C:\jigsaw-jfx\dist\bin\api-ms-win-crt-environment-l1-1-0.dll from java.library.path
Loaded C:\jigsaw-jfx\dist\bin\api-ms-win-crt-filesystem-l1-1-0.dll from java.library.path
Loaded C:\jigsaw-jfx\dist\bin\api-ms-win-crt-heap-l1-1-0.dll from java.library.path
Loaded C:\jigsaw-jfx\dist\bin\api-ms-win-crt-locale-l1-1-0.dll from java.library.path
Loaded C:\jigsaw-jfx\dist\bin\api-ms-win-crt-math-l1-1-0.dll from java.library.path
Loaded C:\jigsaw-jfx\dist\bin\api-ms-win-crt-multibyte-l1-1-0.dll from java.library.path
Loaded C:\jigsaw-jfx\dist\bin\api-ms-win-crt-private-l1-1-0.dll from java.library.path
Loaded C:\jigsaw-jfx\dist\bin\api-ms-win-crt-process-l1-1-0.dll from java.library.path
Loaded C:\jigsaw-jfx\dist\bin\api-ms-win-crt-runtime-l1-1-0.dll from java.library.path
Loaded C:\jigsaw-jfx\dist\bin\api-ms-win-crt-stdio-l1-1-0.dll from java.library.path
Loaded C:\jigsaw-jfx\dist\bin\api-ms-win-crt-string-l1-1-0.dll from java.library.path
Loaded C:\jigsaw-jfx\dist\bin\api-ms-win-crt-time-l1-1-0.dll from java.library.path
Loaded C:\jigsaw-jfx\dist\bin\api-ms-win-crt-utility-l1-1-0.dll from java.library.path
Loaded C:\jigsaw-jfx\dist\bin\ucrtbase.dll from java.library.path
Loaded C:\jigsaw-jfx\dist\bin\vcruntime140.dll from java.library.path
Loaded C:\jigsaw-jfx\dist\bin\msvcp140.dll from java.library.path
Loaded C:\WINDOWS\system32\concrt140.dll from java.library.path
Prism pipeline init order: d3d sw
Using Double Precision Marlin Rasterizer
Using dirty region optimizations
Not using texture mask for primitives
Not forcing power of 2 sizes for textures
Using hardware CLAMP_TO_ZERO mode
Opting in for HiDPI pixel scaling
Prism pipeline name = com.sun.prism.d3d.D3DPipeline
Loading D3D native library ...
GraphicsPipeline.createPipeline failed for com.sun.prism.d3d.D3DPipeline
java.lang.UnsatisfiedLinkError: no prism_d3d in java.library.path: [C:\jigsaw-jfx\dist\bin, C:\WINDOWS\Sun\Java\bin, C:\WINDOWS\system32, C:\WINDOWS, C:\Program Files\Java\jdk-11\bin, C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\bin, C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\libnvvp, C:\Program Files (x86)\Common Files\Oracle\Java\javapath, C:\Windows\system32, C:\Windows, C:\Windows\System32\Wbem, C:\Windows\System32\WindowsPowerShell\v1.0, C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common, C:\Program Files\Git\cmd, C:\WINDOWS\system32, C:\WINDOWS, C:\WINDOWS\System32\Wbem, C:\WINDOWS\System32\WindowsPowerShell\v1.0, C:\Program Files\Microsoft SQL Server\130\Tools\Binn, C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit, C:\Program Files\MySQL\MySQL Utilities 1.6, C:\Program Files\Java\jdk-10\bin, C:\Program Files\Gource\cmd, C:\WINDOWS\System32\OpenSSH, C:\Program Files\nodejs, C:\Program Files (x86)\Skype\Phone, C:\Users\x\AppData\Local\Microsoft\WindowsApps, C:\Users\x\AppData\Roaming\npm, C:\Users\x\AppData\Local\atom\bin, .]
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2660)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:829)
at java.base/java.lang.System.loadLibrary(System.java:1867)
at javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:150)
at javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:52)
at javafx.graphics/com.sun.prism.d3d.D3DPipeline.lambda$static$0(D3DPipeline.java:48)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.prism.d3d.D3DPipeline.(D3DPipeline.java:44)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:315)
at javafx.graphics/com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:187)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:91)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
at java.base/java.lang.Thread.run(Thread.java:834)
*** Fallback to Prism SW pipeline
Prism pipeline name = com.sun.prism.sw.SWPipeline
GraphicsPipeline.createPipeline failed for com.sun.prism.sw.SWPipeline
java.lang.UnsatisfiedLinkError: no prism_sw in java.library.path: [C:\jigsaw-jfx\dist\bin, C:\WINDOWS\Sun\Java\bin, C:\WINDOWS\system32, C:\WINDOWS, C:\Program Files\Java\jdk-11\bin, C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\bin, C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\libnvvp, C:\Program Files (x86)\Common Files\Oracle\Java\javapath, C:\Windows\system32, C:\Windows, C:\Windows\System32\Wbem, C:\Windows\System32\WindowsPowerShell\v1.0, C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common, C:\Program Files\Git\cmd, C:\WINDOWS\system32, C:\WINDOWS, C:\WINDOWS\System32\Wbem, C:\WINDOWS\System32\WindowsPowerShell\v1.0, C:\Program Files\Microsoft SQL Server\130\Tools\Binn, C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit, C:\Program Files\MySQL\MySQL Utilities 1.6, C:\Program Files\Java\jdk-10\bin, C:\Program Files\Gource\cmd, C:\WINDOWS\System32\OpenSSH, C:\Program Files\nodejs, C:\Program Files (x86)\Skype\Phone, C:\Users\x\AppData\Local\Microsoft\WindowsApps, C:\Users\x\AppData\Roaming\npm, C:\Users\x\AppData\Local\atom\bin, .]
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2660)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:829)
at java.base/java.lang.System.loadLibrary(System.java:1867)
at javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:150)
at javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:52)
at javafx.graphics/com.sun.prism.sw.SWPipeline.lambda$static$0(SWPipeline.java:42)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.prism.sw.SWPipeline.(SWPipeline.java:41)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:315)
at javafx.graphics/com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:187)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:91)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
at java.base/java.lang.Thread.run(Thread.java:834)
Graphics Device initialization failed for : d3d, sw
Error initializing QuantumRenderer: no suitable pipeline found
java.lang.RuntimeException: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(QuantumRenderer.java:280)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:222)
at javafx.graphics/com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:260)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:409)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:363)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1051)
Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:94)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
at java.base/java.lang.Thread.run(Thread.java:834)
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1051)
Caused by: java.lang.RuntimeException: No toolkit found
at javafx.graphics/com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:272)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:409)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:363)
... 5 more

@johanvos
Copy link
Collaborator

johanvos commented Oct 4, 2018

The reason is that you are bundling the "mods" from the SDK, which don't have the native libraries in them (in the SDK, we have jars and native libs).
You can download the JavaFX modules as jmods, including classes and native libs. See https://gluonhq.com/products/javafx/ and download the mods (instead of the SDK).
Next, point jlink to the mods directory (assuming you unpacked them in /opt)

jlink --module-path /opt/java/jmods:/opt/javafx-jmods-11:build/hellomodule --add-modules hellomodule --launcher start=hellomodule/com.ameus.Main --output dist

On Linux, I got it working like this, and I expect it to work similar on the other platforms.

We should document this.

@kevinrushforth
Copy link
Collaborator

We should document this.

Indeed we should. There are two cases to document:

  1. Using jlink to bundle your (modular) app with a Java runtime.
  2. Using jlink to create a Java runtime with JavaFX for use with your (possibly non-modular) applications.

Case 1 is covered by the above jlink example. Case 2 requires adding the javafx.* modules that you need, since there is no application module that will "require" them and cause them to be included.

@kevinrushforth
Copy link
Collaborator

I closed this issue, but maybe we should leave it open until the docs are updated?

@lploom
Copy link
Author

lploom commented Oct 4, 2018

OK I thought I was finally clear on Java9+ jargon but nope. Meditate some more I must.

You should open a new issue with better title and clear instructions for the documentation.

@kevinrushforth
Copy link
Collaborator

I filed #238 to track updating the documentation.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants