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

Issues on Linux #6

Closed
Starcommander opened this issue Nov 8, 2023 · 34 comments
Closed

Issues on Linux #6

Starcommander opened this issue Nov 8, 2023 · 34 comments

Comments

@Starcommander
Copy link

I tried out to get the Tamarin-Project working on linux using monado-service(libsurvive) on Debian11.
So I cloned the TamarinTestBed-Project.
But cannot run the project because of the following issues:

Log output:

Nov. 08, 2023 10:10:25 PM com.jme3.system.JmeDesktopSystem initialize
INFORMATION: Running on jMonkeyEngine 3.6.1-stable
 * Branch: HEAD
 * Git Hash: 4de10c3
 * Build Date: 2023-06-23
Nov. 08, 2023 10:10:26 PM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFORMATION: LWJGL 3.3.2-snapshot context running on thread jME3 Main
 * Graphics Adapter: GLFW 3.4.0 Wayland X11 GLX Null EGL OSMesa monotonic shared
Nov. 08, 2023 10:10:26 PM com.jme3.renderer.opengl.GLRenderer loadCapabilitiesCommon
INFORMATION: OpenGL Renderer Information
 * Vendor: AMD
 * Renderer: Radeon RX 5500 XT (NAVI14, DRM 3.40.0, 5.10.0-26-amd64, LLVM 11.0.1)
 * OpenGL Version: 4.6 (Core Profile) Mesa 20.3.5
 * GLSL Version: 4.60
 * Profile: Core
Nov. 08, 2023 10:10:26 PM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFORMATION: Audio Renderer Information
 * Device: OpenAL Soft
 * Vendor: OpenAL Community
 * Renderer: OpenAL Soft
 * Version: 1.1 ALSOFT 1.23.0
 * Supported channels: 64
 * ALC extensions: ALC_ENUMERATE_ALL_EXT ALC_ENUMERATION_EXT ALC_EXT_CAPTURE ALC_EXT_DEDICATED ALC_EXT_disconnect ALC_EXT_EFX ALC_EXT_thread_local_context ALC_SOFT_device_clock ALC_SOFT_HRTF ALC_SOFT_loopback ALC_SOFT_loopback_bformat ALC_SOFT_output_limiter ALC_SOFT_output_mode ALC_SOFT_pause_device ALC_SOFT_reopen_device
 * AL extensions: AL_EXT_ALAW AL_EXT_BFORMAT AL_EXT_DOUBLE AL_EXT_EXPONENT_DISTANCE AL_EXT_FLOAT32 AL_EXT_IMA4 AL_EXT_LINEAR_DISTANCE AL_EXT_MCFORMATS AL_EXT_MULAW AL_EXT_MULAW_BFORMAT AL_EXT_MULAW_MCFORMATS AL_EXT_OFFSET AL_EXT_source_distance_model AL_EXT_SOURCE_RADIUS AL_EXT_STEREO_ANGLES AL_LOKI_quadriphonic AL_SOFT_bformat_ex AL_SOFTX_bformat_hoa AL_SOFT_block_alignment AL_SOFT_callback_buffer AL_SOFTX_convolution_reverb AL_SOFT_deferred_updates AL_SOFT_direct_channels AL_SOFT_direct_channels_remix AL_SOFT_effect_target AL_SOFT_events AL_SOFT_gain_clamp_ex AL_SOFTX_hold_on_disconnect AL_SOFT_loop_points AL_SOFTX_map_buffer AL_SOFT_MSADPCM AL_SOFT_source_latency AL_SOFT_source_length AL_SOFT_source_resampler AL_SOFT_source_spatialize AL_SOFTX_source_start_delay AL_SOFT_UHJ
Nov. 08, 2023 10:10:26 PM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFORMATION: Audio effect extension version: 1.0
Nov. 08, 2023 10:10:26 PM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFORMATION: Audio max auxiliary sends: 2
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Nov. 08, 2023 10:10:28 PM com.onemillionworlds.tamarin.openxr.OpenXrSessionManager makeLayersCheck
INFORMATION: XR core validation not available
LOG in xrCreateInstance: Instance created
	createInfo->applicationInfo.applicationName: Tamarin OpenXR Example
	createInfo->applicationInfo.applicationVersion: 0
	createInfo->applicationInfo.engineName: 
	createInfo->applicationInfo.engineVersion: 0
	appinfo.detected.engine.name: (null)
	appinfo.detected.engine.version: 0.0.0
	quirks.disable_vulkan_format_depth_stencil: false
LOG in xrCreateInstance: Selected devices
	Head: 'HTC Vive (libsurvive)'
	Eyes: '<none>'
	Left: '<none>'
	Right: '<none>'
	Gamepad: '<none>'
	Hand-Tracking Left: '<none>'
	Hand-Tracking Right: '<none>'
Nov. 08, 2023 10:10:28 PM com.onemillionworlds.tamarin.openxr.OpenXrSessionManager initializeAndBindOpenGL
INFORMATION: The OpenXR runtime supports OpenGL 3.0 to OpenGL 4.6
Nov. 08, 2023 10:10:28 PM com.jme3.app.LegacyApplication handleError
SCHWERWIEGEND: Uncaught exception thrown in Thread[jME3 Main,5,main]
java.lang.NullPointerException
	at org.lwjgl.system.Checks.check(Checks.java:188)
	at org.lwjgl.openxr.XrGraphicsBindingEGLMNDX.ndisplay(XrGraphicsBindingEGLMNDX.java:307)
	at org.lwjgl.openxr.XrGraphicsBindingEGLMNDX.display(XrGraphicsBindingEGLMNDX.java:137)
	at com.onemillionworlds.tamarin.openxr.XrUtils.createGraphicsBindingOpenGL(XrUtils.java:120)
	at com.onemillionworlds.tamarin.openxr.OpenXrSessionManager.initializeAndBindOpenGL(OpenXrSessionManager.java:290)
	at com.onemillionworlds.tamarin.openxr.OpenXrSessionManager.createOpenXrSession(OpenXrSessionManager.java:169)
	at com.onemillionworlds.tamarin.openxr.XrAppState.initialize(XrAppState.java:93)
	at com.jme3.app.state.BaseAppState.initialize(BaseAppState.java:129)
	at com.jme3.app.state.AppStateManager.initializePending(AppStateManager.java:332)
	at com.jme3.app.state.AppStateManager.update(AppStateManager.java:362)
	at com.jme3.app.SimpleApplication.update(SimpleApplication.java:258)
	at com.jme3.system.lwjgl.LwjglWindow.runLoop(LwjglWindow.java:628)
	at com.jme3.system.lwjgl.LwjglWindow.run(LwjglWindow.java:717)
	at java.base/java.lang.Thread.run(Thread.java:833)

Nov. 08, 2023 10:10:28 PM com.jme3.system.JmeSystemDelegate lambda$new$0
WARNUNG: JmeDialogsFactory implementation not found.
Uncaught exception thrown in Thread[jME3 Main,5,main]
NullPointerException

Exception: java.lang.NullPointerException thrown from the UncaughtExceptionHandler in thread "jME3 Main"

Seems there is a problem with using EGL-Bindings --> XrUtils.java:120
So I uncommented the "useEGL" block.

But now another issue occurs:

Nov. 08, 2023 10:17:49 PM com.jme3.system.JmeDesktopSystem initialize
INFORMATION: Running on jMonkeyEngine 3.6.1-stable
 * Branch: HEAD
 * Git Hash: 4de10c3
 * Build Date: 2023-06-23
Nov. 08, 2023 10:17:50 PM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFORMATION: LWJGL 3.3.2-snapshot context running on thread jME3 Main
 * Graphics Adapter: GLFW 3.4.0 Wayland X11 GLX Null EGL OSMesa monotonic shared
Nov. 08, 2023 10:17:50 PM com.jme3.renderer.opengl.GLRenderer loadCapabilitiesCommon
INFORMATION: OpenGL Renderer Information
 * Vendor: AMD
 * Renderer: Radeon RX 5500 XT (NAVI14, DRM 3.40.0, 5.10.0-26-amd64, LLVM 11.0.1)
 * OpenGL Version: 4.6 (Core Profile) Mesa 20.3.5
 * GLSL Version: 4.60
 * Profile: Core
Nov. 08, 2023 10:17:50 PM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFORMATION: Audio Renderer Information
 * Device: OpenAL Soft
 * Vendor: OpenAL Community
 * Renderer: OpenAL Soft
 * Version: 1.1 ALSOFT 1.23.0
 * Supported channels: 64
 * ALC extensions: ALC_ENUMERATE_ALL_EXT ALC_ENUMERATION_EXT ALC_EXT_CAPTURE ALC_EXT_DEDICATED ALC_EXT_disconnect ALC_EXT_EFX ALC_EXT_thread_local_context ALC_SOFT_device_clock ALC_SOFT_HRTF ALC_SOFT_loopback ALC_SOFT_loopback_bformat ALC_SOFT_output_limiter ALC_SOFT_output_mode ALC_SOFT_pause_device ALC_SOFT_reopen_device
 * AL extensions: AL_EXT_ALAW AL_EXT_BFORMAT AL_EXT_DOUBLE AL_EXT_EXPONENT_DISTANCE AL_EXT_FLOAT32 AL_EXT_IMA4 AL_EXT_LINEAR_DISTANCE AL_EXT_MCFORMATS AL_EXT_MULAW AL_EXT_MULAW_BFORMAT AL_EXT_MULAW_MCFORMATS AL_EXT_OFFSET AL_EXT_source_distance_model AL_EXT_SOURCE_RADIUS AL_EXT_STEREO_ANGLES AL_LOKI_quadriphonic AL_SOFT_bformat_ex AL_SOFTX_bformat_hoa AL_SOFT_block_alignment AL_SOFT_callback_buffer AL_SOFTX_convolution_reverb AL_SOFT_deferred_updates AL_SOFT_direct_channels AL_SOFT_direct_channels_remix AL_SOFT_effect_target AL_SOFT_events AL_SOFT_gain_clamp_ex AL_SOFTX_hold_on_disconnect AL_SOFT_loop_points AL_SOFTX_map_buffer AL_SOFT_MSADPCM AL_SOFT_source_latency AL_SOFT_source_length AL_SOFT_source_resampler AL_SOFT_source_spatialize AL_SOFTX_source_start_delay AL_SOFT_UHJ
Nov. 08, 2023 10:17:50 PM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFORMATION: Audio effect extension version: 1.0
Nov. 08, 2023 10:17:50 PM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFORMATION: Audio max auxiliary sends: 2
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Nov. 08, 2023 10:17:52 PM com.onemillionworlds.tamarin.openxr.OpenXrSessionManager makeLayersCheck
INFORMATION: XR core validation not available
LOG in xrCreateInstance: Instance created
	createInfo->applicationInfo.applicationName: Tamarin OpenXR Example
	createInfo->applicationInfo.applicationVersion: 0
	createInfo->applicationInfo.engineName: 
	createInfo->applicationInfo.engineVersion: 0
	appinfo.detected.engine.name: (null)
	appinfo.detected.engine.version: 0.0.0
	quirks.disable_vulkan_format_depth_stencil: false
