Search Unity

  1. Unity wants to learn about your experiences working on a Unity project today. We'd like to hear from you via this survey.
    Dismiss Notice
  2. Get the latest news, tutorials and offers directly to your inbox with our newsletters. Sign up now.
    Dismiss Notice
  3. Read here for Unity's latest plans on OpenXR.
    Dismiss Notice

Bug [OpenXR, HTC Vive] Passthrough actions should be left in performed state by default action

Discussion in 'XR Interaction Toolkit and Input' started by alex_dossamer, Apr 13, 2021.

  1. alex_dossamer

    alex_dossamer

    Joined:
    Jun 19, 2018
    Posts:
    6
    Hello! I'm building a VR project using OpenXR and testing with an HTC Vive. Previously, when I was using a Windows Mixed Reality headset, the action-based input system never threw any errors. Now, with the Vive bindings, I've been getting lots of exceptions at runtime.

    See attachment for actions JSON.

    @Rene-Damm maybe you can give some insight?


    ----------


    Of greatest interest is the following exception, because it seems to be disabling my input handler:


    `Only pass-through actions should be left in performed state by default interaction
    UnityEngine.InputSystem.LowLevel.NativeInputRuntime/<>c__DisplayClass7_0:<set_onUpdate>b__0 (UnityEngineInternal.Input.NativeInputUpdateType,UnityEngineInternal.Input.NativeInputEventBuffer*)
    UnityEngineInternal.Input.NativeInputSystem:NotifyUpdate (UnityEngineInternal.Input.NativeInputUpdateType,intptr)`


    ----------


    When I try to look at the documentation for passthrough actions, I find that it is missing:


    https://docs.unity3d.com/Packages/com.unity.inputsystem@0.2/manual/Actions.html#pass-through-actions

    https://docs.unity3d.com/Packages/com.unity.inputsystem@0.2/manual/Interactions.html


    ----------


    On both pages references to "passthrough interactions" are labeled TODO, which is unfortunately not all that helpful. As such, I really don't know where to start with trying to debug this problem.


    My sense is that neither SteamVR OpenXR support nor the new Input System are quite ready for primetime, which is too bad as I have a deadline coming up.


    Any help/insights very much appreciated!


    ----------


    Other exceptions that occur alongside the above one:


    (This one is funny--feels like it shouldn't have made it through code review haha)


    `Action has been triggered but apparently not from an interaction yet there's interactions on the binding that got triggered?!?
    UnityEngine.InputSystem.LowLevel.NativeInputRuntime/<>c__DisplayClass7_0:<set_onUpdate>b__0 (UnityEngineInternal.Input.NativeInputUpdateType,UnityEngineInternal.Input.NativeInputEventBuffer*)
    UnityEngineInternal.Input.NativeInputSystem:NotifyUpdate (UnityEngineInternal.Input.NativeInputUpdateType,intptr)
    `

    `Layout 'ViveController' matches existing device 'HTC HTC Vive Controller OpenXR (XRInputV1)' but failed to instantiate: System.InvalidOperationException: Layout has not been set on control 'devicePose' in 'ViveController'
    at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.AddChildControl (UnityEngine.InputSystem.Layouts.InputControlLayout layout, UnityEngine.InputSystem.Utilities.InternedString variants, UnityEngine.InputSystem.InputControl parent, System.Boolean& haveChildrenUsingStateFromOtherControls, UnityEngine.InputSystem.Layouts.InputControlLayout+ControlItem controlItem, System.Int32 childIndex, System.String nameOverride) [0x0031a] in C:\Users\upi\Documents\git\unity\RoomConcept\Library\PackageCache\com.unity.inputsystem@1.0.2\InputSystem\Devices\InputDeviceBuilder.cs:465
    at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.AddChildControls (UnityEngine.InputSystem.Layouts.InputControlLayout layout, UnityEngine.InputSystem.Utilities.InternedString variants, UnityEngine.InputSystem.InputControl parent, System.Boolean& haveChildrenUsingStateFromOtherControls) [0x001e4] in C:\Users\upi\Documents\git\unity\RoomConcept\Library\PackageCache\com.unity.inputsystem@1.0.2\InputSystem\Devices\InputDeviceBuilder.cs:309
    at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InstantiateLayout (UnityEngine.InputSystem.Layouts.InputControlLayout layout, UnityEngine.InputSystem.Utilities.InternedString variants, UnityEngine.InputSystem.Utilities.InternedString name, UnityEngine.InputSystem.InputControl parent) [0x001f9] in C:\Users\upi\Documents\git\unity\RoomConcept\Library\PackageCache\com.unity.inputsystem@1.0.2\InputSystem\Devices\InputDeviceBuilder.cs:193
    at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InstantiateLayout (UnityEngine.InputSystem.Utilities.InternedString layout, UnityEngine.InputSystem.Utilities.InternedString variants, UnityEngine.InputSystem.Utilities.InternedString name, UnityEngine.InputSystem.InputControl parent) [0x0000d] in C:\Users\upi\Documents\git\unity\RoomConcept\Library\PackageCache\com.unity.inputsystem@1.0.2\InputSystem\Devices\InputDeviceBuilder.cs:102
    at UnityEngine.InputSystem.Layouts.InputDeviceBuilder.Setup (UnityEngine.InputSystem.Utilities.InternedString layout, UnityEngine.InputSystem.Utilities.InternedString variants, UnityEngine.InputSystem.Layouts.InputDeviceDescription deviceDescription) [0x0000b] in C:\Users\upi\Documents\git\unity\RoomConcept\Library\PackageCache\com.unity.inputsystem@1.0.2\InputSystem\Devices\InputDeviceBuilder.cs:51
    at UnityEngine.InputSystem.InputDevice.Build[TDevice] (System.String layoutName, System.String layoutVariants, UnityEngine.InputSystem.Layouts.InputDeviceDescription deviceDescription) [0x00042] in C:\Users\upi\Documents\git\unity\RoomConcept\Library\PackageCache\com.unity.inputsystem@1.0.2\InputSystem\Devices\InputDevice.cs:678
    at UnityEngine.InputSystem.InputManager.AddDevice (UnityEngine.InputSystem.Utilities.InternedString layout, System.Int32 deviceId, System.String deviceName, UnityEngine.InputSystem.Layouts.InputDeviceDescription deviceDescription, UnityEngine.InputSystem.InputDevice+DeviceFlags deviceFlags, UnityEngine.InputSystem.Utilities.InternedString variants) [0x00000] in C:\Users\upi\Documents\git\unity\RoomConcept\Library\PackageCache\com.unity.inputsystem@1.0.2\InputSystem\InputManager.cs:1033
    at UnityEngine.InputSystem.InputManager.AddAvailableDevicesMatchingDescription (UnityEngine.InputSystem.Layouts.InputDeviceMatcher matcher, UnityEngine.InputSystem.Utilities.InternedString layout) [0x000ad] in C:\Users\upi\Documents\git\unity\RoomConcept\Library\PackageCache\com.unity.inputsystem@1.0.2\InputSystem\InputManager.cs:692
    UnityEngine.XR.Management.XRGeneralSettings:AttemptInitializeXRSDKOnLoad () (at Library/PackageCache/com.unity.xr.management@4.0.1/Runtime/XRGeneralSettings.cs:148)`


    `InvalidOperationException: Layout has not been set on control 'devicePose' in 'ViveController'
    UnityEngine.InputSystem.Layouts.InputDeviceBuilder.AddChildControl (UnityEngine.InputSystem.Layouts.InputControlLayout layout, UnityEngine.InputSystem.Utilities.InternedString variants, UnityEngine.InputSystem.InputControl parent, System.Boolean& haveChildrenUsingStateFromOtherControls, UnityEngine.InputSystem.Layouts.InputControlLayout+ControlItem controlItem, System.Int32 childIndex, System.String nameOverride) (at Library/PackageCache/com.unity.inputsystem@1.0.2/InputSystem/Devices/InputDeviceBuilder.cs:465)
    UnityEngine.InputSystem.Layouts.InputDeviceBuilder.AddChildControls (UnityEngine.InputSystem.Layouts.InputControlLayout layout, UnityEngine.InputSystem.Utilities.InternedString variants, UnityEngine.InputSystem.InputControl parent, System.Boolean& haveChildrenUsingStateFromOtherControls) (at Library/PackageCache/com.unity.inputsystem@1.0.2/InputSystem/Devices/InputDeviceBuilder.cs:309)
    UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InstantiateLayout (UnityEngine.InputSystem.Layouts.InputControlLayout layout, UnityEngine.InputSystem.Utilities.InternedString variants, UnityEngine.InputSystem.Utilities.InternedString name, UnityEngine.InputSystem.InputControl parent) (at Library/PackageCache/com.unity.inputsystem@1.0.2/InputSystem/Devices/InputDeviceBuilder.cs:193)
    UnityEngine.InputSystem.Layouts.InputDeviceBuilder.InstantiateLayout (UnityEngine.InputSystem.Utilities.InternedString layout, UnityEngine.InputSystem.Utilities.InternedString variants, UnityEngine.InputSystem.Utilities.InternedString name, UnityEngine.InputSystem.InputControl parent) (at Library/PackageCache/com.unity.inputsystem@1.0.2/InputSystem/Devices/InputDeviceBuilder.cs:102)
    UnityEngine.InputSystem.Layouts.InputDeviceBuilder.Setup (UnityEngine.InputSystem.Utilities.InternedString layout, UnityEngine.InputSystem.Utilities.InternedString variants, UnityEngine.InputSystem.Layouts.InputDeviceDescription deviceDescription) (at Library/PackageCache/com.unity.inputsystem@1.0.2/InputSystem/Devices/InputDeviceBuilder.cs:51)
    UnityEngine.InputSystem.InputDevice.Build[TDevice] (System.String layoutName, System.String layoutVariants, UnityEngine.InputSystem.Layouts.InputDeviceDescription deviceDescription) (at Library/PackageCache/com.unity.inputsystem@1.0.2/InputSystem/Devices/InputDevice.cs:678)
    UnityEngine.InputSystem.InputManager.AddDevice (UnityEngine.InputSystem.Utilities.InternedString layout, System.Int32 deviceId, System.String deviceName, UnityEngine.InputSystem.Layouts.InputDeviceDescription deviceDescription, UnityEngine.InputSystem.InputDevice+DeviceFlags deviceFlags, UnityEngine.InputSystem.Utilities.InternedString variants) (at Library/PackageCache/com.unity.inputsystem@1.0.2/InputSystem/InputManager.cs:1033)
    UnityEngine.InputSystem.InputManager.AddAvailableDevicesMatchingDescription (UnityEngine.InputSystem.Layouts.InputDeviceMatcher matcher, UnityEngine.InputSystem.Utilities.InternedString layout) (at Library/PackageCache/com.unity.inputsystem@1.0.2/InputSystem/InputManager.cs:692)
    UnityEngine.XR.Management.XRGeneralSettings:AttemptInitializeXRSDKOnLoad() (at Library/PackageCache/com.unity.xr.management@4.0.1/Runtime/XRGeneralSettings.cs:148)
    `
     

    Attached Files:

  2. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,238
    You might share this with the Vive team on their developer forums so they can have a look.
     
  3. alex_dossamer

    alex_dossamer

    Joined:
    Jun 19, 2018
    Posts:
    6
    Thanks for the pointer! I threw it up on the SteamVR OpenXR forums but yeah it probably is very vive-specific.
     
unityunity