Error on JMAVSim Simulation

Good evening,
I’m not able to launch the sitl simulation as suggested here. When I execute the command make px4_sitl jmavsim I get the following error:

[1/2] launching px4 jmavsim_iris (SYS_AUTOSTART=10017)

______  __   __    ___
| ___ \ \ \ / /   /   |
| |_/ /  \ V /   / /| |
|  __/   /   \  / /_| |
| |     / /^\ \ \___  |
\_|     \/   \/     |_/

px4 starting.

INFO  [px4] startup script: /bin/sh etc/init.d-posix/rcS 0
env SYS_AUTOSTART: 10017
INFO  [param] selected parameter default file parameters.bson
INFO  [param] selected parameter backup file parameters_backup.bson
  SYS_AUTOCONFIG: curr: 0 -> new: 1
  SYS_AUTOSTART: curr: 0 -> new: 10017
  CAL_ACC0_ID: curr: 0 -> new: 1310988
  CAL_GYRO0_ID: curr: 0 -> new: 1310988
  CAL_ACC1_ID: curr: 0 -> new: 1310996
  CAL_GYRO1_ID: curr: 0 -> new: 1310996
  CAL_ACC2_ID: curr: 0 -> new: 1311004
  CAL_GYRO2_ID: curr: 0 -> new: 1311004
  CAL_MAG0_ID: curr: 0 -> new: 197388
  CAL_MAG0_PRIO: curr: -1 -> new: 50
  CAL_MAG1_ID: curr: 0 -> new: 197644
  CAL_MAG1_PRIO: curr: -1 -> new: 50
  SENS_BOARD_X_OFF: curr: 0.0000 -> new: 0.0000
  SENS_DPRES_OFF: curr: 0.0000 -> new: 0.0010
INFO  [dataman] data manager file './dataman' size is 7866664 bytes
etc/init.d-posix/rcS: 39: [: Illegal number:
INFO  [init] jMAVSim simulator
INFO  [simulator_mavlink] using TCP on remote host localhost port 4560
WARN  [simulator_mavlink] Please ensure port 4560 is not blocked by a firewall.
INFO  [simulator_mavlink] Resolved host 'localhost' to address: 127.0.0.1
INFO  [simulator_mavlink] Waiting for simulator to accept connection on TCP port 4560
Buildfile: /home/paolo/PX4-Autopilot/Tools/simulation/jmavsim/jMAVSim/build.xml

make_dirs:

compile:

create_run_jar:

copy_res:

BUILD SUCCESSFUL
Total time: 0 seconds
Options parsed, starting Sim.
Starting GUI...
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:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:61)
Caused by: java.lang.InternalError: XXX0 profile[2]: GL2 -> profileImpl GL3bc !!! not mapped
        at com.jogamp.opengl.GLProfile.computeProfileMap(GLProfile.java:2098)
        at com.jogamp.opengl.GLProfile.initProfilesForDeviceCritical(GLProfile.java:1976)
        at com.jogamp.opengl.GLProfile.initProfilesForDevice(GLProfile.java:1895)
        at com.jogamp.opengl.GLProfile.initProfilesForDefaultDevices(GLProfile.java:1861)
        at com.jogamp.opengl.GLProfile.access$000(GLProfile.java:80)
        at com.jogamp.opengl.GLProfile$1.run(GLProfile.java:239)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
        at com.jogamp.opengl.GLProfile.initSingleton(GLProfile.java:225)
        at com.jogamp.opengl.GLProfile.getProfileMap(GLProfile.java:2324)
        at com.jogamp.opengl.GLProfile.get(GLProfile.java:1042)
        at com.jogamp.opengl.GLProfile.get(GLProfile.java:1071)
        at com.jogamp.opengl.GLProfile.getMaxFixedFunc(GLProfile.java:824)
        at javax.media.j3d.JoglPipeline.initialize(JoglPipeline.java:131)
        at javax.media.j3d.Pipeline.createPipeline(Pipeline.java:92)
        at javax.media.j3d.MasterControl.loadLibraries(MasterControl.java:858)
        at javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:267)
        at me.drton.jmavsim.Visualizer3D.<init>(Visualizer3D.java:194)
        at me.drton.jmavsim.Simulator.<init>(Simulator.java:193)
        at me.drton.jmavsim.Simulator.main(Simulator.java:944)
        ... 5 more
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007ff8a968b611, pid=9020, tid=9053
#
# JRE version: OpenJDK Runtime Environment (17.0.7+7) (build 17.0.7+7-Ubuntu-0ubuntu120.04)
# Java VM: OpenJDK 64-Bit Server VM (17.0.7+7-Ubuntu-0ubuntu120.04, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# C  [libnvwgf2umx.so+0x1a47611]
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/paolo/PX4-Autopilot/Tools/simulation/jmavsim/jMAVSim/out/production/hs_err_pid9020.log

I’m using Windows 11 with WSL. I followed all the steps showed in the documentation.

How can I fix this? Thanks in advance.

Looks somewhat similar to A java problem with make posix jmavsim in Ubuntu · Issue #9557 · PX4/PX4-Autopilot · GitHub

@JulianOes I tried to disable my GPU and seems to work properly. The only problem is that if I stop the simulation jmavsim’s window does not close (not sure if is related to jmavsim or WSL in general).

Interesting. I wouldn’t know I’m afraid.

Hello!I am using WSL2(Ubuntu 20.04) and I have the same problem with you. But I used a laptop which setting information is listed follow:

Current date/time: January 18, 2024, 10:30:24
Operating system: Windows 11 Home Chinese version 64 bit (10.0, version 22621)
Language: Chinese (Simplified) (Regional Settings: Chinese (Simplified)
System manufacturer: LENOVO
System model: 20YN
BIOS: GWCN29WW
Processor: AMD Ryzen 7 5800H with Radeon Graphics
(16 CPUs), ~3.2GHz
Memory: 16384MBRAM
Page file: 13659MB used, 9243MB available
DirectX version: DirectX 12

And I am new in computer,I just know that I don’t have external GPU in this laptop, may be I should have one and disable the inner to solve this problem?