LOG in xrCreateInstance: Selected devices
	Head: 'HTC Vive (libsurvive)'
	Eyes: '<none>'
	Left: '<none>'
	Right: '<none>'
	Gamepad: '<none>'
	Hand-Tracking Left: '<none>'
	Hand-Tracking Right: '<none>'
Nov. 08, 2023 10:17:52 PM com.onemillionworlds.tamarin.openxr.OpenXrSessionManager initializeAndBindOpenGL
INFORMATION: The OpenXR runtime supports OpenGL 3.0 to OpenGL 4.6
Nov. 08, 2023 10:17:52 PM com.onemillionworlds.tamarin.openxr.XrUtils createGraphicsBindingOpenGL
INFORMATION: Using XrGraphicsBindingOpenGLXlibKHR to create the session
Nov. 08, 2023 10:17:52 PM com.onemillionworlds.tamarin.openxr.OpenXrSessionManager initializeAndBindOpenGL
INFORMATION: OpenXR debug utils enabled
Headset name:Monado: HTC Vive (libsurvive) vendor:42 
Headset orientationTracking:true positionTracking:true 
Headset MaxWidth:16384 MaxHeight:16384 MaxLayerCount:16 
XrEventDataSessionStateChanged: state null->IDLE session=140252840699216 time=0
XrEventDataSessionStateChanged: state IDLE->READY session=140252840699216 time=0
XR_ERROR_VALIDATION_FAILURE: xrCreateActionSet(createInfo->type == 0)
Nov. 08, 2023 10:17:53 PM com.onemillionworlds.tamarin.actions.OpenXrActionState withResponseCodeLogging
WARNUNG: java.lang.Throwable: -1 XR_ERROR_VALIDATION_FAILURE occurred during Create action set. The function usage was invalid in some way.
	at com.onemillionworlds.tamarin.actions.OpenXrActionState.withResponseCodeLogging(OpenXrActionState.java:500)
	at com.onemillionworlds.tamarin.actions.OpenXrActionState.registerActions(OpenXrActionState.java:322)
	at com.onemillionworlds.tamarin.actions.OpenXrActionState.update(OpenXrActionState.java:868)
	at com.jme3.app.state.AppStateManager.update(AppStateManager.java:371)
	at com.jme3.app.SimpleApplication.update(SimpleApplication.java:258)
	at com.jme3.system.lwjgl.LwjglWindow.runLoop(LwjglWindow.java:628)
	at com.jme3.system.lwjgl.LwjglWindow.run(LwjglWindow.java:717)
	at java.base/java.lang.Thread.run(Thread.java:833)

Nov. 08, 2023 10:17:53 PM com.onemillionworlds.tamarin.actions.OpenXrActionState withResponseCodeLogging
WARNUNG: Further identical errors will be suppressed. If you don't want that call doNotSupressRepeatedErrors()
Nov. 08, 2023 10:17:53 PM com.jme3.app.LegacyApplication handleError
SCHWERWIEGEND: Uncaught exception thrown in Thread[jME3 Main,5,main]
java.lang.NullPointerException
	at org.lwjgl.system.Pointer$Default.<init>(Pointer.java:88)
	at org.lwjgl.openxr.DispatchableHandle.<init>(DispatchableHandle.java:15)
	at org.lwjgl.openxr.XrActionSet.<init>(XrActionSet.java:20)
	at com.onemillionworlds.tamarin.actions.OpenXrActionState.registerActions(OpenXrActionState.java:324)
	at com.onemillionworlds.tamarin.actions.OpenXrActionState.update(OpenXrActionState.java:868)
	at com.jme3.app.state.AppStateManager.update(AppStateManager.java:371)
	at com.jme3.app.SimpleApplication.update(SimpleApplication.java:258)
	at com.jme3.system.lwjgl.LwjglWindow.runLoop(LwjglWindow.java:628)
	at com.jme3.system.lwjgl.LwjglWindow.run(LwjglWindow.java:717)
	at java.base/java.lang.Thread.run(Thread.java:833)

Nov. 08, 2023 10:17:53 PM com.jme3.system.JmeSystemDelegate lambda$new$0
WARNUNG: JmeDialogsFactory implementation not found.
Uncaught exception thrown in Thread[jME3 Main,5,main]
NullPointerException
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f8f704299b5, pid=79079, tid=79099
#
# JRE version: OpenJDK Runtime Environment (17.0.7+7) (build 17.0.7+7-Debian-1deb11u1)
# Java VM: OpenJDK 64-Bit Server VM (17.0.7+7-Debian-1deb11u1, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# C  [libjemalloc.so+0x149b5]
#
# 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/ppp/workspace/debian/monado-service/TamarinTestBed/hs_err_pid79079.log
#
# If you would like to submit a bug report, please visit:
#   https://bugs.debian.org/openjdk-17
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

Any idea howto fix this?
Basically openxr is working with my jme3-xr branch.

@oneMillionWorlds
Copy link
Owner

EGL-Bindings are meant to be very badly supported. Maybe I'll just stop trying to use them even if the runtime claims they are available.

Are you able to progressively comment out the withAction calls in Main.java. See which set of actions is upsetting it (I hate -1 errors, they are so vague).

Those logs seem to suggest you have no hand controllers, is that true?

@Starcommander
Copy link
Author

I did the test without the hand controllers, yes.
Trying to comment out some "withAction" lines...

@oneMillionWorlds
Copy link
Owner

"I did the test without the hand controllers, yes."

I wonder if that's the problem. That section of code is all about setting up the hand controllers. Are you able to try it with controllers and see if it still happens?

@Starcommander
Copy link
Author

Seems none of that actions is working.
I tried it out with

  • 'grip' only -> same issue
  • 'turnLeft' only -> same issue
  • 'trigger' only -> same issue
    Also with all actions commented out, I get this issue.

Tried out with controllers, but they are not recognized by monado-service.
Actually I have to find out why.
Maybe this is the issue.
Tamarin not possible without controllers?

@oneMillionWorlds
Copy link
Owner

Tamarin not possible without controllers?

Well the OpenXrActionState and VRHandsAppState are exclusively for controllers. Seems like it gets through the base XrAppState without them (Shame if it exceptions weirdly without them though rather than just claiming no button presses).

I do have a linux machine kicking about, maybe I should dig it out and see if I get similar problems

@Starcommander
Copy link
Author

I am not sure about recognition.
Some relevant output of monado-service:

Info: Adding tracked object HMD from HTC
Info: Adding tracked object WM0 from HTC
Info: Adding tracked object WM1 from HTC
...
...
...
	Selected lighthouse because it was certain it could create a head
	Using builder lighthouse: Lighthouse-tracked (Vive, Index, Tundra trackers, etc.) devices builder
	Got devices:
		0: HTC Vive (libsurvive)
	In roles:
		head: HTC Vive (libsurvive)
		eyes: <none>
		left: <none>
		right: <none>
		gamepad: <none>
		hand_tracking.left: <none>
		hand_tracking.right: <none>
	Result: XRT_SUCCESS

@Starcommander
Copy link
Author

Without controllers WM0 and WM1 are not listed.

@oneMillionWorlds
Copy link
Owner

I tried to get my quest 2 to work on my linux machine machine but it seems decidedly difficult (officially non supported and lots of building stuff from source). Are you able to try with SteamVR on linux and see if it behaves any better than Monado?

@Starcommander
Copy link
Author

I tried it with SteamVR but it is not easy.
Do I have to run SteamVR first, where I get the VR-Room?
There the HMD as well as the controllers are working.

Then I try to start the TamarinTestBed-App, and I get this:

Nov. 11, 2023 11:32:39 PM com.jme3.system.JmeDesktopSystem initialize
INFORMATION: Running on jMonkeyEngine 3.6.1-stable
 * Branch: HEAD
 * Git Hash: 4de10c3
 * Build Date: 2023-06-23
Nov. 11, 2023 11:32:39 PM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFORMATION: LWJGL 3.3.2-snapshot context running on thread jME3 Main
 * Graphics Adapter: GLFW 3.4.0 Wayland X11 GLX Null EGL OSMesa monotonic shared
Nov. 11, 2023 11:32:39 PM com.jme3.renderer.opengl.GLRenderer loadCapabilitiesCommon
INFORMATION: OpenGL Renderer Information
 * Vendor: AMD
 * Renderer: Radeon RX 5500 XT (NAVI14, DRM 3.40.0, 5.10.0-26-amd64, LLVM 11.0.1)
 * OpenGL Version: 4.6 (Core Profile) Mesa 20.3.5
 * GLSL Version: 4.60
 * Profile: Core
Nov. 11, 2023 11:32:40 PM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFORMATION: Audio Renderer Information
 * Device: OpenAL Soft
 * Vendor: OpenAL Community
 * Renderer: OpenAL Soft
 * Version: 1.1 ALSOFT 1.23.0
 * Supported channels: 64
 * ALC extensions: ALC_ENUMERATE_ALL_EXT ALC_ENUMERATION_EXT ALC_EXT_CAPTURE ALC_EXT_DEDICATED ALC_EXT_disconnect ALC_EXT_EFX ALC_EXT_thread_local_context ALC_SOFT_device_clock ALC_SOFT_HRTF ALC_SOFT_loopback ALC_SOFT_loopback_bformat ALC_SOFT_output_limiter ALC_SOFT_output_mode ALC_SOFT_pause_device ALC_SOFT_reopen_device
 * AL extensions: AL_EXT_ALAW AL_EXT_BFORMAT AL_EXT_DOUBLE AL_EXT_EXPONENT_DISTANCE AL_EXT_FLOAT32 AL_EXT_IMA4 AL_EXT_LINEAR_DISTANCE AL_EXT_MCFORMATS AL_EXT_MULAW AL_EXT_MULAW_BFORMAT AL_EXT_MULAW_MCFORMATS AL_EXT_OFFSET AL_EXT_source_distance_model AL_EXT_SOURCE_RADIUS AL_EXT_STEREO_ANGLES AL_LOKI_quadriphonic AL_SOFT_bformat_ex AL_SOFTX_bformat_hoa AL_SOFT_block_alignment AL_SOFT_callback_buffer AL_SOFTX_convolution_reverb AL_SOFT_deferred_updates AL_SOFT_direct_channels AL_SOFT_direct_channels_remix AL_SOFT_effect_target AL_SOFT_events AL_SOFT_gain_clamp_ex AL_SOFTX_hold_on_disconnect AL_SOFT_loop_points AL_SOFTX_map_buffer AL_SOFT_MSADPCM AL_SOFT_source_latency AL_SOFT_source_length AL_SOFT_source_resampler AL_SOFT_source_spatialize AL_SOFTX_source_start_delay AL_SOFT_UHJ
