wpilibsuite / 2024Beta

Repository for Beta Testing of 2024 Software
32 stars 5 forks source link

Simulation fails (Linux) #27

Closed chauser closed 10 months ago

chauser commented 10 months ago

For Both Java and C++ I get a fatal error when attempting to simulate even very simple robot programs (my current examples are the supplied Relay examples). Building goes fine. But after selecting the extensions to load, I get the following for C++:

HAL Extensions: Attempting to load: libhalsim_guid
Simulator GUI Initializing.
frcUserProgram: /__w/thirdparty-imgui/thirdparty-imgui/glfw/src/x11_init.c:1099: _glfwGrabErrorHandlerX11: Assertion `_glfw.x11.errorHandler == NULL' failed.

and for Java:

desktop:~/sciborgs-2024-beta/Relay-example$  cd /home/hauser/sciborgs-2024-beta/Relay-example ; /usr/bin/env HALSIM_EXTENSIONS=/oldRoot/home/hauser/sciborgs-2024-beta/Relay-example/build/jni/release/libhalsim_gui.so: DYLD_LIBRARY_PATH=/oldRoot/home/hauser/sciborgs-2024-beta/Relay-example/build/jni/release LD_LIBRARY_PATH=/oldRoot/home/hauser/sciborgs-2024-beta/Relay-example/build/jni/release /usr/lib/jvm/java-17-openjdk-amd64/bin/java -agentlib:jdwp=transport=dt_socket,server=n,suspend=y,address=localhost:35903 @/tmp/cp_4k0zjudxlm5mz0cuj60pb1jgm.argfile frc.robot.Main 
HAL Extensions: Attempting to load: libhalsim_gui
Simulator GUI Initializing.
java: /__w/thirdparty-imgui/thirdparty-imgui/glfw/src/x11_init.c:1099: _glfwGrabErrorHandlerX11: Assertion `_glfw.x11.errorHandler == NULL' failed.
Aborted (core dumped)
PeterJohnson commented 10 months ago

What specific Linux distro/version and window manager (Wayland or X11?)

chauser commented 10 months ago

Ubuntu 22.04.1 X11 I use the xmonad tiling window manager. I can try this on a gnome desktop if you think this is a relevant factor. Oh, and this was not a problem on this machine for WPILib 2023 in any of its releases.

chauser commented 10 months ago

The same tests on an X11/Gnome desktop (same machine) worked correctly. Then upon switching back to the xmonad desktop that also worked correctly. I'm not sure whether it was the desktop switch or the mere fact of logging out and logging in again that fixed the problem. Regardless, it's not an issue any more. Closing.