[OpenXR] Crashing with certain runtimes due to implicit API layers

,

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:

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.

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

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.