Nov. 11, 2023 11:32:40 PM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFORMATION: Audio effect extension version: 1.0
Nov. 11, 2023 11:32:40 PM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFORMATION: Audio max auxiliary sends: 2
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Nov. 11, 2023 11:32:43 PM com.onemillionworlds.tamarin.openxr.OpenXrSessionManager makeLayersCheck
INFORMATION: XR core validation not available
Nov. 11, 2023 11:32:43 PM com.onemillionworlds.tamarin.openxr.OpenXrSessionManager initializeAndBindOpenGL
INFORMATION: The OpenXR runtime supports OpenGL 4.3 to OpenGL 4.6
Nov. 11, 2023 11:32:43 PM com.onemillionworlds.tamarin.openxr.XrUtils createGraphicsBindingOpenGL
INFORMATION: Using XrGraphicsBindingOpenGLXlibKHR to create the session
/media/Play/Games/steamapps-deb/common/SteamVR/bin/vrwebhelper/linux64/vrwebhelper.sh: Zeile 17: STEAMVR_VRENV ist nicht gesetzt.
Nov. 11, 2023 11:32:44 PM com.onemillionworlds.tamarin.openxr.OpenXrSessionManager initializeAndBindOpenGL
INFORMATION: OpenXR debug utils enabled
Headset name:SteamVR/OpenXR : lighthouse vendor:10462 
Headset orientationTracking:true positionTracking:true 
Headset MaxWidth:1600 MaxHeight:1776 MaxLayerCount:16 
Nov. 11, 2023 11:32:44 PM com.jme3.app.LegacyApplication handleError
SCHWERWIEGEND: Uncaught exception thrown in Thread[jME3 Main,5,main]
java.lang.IllegalStateException: No compatable swapchain / framebuffer format availible
	at com.onemillionworlds.tamarin.openxr.OpenXrSessionManager.createXRSwapchains(OpenXrSessionManager.java:428)
	at com.onemillionworlds.tamarin.openxr.OpenXrSessionManager.createOpenXrSession(OpenXrSessionManager.java:171)
	at com.onemillionworlds.tamarin.openxr.XrAppState.initialize(XrAppState.java:93)
	at com.jme3.app.state.BaseAppState.initialize(BaseAppState.java:129)
	at com.jme3.app.state.AppStateManager.initializePending(AppStateManager.java:332)
	at com.jme3.app.state.AppStateManager.update(AppStateManager.java:362)
	at com.jme3.app.SimpleApplication.update(SimpleApplication.java:258)
	at com.jme3.system.lwjgl.LwjglWindow.runLoop(LwjglWindow.java:628)
	at com.jme3.system.lwjgl.LwjglWindow.run(LwjglWindow.java:717)
	at java.base/java.lang.Thread.run(Thread.java:833)

Nov. 11, 2023 11:32:44 PM com.jme3.system.JmeSystemDelegate lambda$new$0
WARNUNG: JmeDialogsFactory implementation not found.
Uncaught exception thrown in Thread[jME3 Main,5,main]
IllegalStateException: No compatable swapchain / framebuffer format availible

Exception: java.lang.NullPointerException thrown from the UncaughtExceptionHandler in thread "jME3 Main"
[LWJGL] Failed to attach native thread to the JVM.[LWJGL] Failed to attach native thread to the JVM.wine@ppp-desktop:~/TamarinTestSteamVr/TamarinTestBed$ LuaDbg - Debugging stopped
CSteam3Client::Shutdown
steamtours.sh[4799]: === Sat Nov 11 23:32:54 CET 2023 ===
steamtours.sh[4799]: Executing under scout LDLP runtime.
steamtours.sh[4799]: exec /home/wine/.steam/bin/steam-runtime/run.sh /media/Play/Games/steamapps-deb/common/SteamVR/tools/steamvr_environments/game/steamtours.sh -vr -retail -vulkan -useappid SteamVRAppID -nowindow -vconport 29009
steamtours.sh[4799]: Detected scout LDLP runtime.
Loaded file game                    engine2                    5.254 msec     8470 kb 	 /media/Play/Games/steamapps-deb/common/SteamVR/tools/steamvr_environments/game/bin/linuxsteamrt64/libengine2.so
Loaded file game                    tier0                      0.214 msec      544 kb 	 /media/Play/Games/steamapps-deb/common/SteamVR/tools/steamvr_environments/game/bin/linuxsteamrt64/libtier0.so
Loaded file game                    vstdlib                    0.117 msec      379 kb 	 /media/Play/Games/steamapps-deb/common/SteamVR/tools/steamvr_environments/game/bin/linuxsteamrt64/libvstdlib.so
Loaded file game                    filesystem_stdio           0.102 msec      356 kb 	 /media/Play/Games/steamapps-deb/common/SteamVR/tools/steamvr_environments/game/bin/linuxsteamrt64/libfilesystem_stdio.so
Loaded file game                    vr                         0.299 msec      873 kb 	 /media/Play/Games/steamapps-deb/common/SteamVR/tools/steamvr_environments/game/bin/linuxsteamrt64/libvr.so
Loaded file game                    openvr_api                 0.090 msec      317 kb 	 /media/Play/Games/steamapps-deb/common/SteamVR/tools/steamvr_environments/game/bin/linuxsteamrt64/libopenvr_api.so
Loaded file game                    inputsystem                0.047 msec      175 kb 	 /media/Play/Games/steamapps-deb/common/SteamVR/tools/steamvr_environments/game/bin/linuxsteamrt64/libinputsystem.so
Loaded file game                    localize                   0.040 msec      142 kb 	 /media/Play/Games/steamapps-deb/common/SteamVR/tools/steamvr_environments/game/bin/linuxsteamrt64/liblocalize.so
Loaded file game                    resourcesystem             0.146 msec      464 kb 	 /media/Play/Games/steamapps-deb/common/SteamVR/tools/steamvr_environments/game/bin/linuxsteamrt64/libresourcesystem.so
Loaded file game                    schemasystem               0.097 msec      393 kb 	 /media/Play/Games/steamapps-deb/common/SteamVR/tools/steamvr_environments/game/bin/linuxsteamrt64/libschemasystem.so
Loaded file game                    materialsystem2            0.334 msec     1104 kb 	 /media/Play/Games/steamapps-deb/common/SteamVR/tools/steamvr_environments/game/bin/linuxsteamrt64/libmaterialsystem2.so
Loaded file game                    meshsystem                 0.327 msec     1118 kb 	 /media/Play/Games/steamapps-deb/common/SteamVR/tools/steamvr_environments/game/bin/linuxsteamrt64/libmeshsystem.so
Loaded file game                    worldrenderer              0.354 msec     1167 kb 	 /media/Play/Games/steamapps-deb/common/SteamVR/tools/steamvr_environments/game/bin/linuxsteamrt64/libworldrenderer.so
Loaded file game                    vscript                    0.222 msec      655 kb 	 /media/Play/Games/steamapps-deb/common/SteamVR/tools/steamvr_environments/game/bin/linuxsteamrt64/libvscript.so
Loaded file game                    networksystem              1.091 msec     3349 kb 	 /media/Play/Games/steamapps-deb/common/SteamVR/tools/steamvr_environments/game/bin/linuxsteamrt64/libnetworksystem.so
Loaded file game                    animationsystem            1.137 msec     3315 kb 	 /media/Play/Games/steamapps-deb/common/SteamVR/tools/steamvr_environments/game/bin/linuxsteamrt64/libanimationsystem.so
Loaded file game                    vphysics2                  1.203 msec     3928 kb 	 /media/Play/Games/steamapps-deb/common/SteamVR/tools/steamvr_environments/game/bin/linuxsteamrt64/libvphysics2.so
Loaded file game                    steamaudio                 0.149 msec      374 kb 	 /media/Play/Games/steamapps-deb/common/SteamVR/tools/steamvr_environments/game/bin/linuxsteamrt64/libsteamaudio.so
Loaded file game                    phonon                    14.208 msec    17227 kb 	 /media/Play/Games/steamapps-deb/common/SteamVR/tools/steamvr_environments/game/bin/linuxsteamrt64/libphonon.so
Loaded file game                    soundsystem                0.773 msec     1879 kb 	 /media/Play/Games/steamapps-deb/common/SteamVR/tools/steamvr_environments/game/bin/linuxsteamrt64/libsoundsystem.so
Loaded file game                    scenesystem                1.293 msec     4017 kb 	 /media/Play/Games/steamapps-deb/common/SteamVR/tools/steamvr_environments/game/bin/linuxsteamrt64/libscenesystem.so
Loaded file game                    v8                        17.540 msec    17771 kb 	 /media/Play/Games/steamapps-deb/common/SteamVR/tools/steamvr_environments/game/bin/linuxsteamrt64/libv8.so
Loaded file game                    video                      1.732 msec     4840 kb 	 /media/Play/Games/steamapps-deb/common/SteamVR/tools/steamvr_environments/game/bin/linuxsteamrt64/libvideo.so
Loaded file game                    icui18n                    1.164 msec     2909 kb 	 /media/Play/Games/steamapps-deb/common/SteamVR/tools/steamvr_environments/game/bin/linuxsteamrt64/libicui18n.so
Loaded file game                    icuuc                      0.638 msec     1871 kb 	 /media/Play/Games/steamapps-deb/common/SteamVR/tools/steamvr_environments/game/bin/linuxsteamrt64/libicuuc.so
Loaded file game                    particles                  1.074 msec     3742 kb 	 /media/Play/Games/steamapps-deb/common/SteamVR/tools/steamvr_environments/game/bin/linuxsteamrt64/libparticles.so
Loaded file game                    panorama                   2.154 msec     6779 kb 	 /media/Play/Games/steamapps-deb/common/SteamVR/tools/steamvr_environments/game/bin/linuxsteamrt64/libpanorama.so
Loaded file game                    panorama_text_pango        0.904 msec     2265 kb 	 /media/Play/Games/steamapps-deb/common/SteamVR/tools/steamvr_environments/game/bin/linuxsteamrt64/libpanorama_text_pango.so
Loaded file game                    renderingpipelines         0.172 msec      517 kb 	 /media/Play/Games/steamapps-deb/common/SteamVR/tools/steamvr_environments/game/bin/linuxsteamrt64/librenderingpipelines.so
Loaded file game                    scenefilecache             0.069 msec      214 kb 	 /media/Play/Games/steamapps-deb/common/SteamVR/tools/steamvr_environments/game/bin/linuxsteamrt64/libscenefilecache.so
LoadModule Total:   54.030 msec

Loaded VPK Total:    0.036 msec

