I’m not sure where to report this issue, but I figured this would be a good place to start :). I’ve noticed that both the editor and the player crashes when using the OpenXR plugin for certain permutations of installed OpenXR runtimes. I can confirm that this at least happens with having the Vive OpenXR runtime from Viveport installed together with the Oculus OpenXR runtime.
Whenever XR is started up with Oculus as the active runtime (using the Rift S HMD), I get a crash with the following stacktrace:
========== OUTPUTTING STACK TRACE ==================
0x00007FFFCF2C5138 (ViveOpenXREyeTracking) xrNegotiateLoaderApiLayerInterface
0x00007FFFD4DB6449 (ViveOpenXRHandTracking) xrNegotiateLoaderApiLayerInterface
0x00007FFF9EDA08BB (openxr_loader) xrWaitSwapchainImage
0x00007FFF9ED8443B (openxr_loader) xrWaitSwapchainImage
0x00007FFF9ED85F9F (openxr_loader) xrWaitSwapchainImage
0x00007FFF9ED78786 (openxr_loader) xrWaitSwapchainImage
0x00007FFFCF3492B8 (openxr_runtime_debugger) xrCreateInstance
0x00007FFFCF3CD1AC (UnityOpenXR) session_RequestExitSession
0x00007FFFCF3AFC1E (UnityOpenXR) DiagnosticReport_StartReport
0x00007FFFCF3AF218 (UnityOpenXR) DiagnosticReport_StartReport
ERROR: SymGetSymFromAddr64, GetLastError: ‘Attempt to access invalid address.’ (Address: 00007FFF4C5EF785)
0x00007FFF4C5EF785 (UnityPlayer) (function-name not available)
0x00007FFF4D75B426 (UnityPlayer) UnityMain
ERROR: SymGetSymFromAddr64, GetLastError: ‘Attempt to access invalid address.’ (Address: 00007FFF4C5EC945)
0x00007FFF4C5EC945 (UnityPlayer) (function-name not available)
ERROR: SymGetSymFromAddr64, GetLastError: ‘Attempt to access invalid address.’ (Address: 00007FFF4C7E64C7)
0x00007FFF4C7E64C7 (UnityPlayer) (function-name not available)
0x0000027EECF78F01 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.SubsystemDescriptorBindings:Create (intptr)
0x0000027EECF78C13 (Mono JIT Code) UnityEngine.IntegratedSubsystemDescriptor1<TSubsystem_REF>:Create () 0x0000027EECF78A9B (Mono JIT Code) UnityEngine.IntegratedSubsystemDescriptor1<TSubsystem_REF>:CreateImpl ()
0x0000027EECF7899D (Mono JIT Code) UnityEngine.IntegratedSubsystemDescriptor:UnityEngine.ISubsystemDescriptor.Create ()
0x0000027EECF77682 (Mono JIT Code) [E:\GitRepos\vrbase_openxr\Library\PackageCache\com.unity.xr.management@4.0.7\Runtime\XRLoaderHelper.cs:118] UnityEngine.XR.Management.XRLoaderHelper:CreateSubsystem<TDescriptor_REF, TSubsystem_REF> (System.Collections.Generic.List1<TDescriptor_REF>,string) 0x0000027EECF770EB (Mono JIT Code) [E:\GitRepos\vrbase_openxr\Library\PackageCache\com.unity.xr.openxr@1.2.8\Runtime\OpenXRLoader.cs:483] UnityEngine.XR.OpenXR.OpenXRLoaderBase:CreateSubsystem<TDescriptor_REF, TSubsystem_REF> (System.Collections.Generic.List1<TDescriptor_REF>,string)
0x0000027EECF769EB (Mono JIT Code) [E:\GitRepos\vrbase_openxr\Library\PackageCache\com.unity.xr.openxr@1.2.8\Runtime\OpenXRLoader.cs:281] UnityEngine.XR.OpenXR.OpenXRLoaderBase:CreateSubsystems ()
0x0000027EECF68B1B (Mono JIT Code) [E:\GitRepos\vrbase_openxr\Library\PackageCache\com.unity.xr.openxr@1.2.8\Runtime\OpenXRLoader.cs:254] UnityEngine.XR.OpenXR.OpenXRLoaderBase:InitializeInternal ()
0x0000027EECF65C0B (Mono JIT Code) [E:\GitRepos\vrbase_openxr\Library\PackageCache\com.unity.xr.openxr@1.2.8\Runtime\OpenXRLoader.cs:200] UnityEngine.XR.OpenXR.OpenXRLoaderBase:Initialize ()
0x0000027EECF646BA (Mono JIT Code) [E:\GitRepos\vrbase_openxr\Library\PackageCache\com.unity.xr.management@4.0.7\Runtime\XRManagerSettings.cs:228] UnityEngine.XR.Management.XRManagerSettings/d__24:MoveNext ()
0x0000027EFB281CA1 (Mono JIT Code) UnityEngine.SetupCoroutine:InvokeMoveNext (System.Collections.IEnumerator,intptr)
0x0000027EFB281E90 (Mono JIT Code) (wrapper runtime-invoke) :runtime_invoke_void_object_intptr (object,intptr,intptr,intptr)
0x00007FFF5C1DE660 (mono-2.0-bdwgc) mono_get_runtime_build_info
0x00007FFF5C162AE2 (mono-2.0-bdwgc) mono_perfcounters_init
0x00007FFF5C16BB3F (mono-2.0-bdwgc) mono_runtime_invoke
0x00007FFF4D3F836D (UnityPlayer) UnityMain
0x00007FFF4D3F4C8C (UnityPlayer) UnityMain
0x00007FFF4D3CFE75 (UnityPlayer) UnityMain
0x00007FFF4D3DBC5E (UnityPlayer) UnityMain
0x00007FFF4D3CF370 (UnityPlayer) UnityMain
0x00007FFF4D3CFD75 (UnityPlayer) UnityMain
0x00007FFF4D3CFF3B (UnityPlayer) UnityMain
0x00007FFF4CCFC7F4 (UnityPlayer) UnityMain
0x00007FFF4CFDBC44 (UnityPlayer) UnityMain
0x00007FFF4CFC6F3E (UnityPlayer) UnityMain
0x00007FFF4CFC700F (UnityPlayer) UnityMain
0x00007FFF4CFCCE22 (UnityPlayer) UnityMain
ERROR: SymGetSymFromAddr64, GetLastError: ‘Attempt to access invalid address.’ (Address: 00007FFF4C9F8D97)
0x00007FFF4C9F8D97 (UnityPlayer) (function-name not available)
ERROR: SymGetSymFromAddr64, GetLastError: ‘Attempt to access invalid address.’ (Address: 00007FFF4C9F6DED)
0x00007FFF4C9F6DED (UnityPlayer) (function-name not available)
ERROR: SymGetSymFromAddr64, GetLastError: ‘Attempt to access invalid address.’ (Address: 00007FFF4C9FC6BB)
0x00007FFF4C9FC6BB (UnityPlayer) (function-name not available)
0x00007FFF4C9FD67B (UnityPlayer) UnityMain
ERROR: SymGetSymFromAddr64, GetLastError: ‘Attempt to access invalid address.’ (Address: 00007FF6ACD311F2)
0x00007FF6ACD311F2 (Vrex) (function-name not available)
0x00007FFFDF6F7034 (KERNEL32) BaseThreadInitThunk
0x00007FFFDFBE2651 (ntdll) RtlUserThreadStart
========== END OF STACKTRACE ===========
This stacktrace seems to give the impression that the issue comes from an implicit OpenXR API layer related to the Vive. By checking the registry, I can also confirm that this API layer exists:
It seems rather unfortunate that this API layer is loaded implicitly for a runtime that does not support vive tracking, and that this results in a crash. Does anyone have any good solutions for dealing with situations like these? The OpenXR spec mentions that implicit API layers can be disabled, but I am not entirely sure how I would do this as there does not seem to be any interface for this in the OpenXR plugin at the present.
joejo
September 24, 2021, 3:51pm
2
This is a bug in the HTC distribution. We’ve reached out to HTC and their response is that it’s currently fixed in their beta channel.
1 Like
azone
November 18, 2021, 8:29am
3
Hi,My Question is :
Failed to load openxr runtime loader.
UnityEngine.XR.Management.XRGeneralSettings:AttemptInitializeXRSDKOnLoad () (at Library/PackageCache/com.unity.xr.management@4.0.7/Runtime/XRGeneralSettings.cs:148)
How to fix it? Thanks.