What are the causes of these errors?

I’m quite new to the input system. I’ve encountered this error when I started to play on the game scene. I’ve attached picture to show how I’ve set up the input manager.

Type of instance in array does not match expected type
UnityEngine.InputSystem.PlayerInput:OnDisable() (at Library/PackageCache/com.unity.inputsystem@1.4.1/InputSystem/Plugins/PlayerInput/PlayerInput.cs:1735)

IndexOutOfRangeException while resolving binding ‘HoldInteract:/buttonSouth[Gamepad]’ in action map ‘PlayerInputAction (UnityEngine.InputSystem.InputActionAsset):ButlerCharacter’
UnityEngine.InputSystem.PlayerInput:OnDisable() (at Library/PackageCache/com.unity.inputsystem@1.4.1/InputSystem/Plugins/PlayerInput/PlayerInput.cs:1735)

IndexOutOfRangeException: Index was outside the bounds of the array.
UnityEngine.InputSystem.InputBindingResolver.InstantiateWithParameters[TType] (UnityEngine.InputSystem.Utilities.TypeTable registrations, System.String namesAndParameters, TType[ ]& array, System.Int32& count, UnityEngine.InputSystem.InputActionMap actionMap, UnityEngine.InputSystem.InputBinding& binding) (at Library/PackageCache/com.unity.inputsystem@1.4.1/InputSystem/Actions/InputBindingResolver.cs:638)
UnityEngine.InputSystem.InputBindingResolver.AddActionMap (UnityEngine.InputSystem.InputActionMap actionMap) (at Library/PackageCache/com.unity.inputsystem@1.4.1/InputSystem/Actions/InputBindingResolver.cs:335)
UnityEngine.InputSystem.PlayerInput:OnDisable() (at Library/PackageCache/com.unity.inputsystem@1.4.1/InputSystem/Plugins/PlayerInput/PlayerInput.cs:1735)

IndexOutOfRangeException: Index was outside the bounds of the array.
UnityEngine.InputSystem.InputBindingResolver.InstantiateWithParameters[TType] (UnityEngine.InputSystem.Utilities.TypeTable registrations, System.String namesAndParameters, TType[ ]& array, System.Int32& count, UnityEngine.InputSystem.InputActionMap actionMap, UnityEngine.InputSystem.InputBinding& binding) (at Library/PackageCache/com.unity.inputsystem@1.4.1/InputSystem/Actions/InputBindingResolver.cs:638)
UnityEngine.InputSystem.InputBindingResolver.AddActionMap (UnityEngine.InputSystem.InputActionMap actionMap) (at Library/PackageCache/com.unity.inputsystem@1.4.1/InputSystem/Actions/InputBindingResolver.cs:592)
UnityEngine.InputSystem.InputActionMap.ResolveBindings () (at Library/PackageCache/com.unity.inputsystem@1.4.1/InputSystem/Actions/InputActionMap.cs:1352)
UnityEngine.InputSystem.InputActionMap.ResolveBindingsIfNecessary () (at Library/PackageCache/com.unity.inputsystem@1.4.1/InputSystem/Actions/InputActionMap.cs:1217)
UnityEngine.InputSystem.InputActionState.DeferredResolutionOfBindings () (at Library/PackageCache/com.unity.inputsystem@1.4.1/InputSystem/Actions/InputActionState.cs:4449)
UnityEngine.InputSystem.InputActionRebindingExtensions+DeferBindingResolutionWrapper.Dispose () (at Library/PackageCache/com.unity.inputsystem@1.4.1/InputSystem/Actions/InputActionRebindingExtensions.cs:2807)
UnityEngine.InputSystem.PlayerInput.OnDisable () (at Library/PackageCache/com.unity.inputsystem@1.4.1/InputSystem/Plugins/PlayerInput/PlayerInput.cs:1735)