Total Preload Time:   54.066 msec
Using breakpad crash handler
[S_API] SteamAPI_Init(): Loaded '/home/wine/.steam/debian-installation/linux64/steamclient.so' OK.
Setting breakpad minidump AppID = 250820
Forcing breakpad minidump interfaces to load
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
11/11 23:32:54 Init: Installing breakpad exception handler for appid(250820)/version(8389430)/tid(4824)
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
Steam_SetMinidumpSteamID:  Caching Steam ID:  76561198118877751 [API loaded yes]
Steam_SetMinidumpSteamID:  Setting Steam ID:  76561198118877751
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
/media/Play/Games/steamapps-deb/common/SteamVR/bin/vrwebhelper/linux64/vrwebhelper.sh: line 17: STEAMVR_VRENV: unbound variable
Fossilize INFO: Overriding serialization path: "/media/Play/Games/steamapps-deb/shadercache/250820/fozpipelinesv6/steamapprun_pipeline_cache".
Fontconfig warning: "/media/Play/Games/steamapps-deb/common/SteamVR/tools/steamvr_environments/game/core/panorama/fonts/conf.d/41-repl-os-win.conf", line 148: Having multiple values in <test> isn't supported and may not work as expected
Fontconfig warning: "/media/Play/Games/steamapps-deb/common/SteamVR/tools/steamvr_environments/game/core/panorama/fonts/conf.d/41-repl-os-win.conf", line 160: Having multiple values in <test> isn't supported and may not work as expected
[S_API] SteamAPI_Init(): Loaded '/home/wine/.steam/debian-installation/linux64/steamclient.so' OK.
CAppInfoCacheReadFromDiskThread took 5 milliseconds to initialize
dlmopen steamservice.so failed: steamservice.so: cannot open shared object file: No such file or directory
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
Steam_SetMinidumpSteamID:  Caching Steam ID:  76561198118877751 [API loaded yes]
Steam_SetMinidumpSteamID:  Setting Steam ID:  76561198118877751
OnDismissButtonClicked
Destroy() is failed!!
LuaDbg - Debugging stopped
CSteam3Client::Shutdown

Still just showing the VR-Room of steam.
When I first start TamarinTestBed, then it starts SteamVR with same result.

@oneMillionWorlds
Copy link
Owner

oneMillionWorlds commented Nov 12, 2023

I tried it with SteamVR but it is not easy.
Do I have to run SteamVR first, where I get the VR-Room?

Yes, for me its SteamVR in the VR-Room then start a Tamarin Application and it detects steamVr and boots to it.

java.lang.IllegalStateException: No compatable swapchain / framebuffer format availible

Ah, I know that one, I have a fix for it. Could you try version 2.1.2? I was being very conservative in the image formats I was mapping. 2.1.2 maps a lot more formats (as well as some other fixes including making it back off the egl bindings if the EGL display is null)

@Starcommander
Copy link
Author

Unfortunately same issue with 2.1.2
I get also the same issue with jme3-xr implemention when using steamvr.

Nov. 15, 2023 8:08:59 PM com.jme3.system.JmeDesktopSystem initialize
INFORMATION: Running on jMonkeyEngine 3.6.1-stable
 * Branch: HEAD
 * Git Hash: 4de10c3
 * Build Date: 2023-06-23
Nov. 15, 2023 8:09:00 PM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFORMATION: LWJGL 3.3.2-snapshot context running on thread jME3 Main
 * Graphics Adapter: GLFW 3.4.0 Wayland X11 GLX Null EGL OSMesa monotonic shared
Nov. 15, 2023 8:09:00 PM com.jme3.renderer.opengl.GLRenderer loadCapabilitiesCommon
INFORMATION: OpenGL Renderer Information
 * Vendor: AMD
 * Renderer: Radeon RX 5500 XT (NAVI14, DRM 3.40.0, 5.10.0-26-amd64, LLVM 11.0.1)
 * OpenGL Version: 4.6 (Core Profile) Mesa 20.3.5
 * GLSL Version: 4.60
 * Profile: Core
Nov. 15, 2023 8:09:00 PM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFORMATION: Audio Renderer Information
 * Device: OpenAL Soft
 * Vendor: OpenAL Community
 * Renderer: OpenAL Soft
 * Version: 1.1 ALSOFT 1.23.0
 * Supported channels: 64
 * ALC extensions: ALC_ENUMERATE_ALL_EXT ALC_ENUMERATION_EXT ALC_EXT_CAPTURE ALC_EXT_DEDICATED ALC_EXT_disconnect ALC_EXT_EFX ALC_EXT_thread_local_context ALC_SOFT_device_clock ALC_SOFT_HRTF ALC_SOFT_loopback ALC_SOFT_loopback_bformat ALC_SOFT_output_limiter ALC_SOFT_output_mode ALC_SOFT_pause_device ALC_SOFT_reopen_device
 * AL extensions: AL_EXT_ALAW AL_EXT_BFORMAT AL_EXT_DOUBLE AL_EXT_EXPONENT_DISTANCE AL_EXT_FLOAT32 AL_EXT_IMA4 AL_EXT_LINEAR_DISTANCE AL_EXT_MCFORMATS AL_EXT_MULAW AL_EXT_MULAW_BFORMAT AL_EXT_MULAW_MCFORMATS AL_EXT_OFFSET AL_EXT_source_distance_model AL_EXT_SOURCE_RADIUS AL_EXT_STEREO_ANGLES AL_LOKI_quadriphonic AL_SOFT_bformat_ex AL_SOFTX_bformat_hoa AL_SOFT_block_alignment AL_SOFT_callback_buffer AL_SOFTX_convolution_reverb AL_SOFT_deferred_updates AL_SOFT_direct_channels AL_SOFT_direct_channels_remix AL_SOFT_effect_target AL_SOFT_events AL_SOFT_gain_clamp_ex AL_SOFTX_hold_on_disconnect AL_SOFT_loop_points AL_SOFTX_map_buffer AL_SOFT_MSADPCM AL_SOFT_source_latency AL_SOFT_source_length AL_SOFT_source_resampler AL_SOFT_source_spatialize AL_SOFTX_source_start_delay AL_SOFT_UHJ
Nov. 15, 2023 8:09:00 PM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFORMATION: Audio effect extension version: 1.0
Nov. 15, 2023 8:09:00 PM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFORMATION: Audio max auxiliary sends: 2
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Nov. 15, 2023 8:09:03 PM com.onemillionworlds.tamarin.openxr.OpenXrSessionManager makeLayersCheck
INFORMATION: XR core validation not available
Nov. 15, 2023 8:09:04 PM com.onemillionworlds.tamarin.openxr.OpenXrSessionManager initializeAndBindOpenGL
INFORMATION: The OpenXR runtime supports OpenGL 4.3 to OpenGL 4.6
Nov. 15, 2023 8:09:04 PM com.onemillionworlds.tamarin.openxr.XrUtils createGraphicsBindingOpenGL
INFORMATION: Using XrGraphicsBindingOpenGLXlibKHR to create the session
/media/Play/Games/steamapps-deb/common/SteamVR/bin/vrwebhelper/linux64/vrwebhelper.sh: Zeile 17: STEAMVR_VRENV ist nicht gesetzt.
Nov. 15, 2023 8:09:04 PM com.onemillionworlds.tamarin.openxr.OpenXrSessionManager initializeAndBindOpenGL
INFORMATION: OpenXR debug utils enabled
Headset name:SteamVR/OpenXR : lighthouse vendor:10462 
Headset orientationTracking:true positionTracking:true 
Headset MaxWidth:1600 MaxHeight:1776 MaxLayerCount:16 
Nov. 15, 2023 8:09:04 PM com.jme3.app.LegacyApplication handleError
SCHWERWIEGEND: Uncaught exception thrown in Thread[jME3 Main,5,main]
java.lang.IllegalStateException: No compatable swapchain / framebuffer format available, available formats: [35905, 35907, 33189, 33190, 36012]
        at com.onemillionworlds.tamarin.openxr.OpenXrSessionManager.createXRSwapchains(OpenXrSessionManager.java:446)
        at com.onemillionworlds.tamarin.openxr.OpenXrSessionManager.createOpenXrSession(OpenXrSessionManager.java:192)
        at com.onemillionworlds.tamarin.openxr.XrAppState.initialize(XrAppState.java:93)
        at com.jme3.app.state.BaseAppState.initialize(BaseAppState.java:129)
        at com.jme3.app.state.AppStateManager.initializePending(AppStateManager.java:332)
        at com.jme3.app.state.AppStateManager.update(AppStateManager.java:362)
        at com.jme3.app.SimpleApplication.update(SimpleApplication.java:258)
        at com.jme3.system.lwjgl.LwjglWindow.runLoop(LwjglWindow.java:628)
        at com.jme3.system.lwjgl.LwjglWindow.run(LwjglWindow.java:717)
        at java.base/java.lang.Thread.run(Thread.java:833)

Nov. 15, 2023 8:09:04 PM com.jme3.system.JmeSystemDelegate lambda$new$0
WARNUNG: JmeDialogsFactory implementation not found.
Uncaught exception thrown in Thread[jME3 Main,5,main]
IllegalStateException: No compatable swapchain / framebuffer format available, available formats: [35905, 35907, 33189, 33190, 36012]

Exception: java.lang.NullPointerException thrown from the UncaughtExceptionHandler in thread "jME3 Main"
[LWJGL] Failed to attach native thread to the JVM.[LWJGL] Failed to attach native thread to the JVM.

@Starcommander
Copy link
Author

Currently I also get this issue when starting steamvr:
grafik
But SteamVR games are working (at least locomancer) without any issue.
And yes, there are not much vr-games on steam for linux, sadly.

@Starcommander
Copy link
Author

I would prefer using an open source XR-Runtime like Monado.
So I will try to investigate, why controllers are not working currently.

@oneMillionWorlds
Copy link
Owner

oneMillionWorlds commented Nov 16, 2023

And yes, there are not much vr-games on steam for linux, sadly.

It does seem like VR support on linux is quite lacking, which is surprising really given the openness of the openXR

I would prefer using an open source XR-Runtime like Monado.

No worries, I think it probably would fail in exactly the same way.

I think I know the cause of the -1 XR_ERROR_VALIDATION_FAILURE occurred during Create action set error. I've released version 2.1.3 that should resolve it (might be a few minutes till its available on maven central). I've also updated tamarin test bed to stop using dpad style bindings as the dpad extension seems poorly supported

@Starcommander
Copy link
Author

I have found out, why controllers are not supported on my configruation.
It was this one bug:
cntools/libsurvive#294
Now I can see the controllers moving in libsurvive.
So I will try tamarin with new built libsurvive soon.

@Starcommander
Copy link
Author

I tried it out today, but still with tamarin v2.1.2, and get an other similar issue.
Used monado-service with patched libsurvive.
Now we have at least the controllers listed. (Vive Wand Controller)

Nov. 17, 2023 12:24:22 AM com.jme3.system.JmeDesktopSystem initialize
INFORMATION: Running on jMonkeyEngine 3.6.1-stable
 * Branch: HEAD
 * Git Hash: 4de10c3
 * Build Date: 2023-06-23
Nov. 17, 2023 12:24:22 AM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFORMATION: LWJGL 3.3.2-snapshot context running on thread jME3 Main
 * Graphics Adapter: GLFW 3.4.0 Wayland X11 GLX Null EGL OSMesa monotonic shared
