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

jMAVsim fails with Java 11 #96

Closed
louzq16 opened this issue Mar 5, 2019 · 9 comments
Closed

jMAVsim fails with Java 11 #96

louzq16 opened this issue Mar 5, 2019 · 9 comments

Comments

@louzq16
Copy link

louzq16 commented Mar 5, 2019

hello everyone!
I tried to run jMAVsim on ubuntu18.04,but it failed to start GUI,
this is the message:

louzq@louzq-HP-Pavilion-Power-Laptop-15-cb0xx:~/src/Firmware/Tools/jMAVSim$ java -cp lib/*:out/production/jmavsim.jar me.drton.jmavsim.Simulator
Options parsed, starting Sim.
Starting GUI...
3D [dev] 1.6.0-pre12-daily-experimental daily

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by javax.media.j3d.JoglPipeline (file:/home/louzq/src/Firmware/Tools/jMAVSim/lib/j3dcore.jar) to method sun.awt.AppContext.getAppContext()
WARNING: Please consider reporting this to the maintainers of javax.media.j3d.JoglPipeline
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Inconsistency detected by ld.so: dl-lookup.c: 111: check_match: Assertion `version->filename == NULL || ! _dl_name_match_p (version->filename, map)' failed!

how to solve this problem

@Ahmad-Drak
Copy link

Same issue. Did you manage to fix it?

@Stifael
Copy link

Stifael commented Apr 18, 2019

same issue

@Stifael
Copy link

Stifael commented Apr 18, 2019

I assume you upgraded java version.
In case you have openjdk 11 (java --version), I would downgrade to 10 or 9. There was already a fix for 9/10, but not for 11 (cb2d130).

To downgrade your version:

  • download jdk-10 from here
  • unzip
tar xzvf openjdk-10_linux-x64_bin.tar.gz
  • move jdk-10 to install directory and update version to 10.
sudo mkdir -p /usr/lib/jvm/java-10-openjdk-amd64/
sudo mv jdk-10 /usr/lib/jvm/java-10-openjdk-amd64/
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-10-openjdk-amd64/jdk-10/bin/java 1
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/java-10-openjdk-amd64/jdk-10/bin/javac 1
sudo update-alternatives --config java
  • remove jmavsim build folder
rm -rf <path-to-px4>/Tools/jMAVSim/out

Now you should have your GUI back.

NOTE: this is just a workaround and not a fix.

@Ahmad-Drak
Copy link

Thanks for the workaround, will git it a try

@Ahmad-Drak
Copy link

@Stifael jdk-10 didnt work for me, however jdk-9 did work. Thanks for the help

@louzq16
Copy link
Author

louzq16 commented Apr 23, 2019

I assume you upgraded java version.
In case you have openjdk 11 (java --version), I would downgrade to 10 or 9. There was already a fix for 9/10, but not for 11 (cb2d130).

To downgrade your version:

  • download jdk-10 from here
  • unzip
tar xzvf openjdk-10_linux-x64_bin.tar.gz
  • move jdk-10 to install directory and update version to 10.
sudo mkdir -p /usr/lib/jvm/java-10-openjdk-amd64/
sudo mv jdk-10 /usr/lib/jvm/java-10-openjdk-amd64/
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-10-openjdk-amd64/jdk-10/bin/java 1
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/java-10-openjdk-amd64/jdk-10/bin/javac 1
sudo update-alternatives --config java
  • remove jmavsim build folder
rm -rf <path-to-px4>/Tools/jMAVSim/out

Now you should have your GUI back.

NOTE: this is just a workaround and not a fix.
thank you for your help!! It works well now~

@potaito potaito changed the title jMAVsim can't work normally jMAVsim can't work normally (Inconsistency detected) May 3, 2019
@julianoes julianoes changed the title jMAVsim can't work normally (Inconsistency detected) jMAVsim fails with Java 11 Jun 11, 2019
@julianoes
Copy link

For Ubuntu, you can fall back to Java 8 quite easily:

sudo apt install openjdk-8-jdk
sudo update-alternatives --config java # choose 8
rm -rf Tools/jMAVSim/out

@yuhaim
Copy link

yuhaim commented Jul 30, 2019

For Ubuntu, you can fall back to Java 8 quite easily:

sudo apt install openjdk-8-jdk
sudo update-alternatives --config java # choose 8
rm -rf Tools/jMAVSim/out

This solution works for me finally, but there is another issue as follow:

Options parsed, starting Sim.
Starting GUI...
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:61)
Caused by: java.awt.AWTError: Assistive Technology not found: org.GNOME.Accessibility.AtkWrapper
at java.awt.Toolkit.loadAssistiveTechnologies(Toolkit.java:807)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:886)
at java.awt.Window.getToolkit(Window.java:1358)
at java.awt.Window.init(Window.java:506)
at java.awt.Window.(Window.java:537)
at java.awt.Frame.(Frame.java:420)
at java.awt.Frame.(Frame.java:385)
at javax.swing.JFrame.(JFrame.java:189)
at me.drton.jmavsim.Visualizer3D.(Visualizer3D.java:107)
at me.drton.jmavsim.Simulator.(Simulator.java:176)
at me.drton.jmavsim.Simulator.main(Simulator.java:895)
... 5 more

This could be solved by https://askubuntu.com/questions/695560/assistive-technology-not-found-awterror

@julianoes
Copy link

Thanks for adding that, also see: PX4/PX4-Autopilot#9557 (comment)

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

5 participants