IndexOutOfRangeException in InputActionAsset.Enable()

I am migrating a project to Unity 2021.2.0.f1.

I get an Exception from InputSystem package code in InputActionAsset.Enable().
Consider the following:

public class InputActionTest : MonoBehaviour, INeedInjection
{
    public InputActionAsset inputActionAsset;

    public void Start()
    {
        inputActionAsset.Enable();
    }
}

With my InputActions file, I get following Exceptions:

InvalidOperationException while resolving binding 'tab:ButtonWithSignModifier' in action map 'UltraStarPlayInputActions (UnityEngine.InputSystem.InputActionAsset):ui'
UnityEngine.InputSystem.InputActionAsset:Enable ()
InputActionTest:Start () (at Assets/Scenes/About/InputActionTest.cs:20)
InvalidOperationException: No binding composite with name 'ButtonWithSignModifier' has been registered
UnityEngine.InputSystem.InputBindingResolver.InstantiateBindingComposite (System.String nameAndParameters) (at Library/PackageCache/com.unity.inputsystem@1.1.1/InputSystem/Actions/InputBindingResolver.cs:647)
UnityEngine.InputSystem.InputBindingResolver.AddActionMap (UnityEngine.InputSystem.InputActionMap map) (at Library/PackageCache/com.unity.inputsystem@1.1.1/InputSystem/Actions/InputBindingResolver.cs:345)
UnityEngine.InputSystem.InputActionAsset:Enable()
InputActionTest:Start() (at Assets/Scenes/About/InputActionTest.cs:20)
IndexOutOfRangeException while resolving binding 'tab:<Keyboard>/shift[Keyboard&Mouse]' in action map 'UltraStarPlayInputActions (UnityEngine.InputSystem.InputActionAsset):ui'
UnityEngine.InputSystem.InputActionAsset:Enable ()
InputActionTest:Start () (at Assets/Scenes/About/InputActionTest.cs:20)
IndexOutOfRangeException: Index was outside the bounds of the array.
UnityEngine.InputSystem.InputBindingResolver.AddActionMap (UnityEngine.InputSystem.InputActionMap map) (at Library/PackageCache/com.unity.inputsystem@1.1.1/InputSystem/Actions/InputBindingResolver.cs:379)
UnityEngine.InputSystem.InputActionAsset:Enable()
InputActionTest:Start() (at Assets/Scenes/About/InputActionTest.cs:20)
IndexOutOfRangeException: Index was outside the bounds of the array.
UnityEngine.InputSystem.InputBindingResolver.AddActionMap (UnityEngine.InputSystem.InputActionMap map) (at Library/PackageCache/com.unity.inputsystem@1.1.1/InputSystem/Actions/InputBindingResolver.cs:571)
UnityEngine.InputSystem.InputActionMap.ResolveBindings () (at Library/PackageCache/com.unity.inputsystem@1.1.1/InputSystem/Actions/InputActionMap.cs:1169)
UnityEngine.InputSystem.InputActionMap.ResolveBindingsIfNecessary () (at Library/PackageCache/com.unity.inputsystem@1.1.1/InputSystem/Actions/InputActionMap.cs:1065)
UnityEngine.InputSystem.InputActionMap.Enable () (at Library/PackageCache/com.unity.inputsystem@1.1.1/InputSystem/Actions/InputActionMap.cs:500)
UnityEngine.InputSystem.InputActionAsset.Enable () (at Library/PackageCache/com.unity.inputsystem@1.1.1/InputSystem/Actions/InputActionAsset.cs:802)
InputActionTest.Start () (at Assets/Scenes/About/InputActionTest.cs:20)

The same InputActionAsset was working fine in Unity 2021.1.1f1.
Also, ButtonWithSignModifier is none of my code.

You can find the InputAction Asset here: Play/UltraStar Play/Assets/Common/Input/UltraStarPlayInputActions.inputactions at master · UltraStar-Deluxe/Play · GitHub

Any thoughts on this?

I found the issue and its my fault.

  • I had an InputAction “ui/tab”, which had a binding composite named “ButtonWithSignModifier”.
  • After I deleted this InputAction, the error is gone.
  • I copy&pasted the whole “ui” action map from another project. But I did not use “ui/tab” in my project at all.

Sorry for the inconvenience.

I had the same problem. I am guessing the ButtonWithSignModifier feature was removed and can be accomplished with one of the other types.