Nov. 17, 2023 12:24:23 AM com.jme3.renderer.opengl.GLRenderer loadCapabilitiesCommon
INFORMATION: OpenGL Renderer Information
 * Vendor: AMD
 * Renderer: Radeon RX 5500 XT (NAVI14, DRM 3.40.0, 5.10.0-26-amd64, LLVM 11.0.1)
 * OpenGL Version: 4.6 (Core Profile) Mesa 20.3.5
 * GLSL Version: 4.60
 * Profile: Core
Nov. 17, 2023 12:24:23 AM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFORMATION: Audio Renderer Information
 * Device: OpenAL Soft
 * Vendor: OpenAL Community
 * Renderer: OpenAL Soft
 * Version: 1.1 ALSOFT 1.23.0
 * Supported channels: 64
 * ALC extensions: ALC_ENUMERATE_ALL_EXT ALC_ENUMERATION_EXT ALC_EXT_CAPTURE ALC_EXT_DEDICATED ALC_EXT_disconnect ALC_EXT_EFX ALC_EXT_thread_local_context ALC_SOFT_device_clock ALC_SOFT_HRTF ALC_SOFT_loopback ALC_SOFT_loopback_bformat ALC_SOFT_output_limiter ALC_SOFT_output_mode ALC_SOFT_pause_device ALC_SOFT_reopen_device
 * AL extensions: AL_EXT_ALAW AL_EXT_BFORMAT AL_EXT_DOUBLE AL_EXT_EXPONENT_DISTANCE AL_EXT_FLOAT32 AL_EXT_IMA4 AL_EXT_LINEAR_DISTANCE AL_EXT_MCFORMATS AL_EXT_MULAW AL_EXT_MULAW_BFORMAT AL_EXT_MULAW_MCFORMATS AL_EXT_OFFSET AL_EXT_source_distance_model AL_EXT_SOURCE_RADIUS AL_EXT_STEREO_ANGLES AL_LOKI_quadriphonic AL_SOFT_bformat_ex AL_SOFTX_bformat_hoa AL_SOFT_block_alignment AL_SOFT_callback_buffer AL_SOFTX_convolution_reverb AL_SOFT_deferred_updates AL_SOFT_direct_channels AL_SOFT_direct_channels_remix AL_SOFT_effect_target AL_SOFT_events AL_SOFT_gain_clamp_ex AL_SOFTX_hold_on_disconnect AL_SOFT_loop_points AL_SOFTX_map_buffer AL_SOFT_MSADPCM AL_SOFT_source_latency AL_SOFT_source_length AL_SOFT_source_resampler AL_SOFT_source_spatialize AL_SOFTX_source_start_delay AL_SOFT_UHJ
Nov. 17, 2023 12:24:23 AM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFORMATION: Audio effect extension version: 1.0
Nov. 17, 2023 12:24:23 AM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFORMATION: Audio max auxiliary sends: 2
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Nov. 17, 2023 12:24:25 AM com.onemillionworlds.tamarin.openxr.OpenXrSessionManager makeLayersCheck
INFORMATION: XR core validation not available
LOG in xrCreateInstance: Instance created
	createInfo->applicationInfo.applicationName: Tamarin OpenXR Example
	createInfo->applicationInfo.applicationVersion: 0
	createInfo->applicationInfo.engineName: 
	createInfo->applicationInfo.engineVersion: 0
	appinfo.detected.engine.name: (null)
	appinfo.detected.engine.version: 0.0.0
	quirks.disable_vulkan_format_depth_stencil: false
LOG in xrCreateInstance: Selected devices
	Head: 'HTC Vive (libsurvive)'
	Eyes: '<none>'
	Left: 'Vive Wand Controller (libsurvive)'
	Right: 'Vive Wand Controller (libsurvive)'
	Gamepad: '<none>'
	Hand-Tracking Left: '<none>'
	Hand-Tracking Right: '<none>'
Nov. 17, 2023 12:24:25 AM com.onemillionworlds.tamarin.openxr.OpenXrSessionManager initializeAndBindOpenGL
INFORMATION: The OpenXR runtime supports OpenGL 3.0 to OpenGL 4.6
Nov. 17, 2023 12:24:25 AM com.onemillionworlds.tamarin.openxr.XrUtils createGraphicsBindingOpenGL
INFORMATION: Using XrGraphicsBindingOpenGLXlibKHR to create the session
Nov. 17, 2023 12:24:25 AM com.onemillionworlds.tamarin.openxr.OpenXrSessionManager initializeAndBindOpenGL
INFORMATION: OpenXR debug utils enabled
Headset name:Monado: HTC Vive (libsurvive) vendor:42 
Headset orientationTracking:true positionTracking:true 
Headset MaxWidth:16384 MaxHeight:16384 MaxLayerCount:16 
Nov. 17, 2023 12:24:25 AM com.onemillionworlds.tamarin.openxr.OpenXrSessionManager createXRSwapchains
INFORMATION: Selected colour format 34842 from options [32859, 34842, 35907, 32856, 36012, 33189, 36013]
XrEventDataSessionStateChanged: state null->IDLE session=140213715707152 time=0
XrEventDataSessionStateChanged: state IDLE->READY session=140213715707152 time=0
Nov. 17, 2023 12:24:26 AM com.jme3.anim.SkinningControl controlRender
INFORMATION: Hardware skinning engaged for Armature (Node)
Nov. 17, 2023 12:24:26 AM com.jme3.anim.SkinningControl controlRender
INFORMATION: Hardware skinning engaged for Armature (Node)
Shouldn't render
XrEventDataSessionStateChanged: state READY->SYNCHRONIZED session=140213715707152 time=0
Nov. 17, 2023 12:24:26 AM example.Main lambda$simpleInitApp$1
INFORMATION: System is: Monado: HTC Vive (libsurvive)
XrEventDataSessionStateChanged: state SYNCHRONIZED->VISIBLE session=140213715707152 time=0
XrEventDataSessionStateChanged: state VISIBLE->FOCUSED session=140213715707152 time=0
Nov. 17, 2023 12:24:26 AM com.onemillionworlds.tamarin.actions.OpenXrActionState registerActions
INFORMATION: Registering manifest
XR_ERROR_VALIDATION_FAILURE: xrCreateActionSet(createInfo->type == 0)
Nov. 17, 2023 12:24:26 AM com.jme3.app.LegacyApplication handleError
SCHWERWIEGEND: Uncaught exception thrown in Thread[jME3 Main,5,main]
com.onemillionworlds.tamarin.openxr.OpenXrSessionManager$OpenXrException: XR_ERROR_VALIDATION_FAILURE Context: Creating action set main (Main Actions) p:1
	at com.onemillionworlds.tamarin.openxr.OpenXrSessionManager.checkResponseCode(OpenXrSessionManager.java:891)
	at com.onemillionworlds.tamarin.actions.OpenXrActionState.checkResponseCode(OpenXrActionState.java:521)
	at com.onemillionworlds.tamarin.actions.OpenXrActionState.registerActions(OpenXrActionState.java:323)
	at com.onemillionworlds.tamarin.actions.OpenXrActionState.update(OpenXrActionState.java:901)
	at com.jme3.app.state.AppStateManager.update(AppStateManager.java:371)
	at com.jme3.app.SimpleApplication.update(SimpleApplication.java:258)
	at com.jme3.system.lwjgl.LwjglWindow.runLoop(LwjglWindow.java:628)
	at com.jme3.system.lwjgl.LwjglWindow.run(LwjglWindow.java:717)
	at java.base/java.lang.Thread.run(Thread.java:833)

Nov. 17, 2023 12:24:26 AM com.jme3.system.JmeSystemDelegate lambda$new$0
WARNUNG: JmeDialogsFactory implementation not found.
Uncaught exception thrown in Thread[jME3 Main,5,main]
OpenXrException: XR_ERROR_VALIDATION_FAILURE Context: Creating action set main (Main Actions) p:1
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f86556139b5, pid=47485, tid=47505
#
# JRE version: OpenJDK Runtime Environment (17.0.7+7) (build 17.0.7+7-Debian-1deb11u1)
# Java VM: OpenJDK 64-Bit Server VM (17.0.7+7-Debian-1deb11u1, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# C  [libjemalloc.so+0x149b5]
#
# 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/ppp/workspace/debian/monado-service/TamarinTestBed_212/hs_err_pid47485.log
#
# If you would like to submit a bug report, please visit:
#   https://bugs.debian.org/openjdk-17
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

@oneMillionWorlds
Copy link
Owner

I tried it out today, but still with tamarin v2.1.2, and get an other similar issue.

Sorry about that, not sure why v2.1.3 failed to publish. I've tried again with version 2.1.4, that should sort out the XR_ERROR_VALIDATION_FAILURE at least. (I hope the fatal error is part of the same thing because those are a nightmare to debug)

@Starcommander
Copy link
Author

With 2.1.4 a different issue occurs.
Do I have to disable some unsupported features like handtracking?

Nov. 17, 2023 11:48:16 PM com.jme3.system.JmeDesktopSystem initialize
INFORMATION: Running on jMonkeyEngine 3.6.1-stable
 * Branch: HEAD
 * Git Hash: 4de10c3
 * Build Date: 2023-06-23
Nov. 17, 2023 11:48:17 PM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFORMATION: LWJGL 3.3.2-snapshot context running on thread jME3 Main
 * Graphics Adapter: GLFW 3.4.0 Wayland X11 GLX Null EGL OSMesa monotonic shared
Nov. 17, 2023 11:48:17 PM com.jme3.renderer.opengl.GLRenderer loadCapabilitiesCommon
INFORMATION: OpenGL Renderer Information
 * Vendor: AMD
 * Renderer: Radeon RX 5500 XT (NAVI14, DRM 3.40.0, 5.10.0-26-amd64, LLVM 11.0.1)
 * OpenGL Version: 4.6 (Core Profile) Mesa 20.3.5
 * GLSL Version: 4.60
 * Profile: Core
