4

I need to run the AGA simulator on my Ubuntu 14.10 64-bit machine as part of testing/developing a module of a software system. Unfortunately it is not executing. The error message I get is

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
at com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(QuantumRenderer.java:280)
at com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:220)
...

    Exception thrown from main method of combitech/aga/SimulatorApplication
    Exception in thread "main" java.lang.RuntimeException: No toolkit found
    at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:185)

...

    at com.sun.javafx.application.LauncherImpl$$Lambda$3/22713019.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:745)

At the same machine booting Windows 8, the application executes without any error. I'm not sure if this is an error because of faulty environment variables, bad graphics drivers or some other incompatibility. This thread suggests that it is a JavaFX error and to start the program with -Dprism.verbose=true. But that is not possible since the emulator is distributed with a wrapper executable to start it.

Googling the error does not give any further suggestion than to check that my GTK version is above 2.18. Which it seems to be:

ii  libgtk-3-0:amd 3.12.2-0ubun amd64        GTK+ graphical user interface lib
ii  libgtk2.0-0:am 2.24.25-0ubu amd64        GTK+ graphical user interface lib

For all I can see my machine is within spec (or rather with specs over the roof) to run the application.

My java -version returns the following

openjdk version "1.8.0_40-internal"
OpenJDK Runtime Environment (build 1.8.0_40-internal-b09)
OpenJDK 64-Bit Server VM (build 25.40-b13, mixed mode)

According to my question at Stack exchange Meta the error is replicated on a Debian machine and not Ubuntu specific. The error is not present at 12.04 LTS according to JasonC.

The error described is not present in the 1.0 release of the emulator.

Any suggestions or opinions?

I know this question is slightly borderline of what should be asked on SO. But from my discussion at Stack exchange Meta the community suggested that SO was the best possible place. It has also been asked at Ask Ubuntu without any answer for a reasonable amount of time. If you think this is inappropriate please comment or answer on the Meta thread and I will move it accordingly.

Community
  • 1
  • 1
Einar Sundgren
  • 4,325
  • 9
  • 40
  • 59
  • 2
    I don't know anything about javafx but a graphics device initialization error sounds like you may not have the particular OpenGL feature enabled or supported that javafx is looking for. If there is a proprietary driver for your graphics card, try enabling it. – Thorbjørn Ravn Andersen Mar 22 '15 at 09:41
  • @ThorbjørnRavnAndersen You are right about that. And when I switch to the proprietary driver it seems to crash. This was not the answer but a new track to investigate further. – Einar Sundgren Mar 22 '15 at 10:40
  • 1
    "it seems to crash"? – Thorbjørn Ravn Andersen Mar 22 '15 at 10:59
  • @ThorbjørnRavnAndersen Why the questionmark? – Einar Sundgren Mar 22 '15 at 11:00
  • Updated with recent more stable drivers. Not crashing, but still not running. – Einar Sundgren Mar 22 '15 at 13:18
  • *"But that is not possible since the emulator is distributed with a wrapper executable to start it."* - In the documentation you linked to, almost at the very top of the page, it states: *"It is always possible to run the simulator using the 'simulator-fx-[version].jar' file provided under the 'app' subdirectory as suggested below..."* So run `java -Dprism.verbose=true -jar simulator-fx-[version].jar` from in the *apps* directory, and post the output. – Jason C Mar 22 '15 at 13:47
  • 2
    FWIW While Braiam was able to repro on a Debian machine according to a comment in that meta thread, it *does* work find out-of-the-box for me on an Ubuntu 12.04 LTS machine, so at least we know it's some sort of per-machine configuration thing. – Jason C Mar 22 '15 at 13:52
  • @JasonC That simulator-fx-[version].jar does not exist in the 1.1 release. So the suggestion that it *is always possible* is quite useless. It exists in 1.0 though. I should have noted that in the question. Worth noting is that I can start the 1.0 release w/o any errors. – Einar Sundgren Mar 22 '15 at 13:57
  • @EinarSundgren *"That simulator-fx-[version].jar does not exist in the 1.1 release."* I'm not sure I understand. I just downloaded the 1.1 release from the link on that page (http://developer.lindholmen.se/repo/artifacts/Simulator-FX/1.1/simulator_linux.tar.gz), extracted, and `simulator-fx-1.1-SNAPSHOT.jar` is there in the apps directory. – Jason C Mar 22 '15 at 14:02
  • @JasonC Sure. Running that will produce `Error: Could not find or load main class combitech.aga.SimulatorApplication` At first I assumed that was due to a faulty classpath. But you should not be required to supply a classpath to a jag if I remember correctly? – Einar Sundgren Mar 22 '15 at 14:07
  • `cd app ; java -Dprism.verbose=true -jar simulator-fx-1.1-SNAPSHOT.jar`. – Jason C Mar 22 '15 at 14:10
  • 1
    Still the same thing. Not able to load the main class. Its regardless if i run it in the `app/` directory or supply the path to it from the level above. – Einar Sundgren Mar 22 '15 at 14:16
  • Hm. Seems we are going down a rabbit hole here. I am wondering if there is some issue with a 64-bit JRE (the one installed on your system) vs a 32-bit one (not sure if the simulator ships with a 32-bit one). Will investigate more later, need to step away from the computer for a bit now. – Jason C Mar 22 '15 at 14:22
  • @EinarSundgren because "It seems to crash" fails to convey to others exactly what happens - JVM failing, computer rebooting, Java stack trace? Consider it similar to saying "It doesn't go" to a mechanic. – Thorbjørn Ravn Andersen Mar 22 '15 at 15:01
  • 1
    Have you tried with the sun java? – Jester Mar 23 '15 at 18:45
  • @Jester Actually not. I feel a bit stupid now when you ask me. That seems like a likely solution. I'll try. – Einar Sundgren Mar 23 '15 at 19:16
  • @JasonC Does your Ubuntu 12.04 LTS have Oracle/Sun Java and in any case what version is it running, since it seems to support the emulator. Just want to know before I embark on the journey to possibly exchange OpenJDK. – Einar Sundgren Mar 24 '15 at 16:43
  • @EinarSundgren The simulator ships with its own JRE, so if you run it through the binary, it will use that one. If you run it through the JAR, it requires Java 8; for that I used Oracle's 1.8 JRE, 32-bit (I'm running a 32-bit Ubuntu). I do not have a machine to test with the 64-bit JRE, but you could install the 32-bit one as an experiment if you don't have success. I did not try OpenJDK 8. Unfortunately, I do not know enough about the redistributable JRE to know how to run the JAR with the JRE the Simulator ships with (but if you can figure out how, that could be another avenue). – Jason C Mar 24 '15 at 20:30

0 Answers0