Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nativeRun - Error initializing QuantumRenderer: no suitable pipeline found #57

Open
dvdfmiller opened this issue Jan 13, 2020 · 6 comments

Comments

@dvdfmiller
Copy link

Executing nativeRun of the sample HelloFX (after successful nativeCompile and nativeLink) I get this error:

Graphics Device initialization failed for : es2, sw Error initializing QuantumRenderer: no suitable pipeline found java.lang.RuntimeException: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found

HelloFX runs successfully using ./gradlew run

Any thoughts?


My environment is:

  • Ubuntu 18.04.3 (virtualbox guest VM; host Windows 10)
  • adoptOpenJDK 11.0.2+9 (I get the same error using adoptOpenJDK 11.0.3+7)
  • javafx 12.0.1
  • com.gluonhq.client-gradle-plugin' version '0.0.11'

In order to achieve successful nativeCompile & nativeLink I have needed to install on my Ubuntu system:

  • zlib: sudo apt-get install zlib1g-dev
  • OpenGL (see https://medium.com/@theorose49/install-opengl-at-ubuntu-18-04-lts-31f368d0b14e)
    sudo apt-get install cmake libx11-dev xorg-dev libglu1-mesa-dev freeglut3-dev libglew1.5 libglew1.5-dev libglu1-mesa libglu1-mesa-dev libgl1-mesa-glx libgl1-mesa-dev libglfw3-dev libglfw3
  • gtk3: sudo apt install libgtk-3-dev
  • libcanberra: sudo apt install libcanberra-gtk-module libcanberra-gtk3-module

Here's the output:

[INFO] [SUB] InitializeEncoding is now (lazily) called
[INFO] [SUB] ONLOAD PRISM_ES2
[INFO] [SUB] Graphics Device initialization failed for : es2, sw
[INFO] [SUB] Error initializing QuantumRenderer: no suitable pipeline found
[INFO] [SUB] java.lang.RuntimeException: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
[INFO] [SUB] at com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(QuantumRenderer.java:280)
[INFO] [SUB] at com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:243)
[INFO] [SUB] at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:260)
[INFO] [SUB] at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267)
[INFO] [SUB] at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158)
[INFO] [SUB] at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658)
[INFO] [SUB] at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:678)
[INFO] [SUB] at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
[INFO] [SUB] at java.lang.Thread.run(Thread.java:834)
[INFO] [SUB] at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:460)
[INFO] [SUB] at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:193)
[INFO] [SUB] Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
[INFO] [SUB] at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:94)
[INFO] [SUB] at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
[INFO] [SUB] ... 3 more
[INFO] [SUB] Exception in thread "main" java.lang.RuntimeException: No toolkit found
[INFO] [SUB] at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:272)
[INFO] [SUB] at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267)
[INFO] [SUB] at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158)
[INFO] [SUB] at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658)
[INFO] [SUB] at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:678)
[INFO] [SUB] at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
[INFO] [SUB] at java.lang.Thread.run(Thread.java:834)
[INFO] [SUB] at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:460)
[INFO] [SUB] at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:193)

Task :nativeRun

BUILD SUCCESSFUL in 2s
2 actionable tasks: 1 executed, 1 up-to-date
Omega :: host triplet = x86_64-linux-linux
Omega :: target triplet = x86_64-linux-linux
12:32:31: Task execution finished nativeRun.


In addition trying adoptOpenJDK 11.0.5+10 I get a nativeLink error:

undefined reference to Java_sun_security_pkcs11_wrapper_PKCS11_createNativeKey


@dvdfmiller
Copy link
Author

dvdfmiller commented Jun 12, 2020

Thanks @shashaanktulsyan you pointed me in the right direction.

When executing NativeRun this error of:
Graphics Device initialization failed for : es2, sw Error initializing QuantumRenderer: no suitable pipeline found
only happens on my Ubuntu 18.04.4 virtualbox GUEST VM.

(Executing './gradlew run' works OK)

When I executed the compiled JavaFX image on my HOST Ubuntu 18.04.4 (I had switched my host OS from Windows to Ubuntu since the original posting above) using this terminal command
./HelloWorld
It worked!

I conclude from this that the native compiled image running on my host picks up and successfully uses my Nvidia graphics card (Geforce GTX 1650), whereas the virtualbox graphics controller on my guest VM doesn't work with the native compiled image. I tried using the virtualbox setting of '3D acceleration' but this did not help.

Also I am now using this plugin version:
com.gluonhq:client-gradle-plugin:0.1.21

but when I use this in my build.gradle:
gluonClient { mainClassName = "HelloWorld" graalvmHome = "/usr/lib/graalvm/graalvm-svm-linux-20.1.0-ea+28" enableSWRendering = true }

I get this error when trying to use enableSWRendering:
Could not set unknown property "enableSWRendering" for extension 'gluonClient' of type com.gluonhq.gradle.ClientExtension

@jperedadnr
Copy link
Collaborator

Upgrade plugin to 0.1.27, and also upgrade GraalVM from https://github.com/graalvm/graalvm-ce-dev-builds/releases, and try again?

@dvdfmiller
Copy link
Author

dvdfmiller commented Jun 12, 2020

I get a nativeCompile error with 0.1.27
Cause: error=2, No such file or directory

and this:


> Task :nativeCompile FAILED
[Fri Jun 12 22:18:22 BST 2020][INFO] ==================== COMPILE TASK ====================
             _______  ___      __   __  _______  __    _
            |       ||   |    |  | |  ||       ||  |  | |
            |    ___||   |    |  | |  ||   _   ||   |_| |
            |   | __ |   |    |  |_|  ||  | |  ||       |
            |   ||  ||   |___ |       ||  |_|  ||  _    |
            |   |_| ||       ||       ||       || | |   |
            |_______||_______||_______||_______||_|  |__|

    Access to the latest docs, tips and tricks and more info on
    how to get support? Register your usage of Gluon Substrate now at

    https://gluonhq.com/activate

[Fri Jun 12 22:18:24 BST 2020][INFO] We will now compile your code for x86_64-linux-linux. This may take some time.

Execution failed for task ':nativeCompile'.
> Failed to compile

any plugin version above 0.1.21 I get this nativeCompile error:
Cause: error=2, No such file or directory

@dvdfmiller
Copy link
Author

dvdfmiller commented Jun 12, 2020

I have upgraded my GraalVM & I use this in my build.gradle:

gluonClient { mainClassName = "HelloWorld" graalvmHome = "/usr/lib/graalvm/graalvm-ce-java11-20.2.0-dev" }

@jperedadnr
Copy link
Collaborator

The plugin 0.1.27 should work fine (just tested it on Mac and Linux), but I just noticed a bug in the enableSwRendering extension: #77

@dvdfmiller
Copy link
Author

Thanks for the confirmation & testing of 0.1.27, very good to know, and for the bug.
I noticed I had previously got my upper and lower cases mixed up. I had used:
enableSWRendering
and it should be:
enableSwRendering

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

No branches or pull requests

2 participants