Nov. 17, 2023 11:48:17 PM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFORMATION: Audio Renderer Information
 * Device: OpenAL Soft
 * Vendor: OpenAL Community
 * Renderer: OpenAL Soft
 * Version: 1.1 ALSOFT 1.23.0
 * Supported channels: 64
 * ALC extensions: ALC_ENUMERATE_ALL_EXT ALC_ENUMERATION_EXT ALC_EXT_CAPTURE ALC_EXT_DEDICATED ALC_EXT_disconnect ALC_EXT_EFX ALC_EXT_thread_local_context ALC_SOFT_device_clock ALC_SOFT_HRTF ALC_SOFT_loopback ALC_SOFT_loopback_bformat ALC_SOFT_output_limiter ALC_SOFT_output_mode ALC_SOFT_pause_device ALC_SOFT_reopen_device
 * AL extensions: AL_EXT_ALAW AL_EXT_BFORMAT AL_EXT_DOUBLE AL_EXT_EXPONENT_DISTANCE AL_EXT_FLOAT32 AL_EXT_IMA4 AL_EXT_LINEAR_DISTANCE AL_EXT_MCFORMATS AL_EXT_MULAW AL_EXT_MULAW_BFORMAT AL_EXT_MULAW_MCFORMATS AL_EXT_OFFSET AL_EXT_source_distance_model AL_EXT_SOURCE_RADIUS AL_EXT_STEREO_ANGLES AL_LOKI_quadriphonic AL_SOFT_bformat_ex AL_SOFTX_bformat_hoa AL_SOFT_block_alignment AL_SOFT_callback_buffer AL_SOFTX_convolution_reverb AL_SOFT_deferred_updates AL_SOFT_direct_channels AL_SOFT_direct_channels_remix AL_SOFT_effect_target AL_SOFT_events AL_SOFT_gain_clamp_ex AL_SOFTX_hold_on_disconnect AL_SOFT_loop_points AL_SOFTX_map_buffer AL_SOFT_MSADPCM AL_SOFT_source_latency AL_SOFT_source_length AL_SOFT_source_resampler AL_SOFT_source_spatialize AL_SOFTX_source_start_delay AL_SOFT_UHJ
Nov. 17, 2023 11:48:17 PM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFORMATION: Audio effect extension version: 1.0
Nov. 17, 2023 11:48:17 PM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFORMATION: Audio max auxiliary sends: 2
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Nov. 17, 2023 11:48:19 PM com.onemillionworlds.tamarin.openxr.OpenXrSessionManager makeLayersCheck
INFORMATION: XR core validation not available
LOG in xrCreateInstance: Instance created
	createInfo->applicationInfo.applicationName: Tamarin OpenXR Example
	createInfo->applicationInfo.applicationVersion: 0
	createInfo->applicationInfo.engineName: 
	createInfo->applicationInfo.engineVersion: 0
	appinfo.detected.engine.name: (null)
	appinfo.detected.engine.version: 0.0.0
	quirks.disable_vulkan_format_depth_stencil: false
LOG in xrCreateInstance: Selected devices
	Head: 'HTC Vive (libsurvive)'
	Eyes: '<none>'
	Left: 'Vive Wand Controller (libsurvive)'
	Right: 'Vive Wand Controller (libsurvive)'
	Gamepad: '<none>'
	Hand-Tracking Left: '<none>'
	Hand-Tracking Right: '<none>'
Nov. 17, 2023 11:48:19 PM com.onemillionworlds.tamarin.openxr.OpenXrSessionManager initializeAndBindOpenGL
INFORMATION: The OpenXR runtime supports OpenGL 3.0 to OpenGL 4.6
Nov. 17, 2023 11:48:19 PM com.onemillionworlds.tamarin.openxr.XrUtils createGraphicsBindingOpenGL
INFORMATION: Using XrGraphicsBindingOpenGLXlibKHR to create the session
Nov. 17, 2023 11:48:19 PM com.onemillionworlds.tamarin.openxr.OpenXrSessionManager initializeAndBindOpenGL
INFORMATION: OpenXR debug utils enabled
Nov. 17, 2023 11:48:19 PM com.onemillionworlds.tamarin.openxr.OpenXrSessionManager createXRSwapchains
INFORMATION: Headset name:Monado: HTC Vive (libsurvive) vendor: 42
Nov. 17, 2023 11:48:19 PM com.onemillionworlds.tamarin.openxr.OpenXrSessionManager createXRSwapchains
INFORMATION: Headset orientationTracking:truepositionTracking: true
Nov. 17, 2023 11:48:19 PM com.onemillionworlds.tamarin.openxr.OpenXrSessionManager createXRSwapchains
INFORMATION: Headset MaxWidth: 16384 MaxHeight: 16384MaxLayerCount: 16
Nov. 17, 2023 11:48:19 PM com.onemillionworlds.tamarin.openxr.OpenXrSessionManager createXRSwapchains
INFORMATION: Selected colour format 34842 from options [32859, 34842, 35907, 32856, 36012, 33189, 36013]
Nov. 17, 2023 11:48:19 PM com.onemillionworlds.tamarin.openxr.OpenXrSessionManager handleSessionStateChangedEvent
INFORMATION: XrEventDataSessionStateChanged: state null->IDLE session=140414170417824 time=0
Nov. 17, 2023 11:48:20 PM com.onemillionworlds.tamarin.openxr.OpenXrSessionManager handleSessionStateChangedEvent
INFORMATION: XrEventDataSessionStateChanged: state IDLE->READY session=140414170417824 time=0
Nov. 17, 2023 11:48:20 PM com.jme3.anim.SkinningControl controlRender
INFORMATION: Hardware skinning engaged for Armature (Node)
Nov. 17, 2023 11:48:20 PM com.jme3.anim.SkinningControl controlRender
INFORMATION: Hardware skinning engaged for Armature (Node)
Nov. 17, 2023 11:48:20 PM com.onemillionworlds.tamarin.openxr.OpenXrSessionManager handleSessionStateChangedEvent
INFORMATION: XrEventDataSessionStateChanged: state READY->SYNCHRONIZED session=140414170417824 time=0
Nov. 17, 2023 11:48:20 PM example.Main lambda$simpleInitApp$1
INFORMATION: System is: Monado: HTC Vive (libsurvive)
Nov. 17, 2023 11:48:20 PM com.onemillionworlds.tamarin.openxr.OpenXrSessionManager handleSessionStateChangedEvent
INFORMATION: XrEventDataSessionStateChanged: state SYNCHRONIZED->VISIBLE session=140414170417824 time=0
Nov. 17, 2023 11:48:20 PM com.onemillionworlds.tamarin.openxr.OpenXrSessionManager handleSessionStateChangedEvent
INFORMATION: XrEventDataSessionStateChanged: state VISIBLE->FOCUSED session=140414170417824 time=0
Nov. 17, 2023 11:48:20 PM com.onemillionworlds.tamarin.actions.OpenXrActionState registerActions
INFORMATION: Registering manifest
XR_ERROR_FEATURE_UNSUPPORTED in xrCreateHandTrackerEXT: System does not support hand tracking
Nov. 17, 2023 11:48:20 PM com.onemillionworlds.tamarin.actions.OpenXrActionState withResponseCodeLogging
WARNUNG: java.lang.Throwable: -8 XR_ERROR_FEATURE_UNSUPPORTED occurred during Setup hand tracking. The requested feature is not supported.
	at com.onemillionworlds.tamarin.actions.OpenXrActionState.withResponseCodeLogging(OpenXrActionState.java:521)
	at com.onemillionworlds.tamarin.actions.OpenXrActionState.registerActions(OpenXrActionState.java:440)
	at com.onemillionworlds.tamarin.actions.OpenXrActionState.update(OpenXrActionState.java:921)
	at com.jme3.app.state.AppStateManager.update(AppStateManager.java:371)
	at com.jme3.app.SimpleApplication.update(SimpleApplication.java:258)
	at com.jme3.system.lwjgl.LwjglWindow.runLoop(LwjglWindow.java:628)
	at com.jme3.system.lwjgl.LwjglWindow.run(LwjglWindow.java:717)
	at java.base/java.lang.Thread.run(Thread.java:833)

Nov. 17, 2023 11:48:20 PM com.onemillionworlds.tamarin.actions.OpenXrActionState withResponseCodeLogging
WARNUNG: Further identical errors will be suppressed. If you don't want that call doNotSupressRepeatedErrors()
Nov. 17, 2023 11:48:20 PM com.jme3.app.LegacyApplication handleError
SCHWERWIEGEND: Uncaught exception thrown in Thread[jME3 Main,5,main]
java.lang.NullPointerException
	at org.lwjgl.system.Pointer$Default.<init>(Pointer.java:88)
	at org.lwjgl.openxr.DispatchableHandle.<init>(DispatchableHandle.java:15)
	at org.lwjgl.openxr.XrHandTrackerEXT.<init>(XrHandTrackerEXT.java:20)
	at com.onemillionworlds.tamarin.actions.OpenXrActionState.registerActions(OpenXrActionState.java:441)
	at com.onemillionworlds.tamarin.actions.OpenXrActionState.update(OpenXrActionState.java:921)
	at com.jme3.app.state.AppStateManager.update(AppStateManager.java:371)
	at com.jme3.app.SimpleApplication.update(SimpleApplication.java:258)
	at com.jme3.system.lwjgl.LwjglWindow.runLoop(LwjglWindow.java:628)
	at com.jme3.system.lwjgl.LwjglWindow.run(LwjglWindow.java:717)
	at java.base/java.lang.Thread.run(Thread.java:833)

Nov. 17, 2023 11:48:20 PM com.jme3.system.JmeSystemDelegate lambda$new$0
WARNUNG: JmeDialogsFactory implementation not found.
Uncaught exception thrown in Thread[jME3 Main,5,main]
NullPointerException
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fb4d7755d3a, pid=51012, tid=51032
#
# JRE version: OpenJDK Runtime Environment (17.0.7+7) (build 17.0.7+7-Debian-1deb11u1)
# Java VM: OpenJDK 64-Bit Server VM (17.0.7+7-Debian-1deb11u1, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# C  [libjemalloc.so+0x56d3a]
#
# 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/ppp/workspace/debian/monado-service/TamarinTestBed_212/hs_err_pid51012.log
#
# If you would like to submit a bug report, please visit:
#   https://bugs.debian.org/openjdk-17
#

I was able to see any text on HMD-Display for short time, before the error occurs.

@oneMillionWorlds
Copy link
Owner

Well that's decidedly odd. It looks like the runtime reported the XR_EXT_hand_tracking as available. But then when Tamarin tried to use it it then failed as being unsupported (really odd). In a next version I'll make it more graceful to that but for now you can just stop it trying by removing it from the list of extensions to load

    XrSettings xrSettings = new XrSettings();
    xrSettings.removeRequiredExtension(EXTHandTracking.XR_EXT_HAND_TRACKING_EXTENSION_NAME);
    getStateManager().attach(new XrAppState(xrSettings));

Incidentally I've released a 2.1.5 which fixes a lot of very similar issues someone else was having with -1 errors (Although not the fatal errors, they are new)

@Starcommander
Copy link
Author

Starcommander commented Nov 20, 2023

With this setting changed, it works now. 👍
Can see the text, and hands.
Controllers are jumping a little bit, but are basically working. (moving and rotating)

Very frequent I get this error message:
XR_ERROR_VALIDATION_FAILURE: xrGetActionStateFloat(data->type == 0)

--> Fixed in 2.1.5
And when closing the app, I get a similar fatal error again. (see below)


