godot: Godot 4.0 crashes when enabling use_xr on viewport
Godot version
4.0 alpha 5
System information
Windows 10, Vulkan, AMD RX460, SteamVR 1.21.12
Issue description
Godot 4.0 crashes when enabling use_xr on viewport. This applies to both the main viewport and subviewports.
I’ve tried it with Windows Mixed Reality and TrinusVR Cardboard, it crash the same way with both with SteamVR set as the OpenXR runtime.
Headset tracking seems to work fine, and can render to the normal display just fine, but once XR is enabled, the game just closes.
OpenXR: Running on OpenXR runtime: SteamVR/OpenXR 0.1.0
Godot Engine v4.0.alpha5.official.d7d528c15 - https://godotengine.org
OpenXR: XrGraphicsRequirementsVulkan2KHR:
- minApiVersionSupported: 1.0.0
- maxApiVersionSupported: 1.2.0
ERROR: GENERAL - Message Id Number: 0 | Message Id Name: Loader Message
loader_scanned_icd_add: Driver C:\Windows\System32\DriverStore\FileRepository\u0376944.inf_amd64_7a28758ed8b2ac21\B376966\.\amdvlk64.dll says it supports interface version 6 but still exports core entrypoints (Policy #LDP_DRIVER_6)
Objects - 1
Object[0] - VK_OBJECT_TYPE_INSTANCE, Handle 130841264
at: _debug_messenger_callback (drivers/vulkan/vulkan_context.cpp:159)
Vulkan API 1.2.0 - Using Vulkan Device #0: AMD - Radeon (TM) RX 460
OpenXR: Found supported reference space XR_REFERENCE_SPACE_TYPE_VIEW
OpenXR: Found supported reference space XR_REFERENCE_SPACE_TYPE_LOCAL
OpenXR: Found supported reference space XR_REFERENCE_SPACE_TYPE_STAGE
OpenXR: Found supported swapchain format VK_FORMAT_R8G8B8A8_SRGB
OpenXR: Found supported swapchain format VK_FORMAT_B8G8R8A8_SRGB
OpenXR: Found supported swapchain format VK_FORMAT_R32G32B32A32_SFLOAT
OpenXR: Found supported swapchain format VK_FORMAT_R32G32B32_SFLOAT
OpenXR: Found supported swapchain format VK_FORMAT_R16G16B16A16_SFLOAT
OpenXR: Found supported swapchain format VK_FORMAT_D32_SFLOAT
OpenXR: Found supported swapchain format VK_FORMAT_D16_UNORM
OpenXR: Found supported swapchain format VK_FORMAT_D24_UNORM_S8_UINT
OpenXR: Found supported swapchain format VK_FORMAT_D32_SFLOAT_S8_UINT
Using swap chain format: VK_FORMAT_R8G8B8A8_SRGB
Steps to reproduce
Set use_xr to true on a viewport.
get_viewport().use_xr = true
Minimal reproduction project
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 28 (21 by maintainers)
I can confirm it not working with #68102 but instead some commit from beta 5 fixing it! I believe #68080 might have actually been the fix.
Turns out I needed to install the Vulkan SDK from here https://www.lunarg.com/vulkan-sdk/
For me https://github.com/godotengine/godot/pull/63288 fixed the issue by enabling full LTO but also increased the size of the godot.exe from 150MB to 1.5GBIt’s the other way around. LTO creates smaller binaries and those optimized builds cause the crash while disabling LTO (build argumentlto=none) creates an not crashing version.Tried with the Oculus OpenXR and it also crashes, this time it gives me an error log though.
@Cyberrebell I’m using the Quest 2 via Link cable with SteamVR. I actually get no debug output and it immediately closes, I only got information through compiling and attaching a debugger.
Trying alpha 5, issue still persists, no output info and immediately closes. I do have OBS installed and I’m getting the same debug info.
I’ll quickly uninstall OBS right now just to rule it out.
Edit: Still crashes even without OBS but now the error is different.