ArgumentNullException: Value cannot be null.
Parameter name: source
System.Linq.Enumerable.Contains[TSource] (System.Collections.Generic.IEnumerable1[T] source, TSource value, System.Collections.Generic.IEqualityComparer1[T] comparer) (at <351e49e2a5bf4fd6beabb458ce2255f3>:0)
System.Linq.Enumerable.Contains[TSource] (System.Collections.Generic.IEnumerable`1[T] source, TSource value) (at <351e49e2a5bf4fd6beabb458ce2255f3>:0)
UnityEngine.InputSystem.InputActionState.FetchActionState (UnityEngine.InputSystem.InputAction action) (at Library/PackageCache/com.unity.inputsystem@1.4.1/InputSystem/Actions/InputActionState.cs:887)
UnityEngine.InputSystem.InputAction.get_currentState () (at Library/PackageCache/com.unity.inputsystem@1.4.1/InputSystem/Actions/InputAction.cs:1492)
UnityEngine.InputSystem.InputAction.get_phase () (at Library/PackageCache/com.unity.inputsystem@1.4.1/InputSystem/Actions/InputAction.cs:508)
UnityEngine.InputSystem.InputAction.get_enabled () (at Library/PackageCache/com.unity.inputsystem@1.4.1/InputSystem/Actions/InputAction.cs:533)
UnityEngine.InputSystem.InputActionAsset.FindAction (System.String actionNameOrId, System.Boolean throwIfNotFound) (at Library/PackageCache/com.unity.inputsystem@1.4.1/InputSystem/Actions/InputActionAsset.cs:549)
UnityEngine.InputSystem.PlayerInput.InitializeActions () (at Library/PackageCache/com.unity.inputsystem@1.4.1/InputSystem/Plugins/PlayerInput/PlayerInput.cs:1246)
UnityEngine.InputSystem.PlayerInput.OnEnable () (at Library/PackageCache/com.unity.inputsystem@1.4.1/InputSystem/Plugins/PlayerInput/PlayerInput.cs:1618)

ArgumentException: Getting control 1’s position in a group with only 1 controls when doing repaint
Aborting
UnityEngine.GUILayoutGroup.GetNext () (at <819de1aa368e45faa4f78e26c97c62b0>:0)
UnityEngine.GUILayoutUtility.DoGetRect (System.Single minWidth, System.Single maxWidth, System.Single minHeight, System.Single maxHeight, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[ ] options) (at <819de1aa368e45faa4f78e26c97c62b0>:0)
UnityEngine.GUILayoutUtility.GetRect (System.Single minWidth, System.Single maxWidth, System.Single minHeight, System.Single maxHeight, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[ ] options) (at <819de1aa368e45faa4f78e26c97c62b0>:0)
UnityEditor.EditorGUILayout.GetControlRect (System.Boolean hasLabel, System.Single height, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[ ] options) (at <8004fcc221b54f98ba547350ea71d812>:0)
UnityEditor.EditorGUILayout.GetControlRect (System.Boolean hasLabel, System.Single height, UnityEngine.GUILayoutOption[ ] options) (at <8004fcc221b54f98ba547350ea71d812>:0)
UnityEditor.PropertyHandler.OnGUILayout (UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren, UnityEngine.GUILayoutOption[ ] options) (at <8004fcc221b54f98ba547350ea71d812>:0)
UnityEditor.EditorGUILayout.PropertyField (UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren, UnityEngine.GUILayoutOption[ ] options) (at <8004fcc221b54f98ba547350ea71d812>:0)
UnityEditor.EditorGUILayout.PropertyField (UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, UnityEngine.GUILayoutOption[ ] options) (at <8004fcc221b54f98ba547350ea71d812>:0)
UnityEngine.InputSystem.Editor.PlayerInputEditor.OnInspectorGUI () (at Library/PackageCache/com.unity.inputsystem@1.4.1/InputSystem/Plugins/PlayerInput/PlayerInputEditor.cs:138)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass58_0.b__0 () (at <8004fcc221b54f98ba547350ea71d812>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

8243829--1078311--b1.png

3 Likes

Since I updated the input system to version 1.4.1, I’m having a similar exception when stopping the game in the Unity Editor:

Type of instance in array does not match expected type
UnityEngine.InputSystem.PlayerInput:OnDisable () (at Library/PackageCache/com.unity.inputsystem@1.4.1/InputSystem/Plugins/PlayerInput/PlayerInput.cs:1735)
2 Likes

I fixed the issue by downgrading the version

2 Likes

Got the same problem on Unity 2021.3.8f1…
I guess I’ll have to go back to previous version :confused:

EDIT : So I tried and actually, it’s Input System 1.4.1 (forced by Unity 2021.3.8f1) which causing the errors. For our game, the joystick UP doesn’t work sometimes…

For now, just go back to Unity 2021.3.6 and downgrade the Input System to 1.3 :heart:

1 Like

Same here - binding of “/leftTrigger” and some others are not longer working and producing exceptions. Going back to 2021.3.7 fixed the issue. Suboptimal for an LTS release breaking such crucial things…

2 Likes

Same errors in 2022.1.12f (Input System 1.4.1)

Just upgraded from 2020 to 2021.3.8f1 and got these errors too. Disappointing.

EDIT: Reverting to 2021.3.6 and input system 1.3 makes the error go away. Tested on Windows and Mac Intel.

hello there,
I noticed that it’s happen, if in your input action asset you use control schemes and have actions with interactions or processors. And when you disable player input in game, console log those errors

8357079--1099962--Screenshot 2022-08-12 115619.png

2 Likes

Input system 1.3 seems will cause switch pro controll problem…

Great catch, looking forward to a fix on this as interactions and processors are kinda important…

Wow, there goes hours of my weekend … same issue (plus would also error when hitting play unless ‘reload domain’ was checked in Editor/Enter Play Mode Settings), tried various things before I found this post (restarting Unity, rebooting computer, re-establishing the mappings) without success. Downgrading to Unity 2021.3.7 (from 2021.3.8) and removing the Input package/adding the 1.3 version fixed everything.

Add me to the list of people experiencing these errors. Love that this kind of thing still happens in the supposedly well tested stable LTS versions…

2 Likes

Мe too

Also experiencing this. I’m a long time game developer but first time Unity user, and I gotta say this is indeed frustrating. I chose LTS so I could avoid stuff like this…

Getting it here too

Me, too. If anyone at Unity could help shed some light on this, we’d really appreciate it. If it’s ignorable, it’d be really nice to know. :slight_smile:

Same here after upgrading to 2021.3.8 LTS


Input System 1.4.2 was out today, maybe it will resolve this issue. Have to give it a try.


Now Im having this other issue in 1.4.2

Same here, updated unity from 2020.3.37f1 to 2020.3.38f1 and got these errors. Also the movement input (Vector2) does not work anymore.

Updating the input system from 1.4.1 to 1.4.2 did not change anything.

1 Like