XR_ERROR_VALIDATION_FAILURE: xrGetActionStateFloat(data->type == 0)
XR_ERROR_VALIDATION_FAILURE: xrGetActionStateFloat(data->type == 0)
XR_ERROR_VALIDATION_FAILURE: xrGetActionStateFloat(data->type == 0)
XR_ERROR_VALIDATION_FAILURE: xrGetActionStateFloat(data->type == 0)
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f36a18dacc0, pid=94325, tid=94345
#
# JRE version: OpenJDK Runtime Environment (17.0.7+7) (build 17.0.7+7-Debian-1deb11u1)
# Java VM: OpenJDK 64-Bit Server VM (17.0.7+7-Debian-1deb11u1, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# C  [libc.so.6+0xa3cc0]
#
# 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/ppp/workspace/debian/monado-service/TamarinTestBed_212/hs_err_pid94325.log
#
# If you would like to submit a bug report, please visit:
#   https://bugs.debian.org/openjdk-17
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

@Starcommander
Copy link
Author

Starcommander commented Nov 20, 2023

Currently I wonder how to select an item of the menu.
The controller-buttons does nothing.

--> Fixed in 2.1.5

@richardTingle
Copy link
Collaborator

richardTingle commented Nov 22, 2023

I've found what I'm 95% sure if the cause of the memory error on exit. I was following the example at https://github.com/knokko/lwjgl3/blob/origin/fix-xr-gl-sample/modules/samples/src/test/java/org/lwjgl/demo/openxr/HelloOpenXRGL.java#L452 which has a bug in it that the swapchainBuffer is created whereas it should be calloced (as in the official example at https://github.com/LWJGL/lwjgl3/blob/master/modules/samples/src/test/java/org/lwjgl/demo/openxr/HelloOpenXRGL.java#L490).

I'll release a new version on Friday along with some other features I've been working on and hopefully that will close this off.

Edit; woops, wrong account. For the avoidance of confusion I am the same person as oneMillionWorlds

@Starcommander
Copy link
Author

Glad to see, that you have a hint. 👍
Just keep me informed, when new version is available.

@richardTingle
Copy link
Collaborator

I've just released 2.2 that should resolve that memory issue

@Starcommander
Copy link
Author

Sorry, still the same issue in version 2.2 of tamarin.
Attached the error-dump of java, maybe you can find any hint.
hs_err_pid164927.log

By the way:
I re-calibrated the configuration in libsurvive, and now the controllers are moving smoothly. 👍

@richardTingle
Copy link
Collaborator

Hmm, looks like the problematic call is xrDestroyInstance

Are your steps:

  1. Open testbed
  2. See menu has loaded
  3. Click exit on the in game menu?

Could you try running with the vm arguments

-Dorg.lwjgl.util.Debug=true -Dorg.lwjgl.util.DebugAllocator=true

All I get is that JMonkey and Lemur leak a lot of memory but you may get something that indicates why it crashes

@Starcommander
Copy link
Author

I can not find anything useful in the log with suggested options.
I followed your instructions and get this:

Nov. 26, 2023 8:17:14 PM com.jme3.system.JmeDesktopSystem initialize
INFORMATION: Running on jMonkeyEngine 3.6.1-stable
 * Branch: HEAD
 * Git Hash: 4de10c3
 * Build Date: 2023-06-23
[LWJGL] Version: 3.3.2-snapshot
	 OS: Linux v5.10.0-26-amd64
	JRE: Linux amd64 17.0.7
	JVM: OpenJDK 64-Bit Server VM v17.0.7+7-Debian-1deb11u1 by Debian
[LWJGL] Loading JNI library: lwjgl
	Module: org.lwjgl
	Loaded from org.lwjgl.librarypath: /tmp/lwjgl_ppp/3.3.2-snapshot/x64/liblwjgl.so
[LWJGL] Closure Registry: ConcurrentHashMap
[LWJGL] Loading library: jemalloc
	Module: org.lwjgl.jemalloc
	Loaded from org.lwjgl.librarypath: /tmp/lwjgl_ppp/3.3.2-snapshot/x64/libjemalloc.so
[LWJGL] MemoryUtil allocator: DebugAllocator
	Reminder: enable Configuration.DEBUG_MEMORY_ALLOCATOR_FAST for low overhead allocation tracking.
[LWJGL] Loading library: glfw
	Module: org.lwjgl.glfw
	Loaded from org.lwjgl.librarypath: /tmp/lwjgl_ppp/3.3.2-snapshot/x64/libglfw.so
Nov. 26, 2023 8:17:14 PM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFORMATION: LWJGL 3.3.2-snapshot context running on thread jME3 Main
 * Graphics Adapter: GLFW 3.4.0 Wayland X11 GLX Null EGL OSMesa monotonic shared
[LWJGL] Loading JNI library: lwjgl_opengl
	Module: org.lwjgl.opengl
	Loaded from org.lwjgl.librarypath: /tmp/lwjgl_ppp/3.3.2-snapshot/x64/liblwjgl_opengl.so
[LWJGL] Loading library: libGL.so.1
	Module: org.lwjgl.opengl
	libGL.so.1 not found in org.lwjgl.librarypath=/tmp/lwjgl_ppp/3.3.2-snapshot/x64
	Loaded from system paths: /lib/x86_64-linux-gnu/libGL.so.1
Nov. 26, 2023 8:17:14 PM com.jme3.renderer.opengl.GLRenderer loadCapabilitiesCommon
INFORMATION: OpenGL Renderer Information
 * Vendor: AMD
 * Renderer: Radeon RX 5500 XT (NAVI14, DRM 3.40.0, 5.10.0-26-amd64, LLVM 11.0.1)
 * OpenGL Version: 4.6 (Core Profile) Mesa 20.3.5
 * GLSL Version: 4.60
 * Profile: Core
[LWJGL] Loading library: openal
	Module: org.lwjgl.openal
	Loaded from org.lwjgl.librarypath: /tmp/lwjgl_ppp/3.3.2-snapshot/x64/libopenal.so
Nov. 26, 2023 8:17:14 PM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFORMATION: Audio Renderer Information
 * Device: OpenAL Soft
 * Vendor: OpenAL Community
 * Renderer: OpenAL Soft
 * Version: 1.1 ALSOFT 1.23.0
 * Supported channels: 64
 * ALC extensions: ALC_ENUMERATE_ALL_EXT ALC_ENUMERATION_EXT ALC_EXT_CAPTURE ALC_EXT_DEDICATED ALC_EXT_disconnect ALC_EXT_EFX ALC_EXT_thread_local_context ALC_SOFT_device_clock ALC_SOFT_HRTF ALC_SOFT_loopback ALC_SOFT_loopback_bformat ALC_SOFT_output_limiter ALC_SOFT_output_mode ALC_SOFT_pause_device ALC_SOFT_reopen_device
 * AL extensions: AL_EXT_ALAW AL_EXT_BFORMAT AL_EXT_DOUBLE AL_EXT_EXPONENT_DISTANCE AL_EXT_FLOAT32 AL_EXT_IMA4 AL_EXT_LINEAR_DISTANCE AL_EXT_MCFORMATS AL_EXT_MULAW AL_EXT_MULAW_BFORMAT AL_EXT_MULAW_MCFORMATS AL_EXT_OFFSET AL_EXT_source_distance_model AL_EXT_SOURCE_RADIUS AL_EXT_STEREO_ANGLES AL_LOKI_quadriphonic AL_SOFT_bformat_ex AL_SOFTX_bformat_hoa AL_SOFT_block_alignment AL_SOFT_callback_buffer AL_SOFTX_convolution_reverb AL_SOFT_deferred_updates AL_SOFT_direct_channels AL_SOFT_direct_channels_remix AL_SOFT_effect_target AL_SOFT_events AL_SOFT_gain_clamp_ex AL_SOFTX_hold_on_disconnect AL_SOFT_loop_points AL_SOFTX_map_buffer AL_SOFT_MSADPCM AL_SOFT_source_latency AL_SOFT_source_length AL_SOFT_source_resampler AL_SOFT_source_spatialize AL_SOFTX_source_start_delay AL_SOFT_UHJ
Nov. 26, 2023 8:17:14 PM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFORMATION: Audio effect extension version: 1.0
Nov. 26, 2023 8:17:14 PM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFORMATION: Audio max auxiliary sends: 2
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[LWJGL] Loading library: openxr_loader
	Module: org.lwjgl.openxr
	Loaded from org.lwjgl.librarypath: /tmp/lwjgl_ppp/3.3.2-snapshot/x64/libopenxr_loader.so
Nov. 26, 2023 8:17:17 PM com.onemillionworlds.tamarin.openxr.OpenXrSessionManager makeLayersCheck
INFORMATION: XR core validation not available
LOG in xrCreateInstance: Instance created
	createInfo->applicationInfo.applicationName: Tamarin OpenXR Example
	createInfo->applicationInfo.applicationVersion: 0
	createInfo->applicationInfo.engineName: 
	createInfo->applicationInfo.engineVersion: 0
	appinfo.detected.engine.name: (null)
	appinfo.detected.engine.version: 0.0.0
	quirks.disable_vulkan_format_depth_stencil: false
LOG in xrCreateInstance: Selected devices
	Head: 'HTC Vive (libsurvive)'
	Eyes: '<none>'
	Left: 'Vive Wand Controller (libsurvive)'
	Right: 'Vive Wand Controller (libsurvive)'
	Gamepad: '<none>'
	Hand-Tracking Left: '<none>'
	Hand-Tracking Right: '<none>'
Nov. 26, 2023 8:17:17 PM com.onemillionworlds.tamarin.openxr.OpenXrSessionManager initializeAndBindOpenGL
INFORMATION: The OpenXR runtime supports OpenGL 3.0 to OpenGL 4.6
[LWJGL] Loading library: libX11.so.6
	Module: org.lwjgl
	libX11.so.6 not found in org.lwjgl.librarypath=/tmp/lwjgl_ppp/3.3.2-snapshot/x64
	Loaded from system paths: /lib/x86_64-linux-gnu/libX11.so.6
