Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

On Screen Button errors

Discussion in 'Input System' started by sstrong, Jan 24, 2020.

  1. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,229
    I have an On Screen Button script attached to a UI Button. The Control Path is set to <Gamepad>/start. I'm using 1.0.0 preview.3 in U2019.2.0f1.

    The first time it is clicked with the mouse it works fine. Subsequent clicks produce the following errors.
    Code (CSharp):
    1. IndexOutOfRangeException during event processing of Dynamic update; resetting event buffer
    2. UnityEngine.InputSystem.LowLevel.<>c__DisplayClass7_0:<set_onUpdate>b__0(NativeInputUpdateType, NativeInputEventBuffer*)
    3. UnityEngineInternal.Input.NativeInputSystem:NotifyUpdate(NativeInputUpdateType, IntPtr) (at C:/buildslave/unity/build/Modules/Input/Private/Input.cs:12
    and
    Code (CSharp):
    1. IndexOutOfRangeException: Index was outside the bounds of the array.
    2. (wrapper stelemref) System.Object.virt_stelemref_class_small_idepth(intptr,object)
    3. UnityEngine.InputSystem.Utilities.ArrayHelpers.EraseSliceWithCapacity[TValue] (TValue[]& array, System.Int32& length, System.Int32 index, System.Int32 count) (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.3/InputSystem/Utilities/ArrayHelpers.cs:742)
    4. UnityEngine.InputSystem.Users.InputUser.UpdateControlSchemeMatch (System.Int32 userIndex, System.Boolean autoPairMissing) (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.3/InputSystem/Plugins/Users/InputUser.cs:1322)
    5. UnityEngine.InputSystem.Users.InputUser.ActivateControlSchemeInternal (System.Int32 userIndex, UnityEngine.InputSystem.InputControlScheme scheme) (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.3/InputSystem/Plugins/Users/InputUser.cs:539)
    6. UnityEngine.InputSystem.Users.InputUser.ActivateControlScheme (UnityEngine.InputSystem.InputControlScheme scheme) (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.3/InputSystem/Plugins/Users/InputUser.cs:512)
    7. UnityEngine.InputSystem.PlayerInput.OnUnpairedDeviceUsed (UnityEngine.InputSystem.InputControl control, UnityEngine.InputSystem.LowLevel.InputEventPtr eventPtr) (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.3/InputSystem/Plugins/PlayerInput/PlayerInput.cs:1587)
    8. UnityEngine.InputSystem.Users.InputUser.OnEvent (UnityEngine.InputSystem.LowLevel.InputEventPtr eventPtr, UnityEngine.InputSystem.InputDevice device) (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.3/InputSystem/Plugins/Users/InputUser.cs:1684)
    9. UnityEngine.InputSystem.InputManager.OnUpdate (UnityEngine.InputSystem.LowLevel.InputUpdateType updateType, UnityEngine.InputSystem.LowLevel.InputEventBuffer& eventBuffer) (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.3/InputSystem/InputManager.cs:2493)
    10. UnityEngine.InputSystem.LowLevel.NativeInputRuntime+<>c__DisplayClass7_0.<set_onUpdate>b__0 (UnityEngineInternal.Input.NativeInputUpdateType updateType, UnityEngineInternal.Input.NativeInputEventBuffer* eventBufferPtr) (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.3/InputSystem/NativeInputRuntime.cs:64)
    11. UnityEngine.InputSystem.LowLevel.<>c__DisplayClass7_0:<set_onUpdate>b__0(NativeInputUpdateType, NativeInputEventBuffer*)
    12. UnityEngineInternal.Input.NativeInputSystem:NotifyUpdate(NativeInputUpdateType, IntPtr) (at C:/buildslave/unity/build/Modules/Input/Private/Input.cs:120)
    13.  
    Any thoughts on what might be causing the issue?