Topic locked

OpenXR Loader issue at start

January 31, 2022 - 2:12am #1

Hi, I download the latest HoloLens sample (v10.4.4) from the AssetsStore and configured the project step by step. Everything is working fine except this weird error that appears in the console at start. It's related to OpenXR Loaders.

NullReferenceException - Vuforia/Scripts/Internal/RuntimeOpenSourceInitializer.cs:119 

I noticed that xrManager.activeLoader stay NULL forever in UnityEditor, is this behaviour desired?

Should I ignore that NullReferenceError at startup in Editor? Will it be fixed in the future? 

class UnityXRBridge : IUnityXRBridge
{
     public UnityXRBridge()
     {
         RegisterCallbacks();
     }

     void RegisterCallbacks()
     {
         var xrSettings = XRGeneralSettings.Instance;
         var xrManager = xrSettings.Manager;

         var xrLoader = xrManager.activeLoader;
         var xrInput = xrLoader.GetLoadedSubsystem<XRInputSubsystem>();

         xrInput.trackingOriginUpdated += TrackingOriginUpdated;
      }

OpenXR Loader issue at start

February 27, 2022 - 4:01pm #7

SWAGamaz wrote:

I'm having the exact same issue. Unity 2020.3.28f1 LTS with UWP support. MRTK 2.3.3. Vuforia 10.5.5

I noticed that this problem occurs if you add OpenXR via MixedRealityFeatureTool

 

Temporarily put a stub. Looks very ugly. Sorry).

xrManager.activeLoader returns null.

But if you get the list via xrManager.activeLoaders. You can then select the correct OpenXRLoader.

----------------------

void RegisterCallbacks() {
#if UNITY_WSA && OPEN_XR_ENABLED
 
  var xrSettings = XRGeneralSettings.Instance;
  var xrManager = xrSettings.Manager;
  var xrLoader = xrManager.activeLoader;
  if (xrLoader == null && xrManager.activeLoaders.Count != 0)
    xrLoader = xrManager.activeLoaders[0];
 
  try {
    var xrInput = xrLoader.GetLoadedSubsystem<XRInputSubsystem>();
    xrInput.trackingOriginUpdated += TrackingOriginUpdated;
  } catch (Exception e) {
    Debug.Log(e);
  }
#endif
}

OpenXR Loader issue at start

February 27, 2022 - 3:03pm #6

I'm having the exact same issue. Unity 2020.3.28f1 LTS with UWP support. MRTK 2.3.3. Vuforia 10.5.5

I noticed that this problem occurs if you add OpenXR via MixedRealityFeatureTool

 

AttachmentSize
Image icon 2022-02-28_01-56-52.png220.74 KB
Image icon 2022-02-28_02-00-12.png26.15 KB

OpenXR Loader issue at start

February 2, 2022 - 6:30am #5

Hey there,

 

Thanks for highlighting and sorry you're encountering this problem. I'll see if I can reproduce the issue...

In the meantime, can you upgrade to 2021.2.10f1 to see if that solves the issue?

 

Kind regards,

Patrick Scheper

Technical Community Manager

OpenXR Loader issue at start

February 1, 2022 - 6:01am #4

Same issue with Unity 2021.2.9f1

OpenXR Loader issue at start

January 31, 2022 - 8:57am #3

Hi,

Unity 2020.3.26f1 LTS with UWP support.

 

OpenXR Loader issue at start

January 31, 2022 - 8:51am #2

Hey there,

 

Which Unity version are you using to setup the Hololens project?

 

Kind regards,

Patrick Scheper

Technical Community Manager

Topic locked