MixedRealityToolkit / MixedRealityToolkit-Unity

This repository holds the third generation of the Mixed Reality Toolkit for Unity. The latest version of the MRTK can be found here.
BSD 3-Clause "New" or "Revised" License
358 stars 91 forks source link

Could not create a device for 'OpenXR Right/Left Hand (XRInputV1)' #178

Closed IssueSyncBot closed 12 months ago

IssueSyncBot commented 12 months ago

Original issue opened by:

@IvayloBozhilov IvayloBozhilov


Description:

Basic Hololens 2 application throws an error, whenever I make the pinch/click motion in order to move a object with the object manipulator component.

The error is: "Could not create a device for 'OpenXR Right Hand (XRInputV1)' (exception: System.StackOverflowException: The requested operation caused a stack overflow. at (wrapper managed-to-native) System.Object.__icall_wrapper_ves_icall_array_new_specific(intptr,int)"

Steps to reproduce the behavior:

  1. Create a 3D Unity project with URP.
  2. Import MRTK3 and OpenXR plugin with the Microsoft Mixed Reality Feature Tool.
  3. Configure the project. Enable OpenXR and configure the project for Hololens 2 and UWP.
  4. Create simple scene. Add a MRTK XR Rig, MRTKInputSimulator and Cube with the Object Manipulator component.
  5. Enable Hologhraphic Remoting for Play Mode.
  6. Start the app and watch it open from the Hololens 2.
  7. Find the cube and start moving it around.
  8. As soon as you pinch the cube the aforementioned error shows up in the console, but you can still move the cube.

Expected behavior:

The error does not appear when you try to move the cube.

My setup:

Target platform:

Additional context: If I build the application and deploy it to the Hololens 2, it crashes as soon as i perform the "pinch to move action" on the cube. I provide the Log file:

UnityPlayer (2).log

This is the "full" error message:

Could not create a device for 'OpenXR Right Hand (XRInputV1)' (exception: System.StackOverflowException: The requested operation caused a stack overflow. at (wrapper managed-to-native) System.Object.__icall_wrapper_ves_icall_array_new_specific(intptr,int) at System.Array.Resize[T] (T[]& array, System.Int32 newSize) [0x00029] in <5d4cbfbeb62e454f98e19b231866113e>:0 at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.AddChildren (UnityEngine.InputSystem.InputDevice+ControlBitRangeNode& parent, UnityEngine.InputSystem.InputDevice+ControlBitRangeNode left, UnityEngine.InputSystem.InputDevice+ControlBitRangeNode right) [0x00020] in .\Library\PackageCache\com.unity.inputsystem@1.5.0\InputSystem\Devices\InputDeviceBuilder.cs:1129 at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InsertControlBitRangeNode (UnityEngine.InputSystem.InputDevice+ControlBitRangeNode& parent, UnityEngine.InputSystem.InputControl control, System.Int32& controlIndiciesNextFreeIndex, System.UInt16 startOffset) [0x0002d] in .\Library\PackageCache\com.unity.inputsystem@1.5.0\InputSystem\Devices\InputDeviceBuilder.cs:972 at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InsertControlBitRangeNode (UnityEngine.InputSystem.InputDevice+ControlBitRangeNode& parent, UnityEngine.InputSystem.InputControl control, System.Int32& controlIndiciesNextFreeIndex, System.UInt16 startOffset) [0x0016d] in .\Library\PackageCache\com.unity.inputsystem@1.5.0\InputSystem\Devices\InputDeviceBuilder.cs:1010 at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InsertControlBitRangeNode (UnityEngine.InputSystem.InputDevice+ControlBitRangeNode& parent, UnityEngine.InputSystem.InputControl control, System.Int32& controlIndiciesNextFreeIndex, System.UInt16 startOffset) [0x0016d] in .\Library\PackageCache\com.unity.inputsystem@1.5.0\InputSystem\Devices\InputDeviceBuilder.cs:1010 at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InsertControlBitRangeNode (UnityEngine.InputSystem.InputDevice+ControlBitRangeNode& parent, UnityEngine.InputSystem.InputControl control, System.Int32& controlIndiciesNextFreeIndex, System.UInt16 startOffset) [0x0016d] in .\Library\PackageCache\com.unity.inputsystem@1.5.0\InputSystem\Devices\InputDeviceBuilder.cs:1010 at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InsertControlBitRangeNode (UnityEngine.InputSystem.InputDevice+ControlBitRangeNode& parent, UnityEngine.InputSystem.InputControl control, System.Int32& controlIndiciesNextFreeIndex, System.UInt16 startOffset) [0x0016d] in .\Library\PackageCache\com.unity.inputsystem@1.5.0\InputSystem\Devices\InputDeviceBuilder.cs:1010 at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InsertControlBitRangeNode (UnityEngine.InputSystem.InputDevice+ControlBitRangeNode& parent, UnityEngine.InputSystem.InputControl control, System.Int32& controlIndiciesNextFreeIndex, System.UInt16 startOffset) [0x0016d] in .\Library\PackageCache\com.unity.inputsystem@1.5.0\InputSystem\Devices\InputDeviceBuilder.cs:1010 at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InsertControlBitRangeNode (UnityEngine.InputSystem.InputDevice+ControlBitRangeNode& parent, UnityEngine.InputSystem.InputControl control, System.Int32& controlIndiciesNextFreeIndex, System.UInt16 startOffset) [0x0016d] in .\Library\PackageCache\com.unity.inputsystem@1.5.0\InputSystem\Devices\InputDeviceBuilder.cs:1010 at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InsertControlBitRangeNode (UnityEngine.InputSystem.InputDevice+ControlBitRangeNode& parent, UnityEngine.InputSystem.InputControl control, System.Int32& controlIndiciesNextFreeIndex, System.UInt16 startOffset) [0x0016d] in .\Library\PackageCache\com.unity.inputsystem@1.5.0\InputSystem\Devices\InputDeviceBuilder.cs:1010 at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InsertControlBitRangeNode (UnityEngine.InputSystem.InputDevice+ControlBitRangeNode& parent, UnityEngine.InputSystem.InputControl control, System.Int32& controlIndiciesNextFreeIndex, System.UInt16 startOffset) [0x0016d] in .\Library\PackageCache\com.unity.inputsystem@1.5.0\InputSystem\Devices\InputDeviceBuilder.cs:1010 at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InsertControlBitRangeNode (UnityEngine.InputSystem.InputDevice+ControlBitRangeNode& parent, UnityEngine.InputSystem.InputControl control, System.Int32& controlIndiciesNextFreeIndex, System.UInt16 startOffset) [0x0016d] in .\Library\PackageCache\com.unity.inputsystem@1.5.0\InputSystem\Devices\InputDeviceBuilder.cs:1010 at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InsertControlBitRangeNode (UnityEngine.InputSystem.InputDevice+ControlBitRangeNode& parent, UnityEngine.InputSystem.InputControl control, System.Int32& controlIndiciesNextFreeIndex, System.UInt16 startOffset) [0x0016d] in .\Library\PackageCache\com.unity.inputsystem@1.5.0\InputSystem\Devices\InputDeviceBuilder.cs:1010 at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InsertControlBitRangeNode (UnityEngine.InputSystem.InputDevice+ControlBitRangeNode& parent, UnityEngine.InputSystem.InputControl control, System.Int32& controlIndiciesNextFreeIndex, System.UInt16 startOffset) [0x0016d] in .\Library\PackageCache\com.unity.inputsystem@1.5.0\InputSystem\Devices\InputDeviceBuilder.cs:1010 at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InsertControlBitRangeNode (UnityEngine.InputSystem.InputDevice+ControlBitRangeNode& parent, UnityEngine.InputSystem.InputControl control, System.Int32& controlIndiciesNextFreeIndex, System.UInt16 startOffset) [0x0016d] in .\Library\PackageCache\com.unity.inputsystem@1.5.0\InputSystem\Devices\InputDeviceBuilder.cs:1010 at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InsertControlBitRangeNode (UnityEngine.InputSystem.InputDevice+ControlBitRangeNode& parent, UnityEngine.InputSystem.InputControl control, System.Int32& controlIndiciesNextFreeIndex, System.UInt16 startOffset) [0x0016d] in .\Library\PackageCache\com.unity.inputsystem@1.5.0\InputSystem\Devices\InputDeviceBuilder.cs:1010 at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InsertControlBitRangeNode (UnityEngine.InputSystem.InputDevice+ControlBitRangeNode& parent, UnityEngine.InputSystem.InputControl control, System.Int32& controlIndiciesNextFreeIndex, System.UInt16 startOffset) [0x0016d] in .\Library\PackageCache\com.unity.inputsystem@1.5.0\InputSystem\Devices\InputDeviceBuilder.cs:1010 at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InsertControlBitRangeNode (UnityEngine.InputSystem.InputDevice+ControlBitRangeNode& parent, UnityEngine.InputSystem.InputControl control, System.Int32& controlIndiciesNextFreeIndex, System.UInt16 startOffset) [0x0016d] in .\Library\PackageCache\com.unity.inputsystem@1.5.0\InputSystem\Devices\InputDeviceBuilder.cs:1010 at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InsertControlBitRangeNode (UnityEngine.InputSystem.InputDevice+ControlBitRangeNode& parent, UnityEngine.InputSystem.InputControl control, System.Int32& controlIndiciesNextFreeIndex, System.UInt16 startOffset) [0x0016d] in .\Library\PackageCache\com.unity.inputsystem@1.5.0\InputSystem\Devices\InputDeviceBuilder.cs:1010 at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InsertControlBitRangeNode (UnityEngine.InputSystem.InputDevice+ControlBitRangeNode& parent, UnityEngine.InputSystem.InputControl control, System.Int32& controlIndiciesNextFreeIndex, System.UInt16 startOffset) [0x0016d] in .\Library\PackageCache\com.unity.inputsystem@1.5.0\InputSystem\Devices\InputDeviceBuilder.cs:1010 at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InsertControlBitRangeNode (UnityEngine.InputSystem.InputDevice+ControlBitRangeNode& parent, UnityEngine.InputSystem.InputControl control, System.Int32& controlIndiciesNextFreeIndex, System.UInt16 startOffset) [0x0016d] in .\Library\PackageCache\com.unity.inputsystem@1.5.0\InputSystem\Devices\InputDeviceBuilder.cs:1010 at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InsertControlBitRangeNode (UnityEngine.InputSystem.InputDevice+ControlBitRangeNode& parent, UnityEngine.InputSystem.InputControl control, System.Int32& controlIndiciesNextFreeIndex, System.UInt16 startOffset) [0x0016d] in .\Library\PackageCache\com.unity.inputsystem@1.5.0\InputSystem\Devices\InputDeviceBuilder.cs:1010 at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InsertControlBitRangeNode (UnityEngine.InputSystem.InputDevice+ControlBitRangeNode& parent, UnityEngine.InputSystem.InputControl control, System.Int32& controlIndiciesNextFreeIndex, System.UInt16 startOffset) [0x0016d] in .\Library\PackageCache\com.unity.inputsystem@1.5.0\InputSystem\Devices\InputDeviceBuilder.cs:1010 at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InsertControlBitRangeNode (UnityEngine.InputSystem.InputDevice+ControlBitRangeNode& parent, UnityEngine.InputSystem.InputControl control, System.Int32& controlIndiciesNextFreeIndex, System.UInt16 startOffset) [0x0016d] in .\Library\PackageCache\com.unity.inputsystem@1.5.0\InputSystem\Devices\InputDeviceBuilder.cs:1010 at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InsertControlBitRangeNode (UnityEngine.InputSystem.InputDevice+ControlBitRangeNode& parent, UnityEngine.InputSystem.InputControl control, System.Int32& controlIndiciesNextFreeIndex, System.UInt16 startOffset) [0x0016d] in .\Library\PackageCache\com.unity.inputsystem@1.5.0\InputSystem\Devices\InputDeviceBuilder.cs:1010 at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InsertControlBitRangeNode (UnityEngine.InputSystem.InputDevice+ControlBitRangeNode& parent, UnityEngine.InputSystem.InputControl control, System.Int32& controlIndiciesNextFreeIndex, System.UInt16 startOffset) [0x0016d] in .\Library\PackageCache\com.unity.inputsystem@1.5.0\InputSystem\Devices\InputDeviceBuilder.cs:1010 at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InsertControlBitRangeNode (UnityEngine.InputSystem.InputDevice+ControlBitRangeNode& parent, UnityEngine.InputSystem.InputControl control, System.Int32& controlIndiciesNextFreeIndex, System.UInt16 startOffset) [0x0016d] in .\Library\PackageCache\com.unity.inputsystem@1.5.0\InputSystem\Devices\InputDeviceBuilder.cs:1010 at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InsertControlBitRangeNode (UnityEngine.InputSystem.InputDevice+ControlBitRangeNode& parent, UnityEngine.InputSystem.InputControl control, System.Int32& controlIndiciesNextFreeIndex, System.UInt16 startOffset) [0x0016d] in .\Library\PackageCache\com.unity.inputsystem@1.5.0\InputSystem\Devices\InputDeviceBuilder.cs:1010 at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InsertControlBitRangeNode (UnityEngine.InputSystem.InputDevice+ControlBitRangeNode& parent, UnityEngine.InputSystem.InputControl control, System.Int32& controlIndiciesNextFreeIndex, System.UInt16 startOffset) [0x0016d] in .\Library\PackageCache\com.unity.inputsystem@1.5.0\InputSystem\Devices\InputDeviceBuilder.cs:1010 at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InsertControlBitRangeNode (UnityEngine.InputSystem.InputDevice+ControlBitRangeNode& parent, UnityEngine.InputSystem.InputControl control, System.Int32& controlIndiciesNextFreeIndex, System.UInt16 startOffset) [0x0016d] in .\Library\PackageCache\com.unity.inputsystem@1.5.0\InputSystem\Devices\InputDeviceBuilder.cs:1010 at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InsertControlBitRangeNode (UnityEngine.InputSystem.InputDevice+ControlBitRangeNode& parent, UnityEngine.InputSystem.InputControl control, System.Int32& controlIndiciesNextFreeIndex, System.UInt16 startOffset) [0x0016d] in .\Library\PackageCache\com.unity.inputsystem@1.5.0\InputSystem\Devices\InputDeviceBuilder.cs:1010 at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InsertControlBitRangeNode (UnityEngine.InputSystem.InputDevice+ControlBitRangeNode& parent, UnityEngine.InputSystem.InputControl control, System.Int32& controlIndiciesNextFreeIndex, System.UInt16 startOffset) [0x0016d] in .\Library\PackageCache\com.unity.inputsystem@1.5.0\InputSystem\Devices\InputDeviceBuilder.cs:1010 at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InsertControlBitRangeNode (UnityEngine.InputSystem.InputDevice+ControlBitRangeNode& parent, UnityEngine.InputSystem.InputControl control, System.Int32& controlIndiciesNextFreeIndex, System.UInt16 startOffset) [0x0016d] in .\Library\PackageCache\com.unity.inputsystem@1.5.0\InputSystem\Devices\InputDeviceBuilder.cs:1010 at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InsertControlBitRangeNode (UnityEngine.InputSystem.InputDevice+ControlBitRangeNode& parent, UnityEngine.InputSystem.InputControl control, System.Int32& controlIndiciesNextFreeIndex, System.UInt16 startOffset) [0x0016d] in .\Library\PackageCache\com.unity.inputsystem@1.5.0\InputSystem\Devices\InputDeviceBuilder.cs:1010 at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InsertControlBitRangeNode (UnityEngine.InputSystem.InputDevice+ControlBitRangeNode& parent, UnityEngine.InputSystem.InputControl control, System.Int32& controlIndiciesNextFreeIndex, System.UInt16 startOffset) [0x0016d] in .\Library\PackageCache\com.unity.inputsystem@1.5.0\InputSystem\Devices\InputDeviceBuilder.cs:1010 at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InsertControlBitRangeNode (UnityEngine.InputSystem.InputDevice+ControlBitRangeNode& parent, UnityEngine.InputSystem.InputControl control, System.Int32& controlIndiciesNextFreeIndex, System.UInt16 startOffset) [0x0016d] in .\Library\PackageCache\com.unity.inputsystem@1.5.0\InputSystem\Devices\InputDeviceBuilder.cs:1010 at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InsertControlBitRangeNode (UnityEngine.InputSystem.InputDevice+ControlBitRangeNode& parent, UnityEngine.InputSystem.InputControl control, System.Int32& controlIndiciesNextFreeIndex, System.UInt16 startOffset) [0x0016d] in .\Library\PackageCache\com.unity.inputsystem@1.5.0\InputSystem\Devices\InputDeviceBuilder.cs:1010 at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InsertControlBitRangeNode (UnityEngine.InputSystem.InputDevice+ControlBitRangeNode& parent, UnityEngine.InputSystem.InputControl control, System.Int32& controlIndiciesNextFreeIndex, System.UInt16 startOffset) [0x0016d] in .\Library\PackageCache\com.unity.inputsystem@1.5.0\InputSystem\Devices\InputDeviceBuilder.cs:1010 at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InsertControlBitRangeNode (UnityEngine.InputSystem.InputDevice+ControlBitRangeNode& parent, UnityEngine.InputSystem.InputControl control, System.Int32& controlIndiciesNextFreeIndex, System.UInt16 startOffset) [0x0016d] in .\Library\PackageCache\com.unity.inputsystem@1.5.0\InputSystem\Devices\InputDeviceBuilder.cs:1010 at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InsertControlBitRangeNode (UnityEngine.InputSystem.InputDevice+ControlBitRangeNode& parent, UnityEngine.InputSystem.InputControl control, System.Int32& controlIndiciesNextFreeIndex, System.UInt16 startOffset) [0x0016d] in .\Library\PackageCache\com.unity.inputsystem@1.5.0\InputSystem\Devices\InputDeviceBuilder.cs:1010 at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InsertControlBitRangeNode (UnityEngine.InputSystem.InputDevice+ControlBitRangeNode& parent, UnityEngine.InputSystem.InputControl control, System.Int32& controlIndiciesNextFreeIndex, System.UInt16 startOffset) [0x0016d] in .\Library\PackageCache\com.unity.inputsystem@1.5.0\InputSystem\Devices\InputDeviceBuilder.cs:1010 at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InsertControlBitRangeNode (UnityEngine.InputSystem.InputDevice+ControlBitRangeNode& parent, UnityEngine.InputSystem.InputControl control, System.Int32& controlIndiciesNextFreeIndex, System.UInt16 startOffset) [0x0016d] in .\Library\PackageCache\com.unity.inputsystem@1.5.0\InputSystem\Devices\InputDeviceBuilder.cs:1010 at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InsertControlBitRangeNode (UnityEngine.InputSystem.InputDevice+ControlBitRangeNode& parent, UnityEngine.InputSystem.InputControl control, System.Int32& controlIndiciesNextFreeIndex, System.UInt16 startOffset) [0x0016d] in .\Library\PackageCache\com.unity.inputsystem@1.5.0\InputSystem\Devices\InputDeviceBuilder.cs:1010 at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.


ISSUE MIGRATION

Issue migrated from: https://github.com/microsoft/MixedRealityToolkit-Unity/issues/11437

IssueSyncBot commented 12 months ago

Original comment by:

@AMollis AMollis


@IvayloBozhilov this looks like a duplicate of the following issue

This issue is a Unity bug with com.unity.inputsystem 1.5.0:

Please try com.unity.inputsystem 1.5.1 once available. You can also try grabbing the source for the OSS project