Search Issue Tracker

Fixed

Fixed in 1.5.1

Votes

1

Found in [Package]

1.4.1

1.4.2

Issue ID

ISXB-290

Regression

No

InputAction.bindings.count is not updated after calling Erase() function

Package: Input System

-

Reproduction steps:

# Open the user attached project
# Open the “SampleScene” scene
# Press the Play button
# In the Game view, press the “Test1: Remove bindings until empty” button

Expected result: No errors in the Console
Actual result: ArgumentOutOfRangeException error in the Console

Reproducible with: 1.4.1, 1.4.2 (2020.3.39f1, 2021.3.10f1, 2022.1.16f1, 2022.2.0b8, 2023.1.0a10)

Reproduced on: Windows 10

Error:
ArgumentOutOfRangeException: Binding index 0 is out of range for action 'Action' with 0 bindings Parameter name: indexOfBindingOnAction UnityEngine.InputSystem.InputAction.BindingIndexOnActionToBindingIndexOnMap (System.Int32 indexOfBindingOnAction) (at Library/PackageCache/com.unity.inputsystem@1.4.2/InputSystem/Actions/InputAction.cs:1597) UnityEngine.InputSystem.InputActionSetupExtensions.ChangeBinding (UnityEngine.InputSystem.InputAction action, System.Int32 index) (at Library/PackageCache/com.unity.inputsystem@1.4.2/InputSystem/Actions/InputActionSetupExtensions.cs:552) TestScript.RemoveAllBindings () (at Assets/Scripts/TestScript.cs:44) UnityEngine.Events.InvokableCall.Invoke () (at <24443780251040988095dc2a4c556708>:0) UnityEngine.Events.UnityEvent.Invoke () (at <24443780251040988095dc2a4c556708>:0) UnityEngine.UI.Button.Press () (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/Button.cs:70) UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/Button.cs:114) UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/ExecuteEvents.cs:57) UnityEngine.EventSystems.ExecuteEvents.Execute\\[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1\\[T1] functor) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/ExecuteEvents.cs:272) UnityEngine.EventSystems.EventSystem:Update() (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/EventSystem.cs:517)

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.