I am trying to learn how to use the new Input System and while editing the actions of the InputActionAsset I got this error
StackOverflowException: The requested operation caused a stack overflow
.
System.Array.Resize[T] (T & array, System.Int32 newSize) (at <567df3e0919241ba98db88bec4c6696f>:0)
UnityEngine.InputSystem.Utilities.InlinedArray1[TValue].Append (TValue value) (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Utilities/InlinedArray.cs:174) UnityEngine.InputSystem.InputAction.add_canceled (System.Action
1[T] value) (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Actions/InputAction.cs:494)
UnityEngine.InputSystem.PlayerInput.InitializeActions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:1117)
UnityEngine.InputSystem.PlayerInput.get_actions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:290)
UnityEngine.InputSystem.PlayerInput.InitializeActions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:1126)
UnityEngine.InputSystem.PlayerInput.get_actions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:290)
UnityEngine.InputSystem.PlayerInput.InitializeActions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:1126)
UnityEngine.InputSystem.PlayerInput.get_actions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:290)
UnityEngine.InputSystem.PlayerInput.InitializeActions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:1126)
UnityEngine.InputSystem.PlayerInput.get_actions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:290)
UnityEngine.InputSystem.PlayerInput.InitializeActions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:1126)
UnityEngine.InputSystem.PlayerInput.get_actions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:290)
UnityEngine.InputSystem.PlayerInput.InitializeActions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:1126)
UnityEngine.InputSystem.PlayerInput.get_actions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:290)
UnityEngine.InputSystem.PlayerInput.InitializeActions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:1126)
UnityEngine.InputSystem.PlayerInput.get_actions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:290)
UnityEngine.InputSystem.PlayerInput.InitializeActions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:1126)
UnityEngine.InputSystem.PlayerInput.get_actions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:290)
UnityEngine.InputSystem.PlayerInput.InitializeActions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:1126)
UnityEngine.InputSystem.PlayerInput.get_actions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:290)
UnityEngine.InputSystem.PlayerInput.InitializeActions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:1126)
UnityEngine.InputSystem.PlayerInput.get_actions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:290)
UnityEngine.InputSystem.PlayerInput.InitializeActions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:1126)
UnityEngine.InputSystem.PlayerInput.get_actions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:290)
UnityEngine.InputSystem.PlayerInput.InitializeActions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:1126)
UnityEngine.InputSystem.PlayerInput.get_actions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:290)
UnityEngine.InputSystem.PlayerInput.InitializeActions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:1126)
UnityEngine.InputSystem.PlayerInput.get_actions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:290)
UnityEngine.InputSystem.PlayerInput.InitializeActions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:1126)
UnityEngine.InputSystem.PlayerInput.get_actions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:290)
UnityEngine.InputSystem.PlayerInput.InitializeActions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:1126)
UnityEngine.InputSystem.PlayerInput.get_actions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:290)
UnityEngine.InputSystem.PlayerInput.InitializeActions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:1126)
UnityEngine.InputSystem.PlayerInput.get_actions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:290)
UnityEngine.InputSystem.PlayerInput.InitializeActions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:1126)
UnityEngine.InputSystem.PlayerInput.get_actions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:290)
UnityEngine.InputSystem.PlayerInput.InitializeActions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:1126)
UnityEngine.InputSystem.PlayerInput.get_actions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:290)
UnityEngine.InputSystem.PlayerInput.InitializeActions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:1126)
UnityEngine.InputSystem.PlayerInput.get_actions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:290)
UnityEngine.InputSystem.PlayerInput.InitializeActions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:1126)
UnityEngine.InputSystem.PlayerInput.get_actions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:290)
UnityEngine.InputSystem.PlayerInput.InitializeActions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:1126)
UnityEngine.InputSystem.PlayerInput.get_actions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:290)
UnityEngine.InputSystem.PlayerInput.InitializeActions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:1126)
UnityEngine.InputSystem.PlayerInput.get_actions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:290)
UnityEngine.InputSystem.PlayerInput.InitializeActions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:1126)
UnityEngine.InputSystem.PlayerInput.get_actions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:290)
UnityEngine.InputSystem.PlayerInput.InitializeActions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:1126)
UnityEngine.InputSystem.PlayerInput.get_actions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:290)
UnityEngine.InputSystem.PlayerInput.InitializeActions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:1126)
UnityEngine.InputSystem.PlayerInput.get_actions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:290)
UnityEngine.InputSystem.PlayerInput.InitializeActions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:1126)
UnityEngine.InputSystem.PlayerInput.get_actions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:290)
UnityEngine.InputSystem.PlayerInput.InitializeActions () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:1126)
UnityEngine.InputSystem.PlayerInput.get_actions () (at
Now when I try to edit the actions of a Player Input component none of them will pop up. If I continue to edit the actions of the InputActionAsset I will continue to get the same error. I’m not sure if I’m doing something incorrectly that is causing the error or if this is a bug. Please help.
nicolasmaclean_1:
I am trying to learn how to use the new Input System and while editing the actions of the InputActionAsset I got this error
Now when I try to edit the actions of a Player Input component none of them will pop up. If I continue to edit the actions of the InputActionAsset I will continue to get the same error. I’m not sure if I’m doing something incorrectly that is causing the error or if this is a bug. Please help.
We get the same error in U2019.3.0f6 with 1.0.0 preview 4
I forgot to add, I’m using U2019.2.19f1 with the 1.0.0 preview 4 InputSystem package
Docboy
February 1, 2020, 2:48pm
5
I made it work, switching the PlayerInput behaviour property to SendMessage and back to InvokeUnityEvents ,
It appears that the stackoverflow happens when it is trying to get the actions but it is called again before it could end so it loop itself until crash
I was able to get around this bug for now by deleting the PlayerInput component and creating a new one.
I can confirm you have to remove the component PlayerInput and create a new one to get rid of it.
Unity 2019.3.0f6 Input System 1.0.0 preview 4
Create a new object with a new PlayerInput. I had the same problem, I think it uses your object to serialize the actions, then if you change the actions but not the object it tries to load the old actions too