Search Unity

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:
    25
    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,822
    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:
    25
    Thanks for the pointer! I threw it up on the SteamVR OpenXR forums but yeah it probably is very vive-specific.
     
  4. DMGregory

    DMGregory

    Joined:
    Jul 31, 2013
    Posts:
    4
    I'm getting similar errors on a Windows PC with an Xbox 360 gamepad.

    Unity 2020.3.6f1 (LTS) + Input System 1.0.2 (Verified)

    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)

    Action has been triggered but apparently not from an interaction yet there's interactions on the binding that got triggered?!?
    UnityEngine.InputSystem.PlayerInput:OnDisable () (at Library/PackageCache/com.unity.inputsystem@1.0.2/InputSystem/Plugins/PlayerInput/PlayerInput.cs:1666)
    I don't observe any issues when pressing buttons one at a time, but holding and mashing many buttons together seems to trigger this fairly consistently.

    My current setup has a Vector2 Navigation action with DPAD (Digital) bindings for WASD, arrow keys, and the gamepad DPAD / left stick, as well as Button actions with bindings for the gamepad face buttons, shoulders, and triggers.

    upload_2021-5-22_16-17-10.png
     
  5. pekdemir

    pekdemir

    Joined:
    Nov 7, 2016
    Posts:
    4
    I'm also getting this Error Message occasionally using the Oculus Rift CV1 Touch Controllers in combination with the XR Interaction Toolkit and the new Input System (Unity 2020.3.10f1 reaching back to at least 2020.1.x I believe). Couldn't really figure out what's going on. My first guess was, that it only happens when I pressed and held a certain button for quite a long time (maybe a minute or more) during Tests in Play Mode (not sure though). At least it doesn't seem to break the Application as far as I can tell ... but nonetheless annoying as hell every time it pops up.
     
  6. unitydreamer29

    unitydreamer29

    Joined:
    Dec 27, 2020
    Posts:
    47
    Just like DMGregory, I am also using Windows PC with an Xbox 360 controller am also getting this error message but it is difficult to reproduce. Happen to have XR Interaction Toolkit installed, but not using OpenXR. Wondering if this issue is purely related to the new input system somehow.

    Edit: Can trigger the error by pressing gamepad buttons and keyboard buttons at the same time.

    Fixed by changing some actions shared between the controller and keyboard from "Button" to "Pass Through" type action.
     
    Last edited: Jun 2, 2021
    GAAC_Unity likes this.