Nov. 26, 2023 8:17:17 PM com.onemillionworlds.tamarin.openxr.XrUtils createGraphicsBindingOpenGL
INFORMATION: Using XrGraphicsBindingOpenGLXlibKHR to create the session
Nov. 26, 2023 8:17:17 PM com.onemillionworlds.tamarin.openxr.OpenXrSessionManager initializeAndBindOpenGL
INFORMATION: OpenXR debug utils enabled
Nov. 26, 2023 8:17:17 PM com.onemillionworlds.tamarin.openxr.OpenXrSessionManager createXRSwapchains
INFORMATION: Headset name:Monado: HTC Vive (libsurvive) vendor: 42
Nov. 26, 2023 8:17:17 PM com.onemillionworlds.tamarin.openxr.OpenXrSessionManager createXRSwapchains
INFORMATION: Headset orientationTracking:truepositionTracking: true
Nov. 26, 2023 8:17:17 PM com.onemillionworlds.tamarin.openxr.OpenXrSessionManager createXRSwapchains
INFORMATION: Headset MaxWidth: 16384 MaxHeight: 16384MaxLayerCount: 16
Nov. 26, 2023 8:17:17 PM com.onemillionworlds.tamarin.openxr.OpenXrSessionManager createXRSwapchains
INFORMATION: Selected colour format 34842 from options [32859, 34842, 35907, 32856, 36012, 33189, 36013]
Nov. 26, 2023 8:17:17 PM com.onemillionworlds.tamarin.openxr.OpenXrSessionManager handleSessionStateChangedEvent
INFORMATION: XrEventDataSessionStateChanged: state null->IDLE session=139814619913648 time=0
Nov. 26, 2023 8:17:17 PM com.onemillionworlds.tamarin.openxr.OpenXrSessionManager handleSessionStateChangedEvent
INFORMATION: XrEventDataSessionStateChanged: state IDLE->READY session=139814619913648 time=0
Nov. 26, 2023 8:17:17 PM com.jme3.anim.SkinningControl controlRender
INFORMATION: Hardware skinning engaged for Armature (Node)
Nov. 26, 2023 8:17:17 PM com.jme3.anim.SkinningControl controlRender
INFORMATION: Hardware skinning engaged for Armature (Node)
Nov. 26, 2023 8:17:17 PM com.onemillionworlds.tamarin.openxr.OpenXrSessionManager handleSessionStateChangedEvent
INFORMATION: XrEventDataSessionStateChanged: state READY->SYNCHRONIZED session=139814619913648 time=0
Nov. 26, 2023 8:17:17 PM example.Main lambda$simpleInitApp$1
INFORMATION: System is: Monado: HTC Vive (libsurvive)
Nov. 26, 2023 8:17:17 PM com.onemillionworlds.tamarin.openxr.OpenXrSessionManager handleSessionStateChangedEvent
INFORMATION: XrEventDataSessionStateChanged: state SYNCHRONIZED->VISIBLE session=139814619913648 time=0
Nov. 26, 2023 8:17:18 PM com.onemillionworlds.tamarin.openxr.OpenXrSessionManager handleSessionStateChangedEvent
INFORMATION: XrEventDataSessionStateChanged: state VISIBLE->FOCUSED session=139814619913648 time=0
Nov. 26, 2023 8:17:18 PM com.onemillionworlds.tamarin.actions.OpenXrActionState registerActions
INFORMATION: Registering manifest
Nov. 26, 2023 8:17:35 PM com.onemillionworlds.tamarin.openxr.XrAppState cleanup
INFORMATION: Cleaning up OpenXR for shutdown
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f29a325acc0, pid=259166, tid=259186
#
# JRE version: OpenJDK Runtime Environment (17.0.7+7) (build 17.0.7+7-Debian-1deb11u1)
# Java VM: OpenJDK 64-Bit Server VM (17.0.7+7-Debian-1deb11u1, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# C  [libc.so.6+0xa3cc0]
#
# 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/ppp/workspace/debian/monado-service/TamarinTestBed_212/hs_err_pid259166.log
#
# If you would like to submit a bug report, please visit:
#   https://bugs.debian.org/openjdk-17
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Abgebrochen

@richardTingle
Copy link
Collaborator

Hmm, I'm surprised not to see a bunch of logs like

[LWJGL] 128 bytes leaked, thread 24 (jME3 Main), address: 0x11E47FB0200 at com.jme3.util.LWJGLBufferAllocator.allocate(LWJGLBufferAllocator.java:213) at com.jme3.util.LWJGLBufferAllocator$ConcurrentLWJGLBufferAllocator.allocate(LWJGLBufferAllocator.java:69) at com.jme3.util.BufferUtils.createFloatBuffer(BufferUtils.java:870) at com.jme3.util.BufferUtils.clone(BufferUtils.java:914) at com.jme3.util.BufferUtils.clone(BufferUtils.java:100) at com.jme3.scene.VertexBuffer.clone(VertexBuffer.java:1046) at com.jme3.scene.Mesh.deepClone(Mesh.java:234) at com.simsilica.lemur.geom.TbtQuad.clone(TbtQuad.java:137) at com.simsilica.lemur.component.TbtQuadBackgroundComponent.clone(TbtQuadBackgroundComponent.java:157) at com.simsilica.lemur.component.TbtQuadBackgroundComponent.clone(TbtQuadBackgroundComponent.java:90) at com.simsilica.lemur.core.GuiComponent$clone.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:130) at Script2$_run_closure6.doCall(Script2.groovy:50) at Script2$_run_closure6.doCall(Script2.groovy) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:274) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1035) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:38) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:53) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:130) at Script1$_run_closure1$_closure2.doCall(Script1.groovy:55) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107) at org.codehaus.groovy.runtime.metaclass.ClosureMetaMethod.invoke(ClosureMetaMethod.java:83) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:247) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:58) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:139) at Script1.selector(Script1.groovy:69) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1268) at groovy.lang.MetaClassImpl.invokeMethodClosure(MetaClassImpl.java:1048) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1142) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1035) at groovy.lang.Closure.call(Closure.java:412) at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.callGlobal(GroovyScriptEngineImpl.java:395) at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.access$100(GroovyScriptEngineImpl.java:90) at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl$3.invokeMethod(GroovyScriptEngineImpl.java:303) at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl$3.invokeMethod(GroovyScriptEngineImpl.java:292) at groovy.lang.GroovyObject.invokeMethod(GroovyObject.java:39) at groovy.lang.Script.invokeMethod(Script.java:96) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:68) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:171) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:203) at Script2.run(Script2.groovy:49) at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:317) at org.codehaus.groovy.jsr223.GroovyCompiledScript.eval(GroovyCompiledScript.java:71) at java.scripting/javax.script.CompiledScript.eval(CompiledScript.java:93) at com.simsilica.lemur.style.StyleLoader.loadStyle(StyleLoader.java:177) at com.simsilica.lemur.style.StyleLoader.loadStyle(StyleLoader.java:162) at com.simsilica.lemur.style.BaseStyles.loadStyleResources(BaseStyles.java:78) at com.simsilica.lemur.style.BaseStyles.loadGlassStyle(BaseStyles.java:62) at example.Main.simpleInitApp(Main.java:69) at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:240) at com.jme3.system.lwjgl.LwjglWindow.initInThread(LwjglWindow.java:607) at com.jme3.system.lwjgl.LwjglWindow.run(LwjglWindow.java:710) at java.base/java.lang.Thread.run(Thread.java:833)

Incidentally, does the VR application https://codeberg.org/gaiasky/gaiasky work for you? Its an OpenXR LWJGL based application just like Tamarin

@Starcommander
Copy link
Author

I started the gaiasky-app downloaded the minimal resources, and started as vr.
Then I closed the window, as no other in-game-way to exit found.
Seems, there is the same, or a similar issue.


LOG in xrCreateInstance: Instance created
        createInfo->applicationInfo.applicationName: Gaia Sky VR
        createInfo->applicationInfo.applicationVersion: 0
        createInfo->applicationInfo.engineName: 
        createInfo->applicationInfo.engineVersion: 0
        appinfo.detected.engine.name: (null)
        appinfo.detected.engine.version: 0.0.0
        quirks.disable_vulkan_format_depth_stencil: false
LOG in xrCreateInstance: Selected devices
        Head: 'HTC Vive (libsurvive)'
        Eyes: '<none>'
        Left: 'Vive Wand Controller (libsurvive)'
        Right: 'Vive Wand Controller (libsurvive)'
        Gamepad: '<none>'
        Hand-Tracking Left: '<none>'
        Hand-Tracking Right: '<none>'
XR_ERROR_HANDLE_INVALID: xrDestroyAction(action == 0x7f3f8a1ab3f0)
XR_ERROR_HANDLE_INVALID: xrDestroyAction(action == 0x7f3f8a1acf00)
XR_ERROR_HANDLE_INVALID: xrDestroyAction(action == 0x7f3f8a1aeba0)
XR_ERROR_HANDLE_INVALID: xrDestroyAction(action == 0x7f3f8a1afd90)
XR_ERROR_HANDLE_INVALID: xrDestroyAction(action == 0x7f3f8a1b0fb0)
XR_ERROR_HANDLE_INVALID: xrDestroyAction(action == 0x7f3f8a1b1950)
XR_ERROR_HANDLE_INVALID: xrDestroyAction(action == 0x7f3f8a1b22f0)
XR_ERROR_HANDLE_INVALID: xrDestroyAction(action == 0x7f3f8a1b2c90)
XR_ERROR_HANDLE_INVALID: xrDestroyAction(action == 0x7f3f8a1b3630)
XR_ERROR_HANDLE_INVALID: xrDestroyAction(action == 0x7f3f8a1b3fd0)
XR_ERROR_HANDLE_INVALID: xrDestroyAction(action == 0x7f3f8a1b4990)
XR_ERROR_HANDLE_INVALID: xrDestroyAction(action == 0x7f3f8a1b5370)
XR_ERROR_HANDLE_INVALID: xrDestroyAction(action == 0x7f3f8a1b5d50)
XR_ERROR_HANDLE_INVALID: xrDestroyAction(action == 0x7f3f8a1b6760)
XR_ERROR_HANDLE_INVALID: xrDestroyAction(action == 0x7f3f8a1b7160)
XR_ERROR_HANDLE_INVALID: xrDestroyAction(action == 0x7f3f8a1b7b00)
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f3f5546c105, pid=261054, tid=261075
#
# JRE version: OpenJDK Runtime Environment Temurin-17.0.8.1+1 (17.0.8.1+1) (build 17.0.8.1+1)
# Java VM: OpenJDK 64-Bit Server VM Temurin-17.0.8.1+1 (17.0.8.1+1, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# C  [libjemalloc.so+0x15105]
#
# 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:
# /tmp/gai/opt/gaiasky/hs_err_pid261054.log
#
# If you would like to submit a bug report, please visit:
#   https://github.com/adoptium/adoptium-support/issues
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Abgebrochen

Also, after moving around some time, i got this:

grafik

@Starcommander
Copy link
Author

I created an issue regarding the ConcurrentModificationException.

@Starcommander
Copy link
Author

Starcommander commented Nov 26, 2023

I added some logging.
Seems you are right, the problematic call is xrDestroyInstance(xrInstance)

grafik

When I just comment this line out, no exception occurs.
But why?

@richardTingle
Copy link
Collaborator

That's interesting, having both Gaia Sky and Tamarin crash in the same way makes me think it might be a Monado issue rather than a Tamarin (or Gaia Sky) issue; its definitely suspicious that they crash the same way.

The xrDestroyInstance is just a request to properly shut down the XR environment before fully exiting the application. Arguably the application could do without it, but I'm not sure what resources wouldn't be properly released if it was to be omitted.

@Starcommander
Copy link
Author

I think it has to do with lwjgl-implementation of openxr, or something in native code, where the issue occurs.
But yes, seems not a bug of tamarin.

@richardTingle
Copy link
Collaborator

Cool, in that case I'm going to close this issue if that's ok. Thank you so much for testing and working through the issues with me.

I hope the exit crash gets sorted wherever it originates. Although at least its on-exit crash, arguably the best time for a crash

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

3 participants