UnityOpenXRHands_TryInitialize crashes

It seems like that every other time I hit the Play button, Unity crashes with the editor log callstack indicating UnityOpenXRHands_TryInitialize is the culprit. This is while playing off the Windows platform.

After launching Unity, it usually runs fine the first time I hit play, but then often crashes the second or third time I hit play. This implies that something isn’t cleaned up properly after the first time I hit play.

I’m using Unity 6000.0.12f1 using the latest versions of all packages as seen in the package manager: OpenXR (1.11.0), XR Hands (1.5.0-pre.3), XR Interaction Toolkit (3.0.5), etc.

I’ve sent in a bug report… but y’know, the squeaky wheel gets the grease and all that, so I’m posting here as well. Plus I haven’t heard back from QA on the bug report yet.

Callstack:

0x00007FFC1FF91AFA (UnityOpenXRHands) UnityOpenXRHands_TryInitialize
0x0000019152EF81F3 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.XR.Hands.OpenXR.OpenXRHandProvider/NativeApi:TryInitialize ()
0x0000019152EF721B (Mono JIT Code) [.\Library\PackageCache\com.unity.xr.hands\Runtime\OpenXR\OpenXRHandProvider.cs:43] UnityEngine.XR.Hands.OpenXR.OpenXRHandProvider:GetHandLayout (Unity.Collections.NativeArray`1<bool>) 
0x0000019152EF3869 (Mono JIT Code) [.\Library\PackageCache\com.unity.xr.hands\Runtime\XRHandSubsystem.cs:470] UnityEngine.XR.Hands.XRHandSubsystem:OnCreate () 
0x0000019152EF310C (Mono JIT Code) UnityEngine.SubsystemsImplementation.SubsystemWithProvider`3<TSubsystem_REF, TSubsystemDescriptor_REF, TProvider_REF>:Initialize (UnityEngine.SubsystemsImplementation.SubsystemDescriptorWithProvider,UnityEngine.SubsystemsImplementation.SubsystemProvider)
2 Likes

Hi,

I also had this issue. For me it looks like updating to 6000.0.22 and making sure the “Microsoft Hand Interaction Profile” is in none of the enabled interaction profiles (for all platforms) is doing the trick

It appears this was fixed in XR Hands 1.5.0: - Fixed runtime invalidation, which resulted in crashes on some OpenXR runtimes. Runtime is invalidated when the XrInstance is destroyed.

I haven’t seen this crash since upgrading to that… knocks on wood