Search Unity

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

Discussion in 'VR' started by AndreasWang, Sep 24, 2021.

  1. AndreasWang

    AndreasWang

    Joined:
    Jul 31, 2019
    Posts:
    23
    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:
    registry.png

    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.
     
  2. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    958
    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.
     
    AndreasWang likes this.
  3. azone

    azone

    Joined:
    Jul 14, 2016
    Posts:
    2
    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.