godot icon indicating copy to clipboard operation
godot copied to clipboard

OpenXR game crashes when run

Open Soupstraw opened this issue 2 years ago • 20 comments

Godot version

master (db6976e)

System information

Pop_OS, Nvidia GTX 1070, nvidia-driver 525.60.11, Vulkan, Valve Index, SteamVR (beta)

Issue description

I created a scene with an XR origin, camera and two controllers, enabled OpenXR from project settings and enabled XR shaders. When I try to run the project, the window pops up for a moment and then crashes. Godot produces this in the standard output:

Godot Engine v4.0.beta.custom_build.db6976eed - https://godotengine.org
OpenXR: Running on OpenXR runtime:  SteamVR/OpenXR   0.1.0
OpenXR: XrGraphicsRequirementsVulkan2KHR:
 - minApiVersionSupported:  1.0.0
 - maxApiVersionSupported:  1.2.0
Vulkan API 1.3.224 - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce GTX 1070

ERROR: OpenXR: Unsupported io path /interaction_profiles/htc/vive_cosmos_controller/use
r/hand/left/input/system/click
   at: interaction_profile_supports_io_path (modules/openxr/openxr_api.cpp:271)
ERROR: OpenXR: Unsupported io path /interaction_profiles/htc/vive_focus3_controller/use
r/hand/left/input/system/click
   at: interaction_profile_supports_io_path (modules/openxr/openxr_api.cpp:271)
ERROR: OpenXR: Unsupported io path /interaction_profiles/htc/vive_focus3_controller/use
r/hand/right/input/trigger/touch
   at: interaction_profile_supports_io_path (modules/openxr/openxr_api.cpp:271)
ERROR: OpenXR: Unsupported io path /interaction_profiles/htc/vive_focus3_controller/use
r/hand/left/input/thumbrest/touch
   at: interaction_profile_supports_io_path (modules/openxr/openxr_api.cpp:271)

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.0.beta.custom_build (db6976eed4c59b3a320cb26938898c732e
f6b7ca)
Dumping the backtrace. Please include this when reporting the bug on: https://github.co
m/godotengine/godot/issues
[1] /lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7f78a4242520] (??:0)
[2] /home/telku/.steam/debian-installation/steamapps/common/SteamVR/bin/linux64/vrclien
t.so(+0x264a78) [0x7f789e064a78] (??:0)
[3] /home/telku/.steam/debian-installation/steamapps/common/SteamVR/bin/linux64/vrclien
t.so(+0x1ad4da) [0x7f789dfad4da] (??:0)
[4] /home/telku/.steam/debian-installation/steamapps/common/SteamVR/bin/linux64/vrclien
t.so(+0x242769) [0x7f789e042769] (??:0)
[5] /lib/x86_64-linux-gnu/libc.so.6(+0x94b43) [0x7f78a4294b43] (??:0)
[6] /lib/x86_64-linux-gnu/libc.so.6(+0x126a00) [0x7f78a4326a00] (??:0)
-- END OF BACKTRACE --
================================================================

Steps to reproduce

Create the scene as described above and then run the project.

Minimal reproduction project

g3test.zip

Soupstraw avatar Dec 14 '22 09:12 Soupstraw

Can you run with --verbose? I changed the way we filter out unsupported paths and might have missed something and OpenXR does like to crash when we supply stuff not supported by a runtime implementation.

BastiaanOlij avatar Dec 14 '22 10:12 BastiaanOlij

Here you go: log.txt

Soupstraw avatar Dec 14 '22 11:12 Soupstraw

Well, it's not the interaction profiles that I was worried about, it gets far past that point and seems to find what its needed.

It's annoying its crashing inside of vrclient.so, which is SteamVRs library so we don't get any debug info. One other thing to try, though I'm not sure what this looks like on Linux, in the little SteamVR status window there is a menu that has an option Web Console. It opens up a UI in a browser to the log files SteamVR is creating. It's a bit of a PITA to use because while Godot isn't running, SteamVRs home system floods it with messages, but maybe it will output something useful at the time of the crash.

Right now it's really hard to see what is triggering the crash as it doesn't even seem to be code running in Godot.

It would also be worth checking if running it with OpenGL fixes it (see whether it is a graphics related issue or whether it's a pure OpenXR issue).

BastiaanOlij avatar Dec 14 '22 22:12 BastiaanOlij

Before this I also tried running the OpenVR and OpenXR plugins in the Godot stable branch, but I couldn't get those working either. If it's any help, I can try to run these again and give you the logs, maybe there's some additional info that's relevant for this bug.

The OpenXR plugin crashed pretty much in the same way as on master. The OpenVR plugin didn't crash, but also didn't render anything and gave me some errors about the compositor.

Soupstraw avatar Dec 14 '22 23:12 Soupstraw

I haven't touched the Godot 4 OpenVR plugin in awhile so it may simply be outdated, we did change a few things on the GDExternal side.

That said, since OpenVR is effectively deprecated I'm not sure it's worth sinking time into it.

So far OpenXR on Godot 4 has been working stably so either I recently messed something up or we're looking at something specific to your setup. I just wish SteamVR gave us something to work with here. Crashing without giving any sort of error info is annoying to say the least :)

BastiaanOlij avatar Dec 14 '22 23:12 BastiaanOlij

So I left my computer running overnight, then changed the rendering method to gl_compatibility and back to mobile, restarted SteamVR and now it's working..

Soupstraw avatar Dec 15 '22 08:12 Soupstraw

Ok so it sometimes runs and other times something in SteamVR crashes

Soupstraw avatar Dec 15 '22 10:12 Soupstraw

Hmmm, that is interesting seeing Godot 3 by now is pretty tried and tested. I'd wonder if it is something specific to your Linux distro but if steam VR is available on it and works for other games, I wonder what we're doing differently..

BastiaanOlij avatar Dec 15 '22 23:12 BastiaanOlij

I'm using a pretty fresh install of Pop_OS and my other games seem to work fine

Soupstraw avatar Dec 16 '22 12:12 Soupstraw

I am having a similar problem on Windows, I am getting this error message:

Godot Engine v4.0.beta10.mono.official.d0398f62f - https://godotengine.org
OpenXR: Running on OpenXR runtime:  SteamVR/OpenXR   0.1.0
OpenXR: XrGraphicsRequirementsVulkan2KHR:
 - minApiVersionSupported:  1.0.0
 - maxApiVersionSupported:  1.2.0
Vulkan API 1.3.224 - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce RTX 3060 Ti

ERROR: OpenXR: Unsupported io path /interaction_profiles/htc/vive_cosmos_controller/user/hand/left/input/system/click
   at: (modules/openxr/openxr_api.cpp:271)

v4.0.beta10.mono.official [d0398f62f], Windows 10, SteamVR 1.24.7

derkork avatar Dec 27 '22 13:12 derkork

I have deleted the vive cosmos controller section in the OpenXR action map and this changes the error message to:

Running: D:/Tools/GodotMono/Godot_v4.0-beta9_mono_win64/Godot_v4.0-beta9_mono_win64.exe --path d:/devel/the_jarl_vr_godot4 --remote-debug tcp://127.0.0.1:6007 --editor-pid 6416 --debug-collisions --position 1344,756 res://world.tscn
Godot Engine v4.0.beta9.mono.official.e780dc332 - https://godotengine.org
OpenXR: Running on OpenXR runtime:  SteamVR/OpenXR   0.1.0
OpenXR: XrGraphicsRequirementsVulkan2KHR:
 - minApiVersionSupported:  1.0.0
 - maxApiVersionSupported:  1.2.0
Vulkan API 1.3.224 - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce RTX 3060 Ti

ERROR: OpenXR: Unsupported io path /interaction_profiles/htc/vive_focus3_controller/user/hand/left/input/system/click
   at: (modules/openxr/openxr_api.cpp:271)

So I also deleted the Vive Focus 3 section and then it finally started up.

derkork avatar Dec 27 '22 13:12 derkork

I've had crashes with a similar backtrace as well on Fedora. It just randomly happens sometimes and then keeps happening until I restart SteamVR. It never happens the first time connecting after starting SteamVR. It happens for me with the Godot 3 OpenVR plugin as well, which makes me think it's a Linux-specific SteamVR bug. Might should open an issue over there?

jtnicholl avatar Dec 30 '22 22:12 jtnicholl

I've noticed this pattern with some other games as well actually, sometimes the game can't connect to SteamVR until I restart SteamVR. Something to do with the VR compositor I think.

Soupstraw avatar Jan 03 '23 16:01 Soupstraw

I have deleted the vive cosmos controller section in the OpenXR action map and this changes the error message to:

Running: D:/Tools/GodotMono/Godot_v4.0-beta9_mono_win64/Godot_v4.0-beta9_mono_win64.exe --path d:/devel/the_jarl_vr_godot4 --remote-debug tcp://127.0.0.1:6007 --editor-pid 6416 --debug-collisions --position 1344,756 res://world.tscn
Godot Engine v4.0.beta9.mono.official.e780dc332 - https://godotengine.org
OpenXR: Running on OpenXR runtime:  SteamVR/OpenXR   0.1.0
OpenXR: XrGraphicsRequirementsVulkan2KHR:
 - minApiVersionSupported:  1.0.0
 - maxApiVersionSupported:  1.2.0
Vulkan API 1.3.224 - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce RTX 3060 Ti

ERROR: OpenXR: Unsupported io path /interaction_profiles/htc/vive_focus3_controller/user/hand/left/input/system/click
   at: (modules/openxr/openxr_api.cpp:271)

So I also deleted the Vive Focus 3 section and then it finally started up.

I had the same issue as here and the fix worked for me as well. Thank you.

Sythelux avatar Jan 07 '23 16:01 Sythelux

Hmmm, the errors on the interaction map are caused by unsupported paths, most OpenXR runtimes indeed get unstable when the wrong entries are supplied. We're supposed to filter out unsupported entries in the action map.

Sounds like we have a mistake in our meta data there, I'll look into that.

BastiaanOlij avatar Feb 06 '23 23:02 BastiaanOlij

Also experiencing this

Running: C:/Users/ian/Desktop/Godot_v4.0-beta17_mono_win64/Godot_v4.0-beta17_mono_win64.exe --path C:/Users/ian/Documents/Projects/vr_testing_cs --remote-debug tcp://127.0.0.1:6007 --editor-pid 18184 --position 384,196 res://scenes/level.tscn
Godot Engine v4.0.beta17.mono.official.c40020513 - https://godotengine.org
OpenXR: Running on OpenXR runtime:  SteamVR/OpenXR   0.1.0
OpenXR: XrGraphicsRequirementsVulkan2KHR:
 - minApiVersionSupported:  1.0.0
 - maxApiVersionSupported:  1.2.0
Vulkan API 1.3.224 - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce GTX 1660 SUPER

ERROR: OpenXR: Unsupported io path /interaction_profiles/htc/vive_cosmos_controller/user/hand/left/input/system/click
   at: (modules/openxr/openxr_api.cpp:264)

4.0 beta 17, Windows 10, steamVR 1.24.7

IMPORTANT NOTE: The crash only seems to happen when using the C# build of Godot.

Weldify avatar Feb 07 '23 19:02 Weldify

Still an issue in Godot 4.0 stable on Fedora 37.

Verbose launch log: godot.txt

SteamVR log: steamvr.txt

IMPORTANT NOTE: The crash only seems to happen when using the C# build of Godot.

This is correct, it will only crash on the C# build. Even when running purely GDscript.

DomiStyle avatar Mar 02 '23 20:03 DomiStyle

I have deleted the vive cosmos controller section in the OpenXR action map and this changes the error message to:

Running: D:/Tools/GodotMono/Godot_v4.0-beta9_mono_win64/Godot_v4.0-beta9_mono_win64.exe --path d:/devel/the_jarl_vr_godot4 --remote-debug tcp://127.0.0.1:6007 --editor-pid 6416 --debug-collisions --position 1344,756 res://world.tscn
Godot Engine v4.0.beta9.mono.official.e780dc332 - https://godotengine.org
OpenXR: Running on OpenXR runtime:  SteamVR/OpenXR   0.1.0
OpenXR: XrGraphicsRequirementsVulkan2KHR:
 - minApiVersionSupported:  1.0.0
 - maxApiVersionSupported:  1.2.0
Vulkan API 1.3.224 - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce RTX 3060 Ti

ERROR: OpenXR: Unsupported io path /interaction_profiles/htc/vive_focus3_controller/user/hand/left/input/system/click
   at: (modules/openxr/openxr_api.cpp:271)

So I also deleted the Vive Focus 3 section and then it finally started up.

I deleted the lines you mentioned however the build still returns the same error. So the change in the module doesn't seem to be taken into consideration during the build. Is there an additional step before building?

berkselvi avatar Mar 03 '23 12:03 berkselvi

The Mono crashes are a duplicate of #72835.

The OP here was not using the Mono build according to the logs, so it must be something else.

akien-mga avatar Mar 03 '23 13:03 akien-mga

IMPORTANT NOTE: The crash only seems to happen when using the C# build of Godot.

This is correct, it will only crash on the C# build. Even when running purely GDscript.

It appears, to me, not to be, as The issue is also happening to me on the non-C# 4.0 branch under Linux.

JSmaler avatar Mar 08 '23 16:03 JSmaler

I've made a C# project and was getting the same issue, which brought me here. Ran my game with --verbose and gave me this output. Not sure if it can help much but I guess more info is better than less. I'm on Windows 11 if that means anything but from what I'm seeing it probably doesn't.

Output.txt

EDIT: I already had to edit this like 3 times cause I screwed up posting my output but I got it working by removing the Vive Cosmos and Focus 3 mappings from my openXR action map

CrashCanHero avatar Mar 12 '23 18:03 CrashCanHero

As of 4.0.1, this specific error does not cause Godot to crash (also for mono build) and all tools from XR-Tools work as expected, although the error still exist. As far as I can tell, it doesn't seem to restrict anything probably since I neither use Focus nor Cosmos.

berkselvi avatar Mar 28 '23 10:03 berkselvi

I'm getting the same bug on v4.1.2.stable.arch_linux. Here is my console output using --verbose.

2-3-5-41 avatar Oct 06 '23 16:10 2-3-5-41