Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

[BUG] - Getting spammed from input system errors

Discussion in 'Input System' started by Jichaels, Jan 14, 2020.

  1. Jichaels

    Jichaels

    Joined:
    Dec 27, 2018
    Posts:
    237
    Hello,

    I'm getting spammed by a bunch of errors using URP / New input system / New XR package.
    It's been a while, but it's starting to get very annoying since there is so much Debug.Log that it almost freeze my editor...

    First error, only happens when I enter/leave playmode it seems, is :

    Code (CSharp):
    1. Usage entry is empty
    2. UnityEngine.InputSystem.LowLevel.<>c__DisplayClass7_0:<set_onUpdate>b__0(NativeInputUpdateType, NativeInputEventBuffer*)
    3. UnityEngineInternal.Input.NativeInputSystem:NotifyUpdate(NativeInputUpdateType, IntPtr)
    And the one that are getting SPAMMED on play mode (there is a pattern of 5 errors in order) :

    1 :
    Code (CSharp):
    1. Map index out of range
    2. UnityEngine.InputSystem.LowLevel.<>c__DisplayClass7_0:<set_onUpdate>b__0(NativeInputUpdateType, NativeInputEventBuffer*)
    3. UnityEngineInternal.Input.NativeInputSystem:NotifyUpdate(NativeInputUpdateType, IntPtr)
    2 :
    Code (CSharp):
    1. Control index out of range
    2. UnityEngine.InputSystem.LowLevel.<>c__DisplayClass7_0:<set_onUpdate>b__0(NativeInputUpdateType, NativeInputEventBuffer*)
    3. UnityEngineInternal.Input.NativeInputSystem:NotifyUpdate(NativeInputUpdateType, IntPtr)
    3 :
    Code (CSharp):
    1. Binding index out of range
    2. UnityEngine.InputSystem.LowLevel.<>c__DisplayClass7_0:<set_onUpdate>b__0(NativeInputUpdateType, NativeInputEventBuffer*)
    3. UnityEngineInternal.Input.NativeInputSystem:NotifyUpdate(NativeInputUpdateType, IntPtr)
    4 :
    Code (CSharp):
    1. Exception 'NullReferenceException' thrown from state change monitor 'InputActionState' on 'Vector2:/OculusTouchControllerRight/thumbstick'
    2. UnityEngine.InputSystem.LowLevel.<>c__DisplayClass7_0:<set_onUpdate>b__0(NativeInputUpdateType, NativeInputEventBuffer*)
    3. UnityEngineInternal.Input.NativeInputSystem:NotifyUpdate(NativeInputUpdateType, IntPtr)
    5 :
    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. UnityEngine.InputSystem.InputActionState+BindingState.get_actionIndex () (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.3/InputSystem/Actions/InputActionState.cs:2296)
    3. UnityEngine.InputSystem.InputActionState.ProcessControlStateChange (System.Int32 mapIndex, System.Int32 controlIndex, System.Int32 bindingIndex, System.Double time, UnityEngine.InputSystem.LowLevel.InputEventPtr eventPtr) (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.3/InputSystem/Actions/InputActionState.cs:834)
    4. UnityEngine.InputSystem.InputActionState.UnityEngine.InputSystem.LowLevel.IInputStateChangeMonitor.NotifyControlStateChanged (UnityEngine.InputSystem.InputControl control, System.Double time, UnityEngine.InputSystem.LowLevel.InputEventPtr eventPtr, System.Int64 mapControlAndBindingIndex) (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.3/InputSystem/Actions/InputActionState.cs:779)
    5. UnityEngine.InputSystem.InputManager.FireStateChangeNotifications (System.Int32 deviceIndex, System.Double internalTime, UnityEngine.InputSystem.LowLevel.InputEvent* eventPtr) (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.3/InputSystem/InputManager.cs:2769)
    6. UnityEngine.InputSystem.LowLevel.<>c__DisplayClass7_0:<set_onUpdate>b__0(NativeInputUpdateType, NativeInputEventBuffer*)
    7. UnityEngineInternal.Input.NativeInputSystem:NotifyUpdate(NativeInputUpdateType, IntPtr)

    On error 4, it triggers on almost every XR action set in my input asset, ANd action that are used in the TrackedPoseDriver (new input system).

    Everything still works, but that amount of error just clugs the editor and make everything ultra slow.

    Anyone experienced this aswell ?

    @Rene-Damm If you have any clue, that would be really cool
     
    Aldeminor and ROBYER1 like this.
  2. Rene-Damm

    Rene-Damm

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    @Jichaels Could you file a bug with the Unity bug reporter? Would like to take a look at this in action. Sounds like something is getting quite screwed up there.
     
  3. Jichaels

    Jichaels

    Joined:
    Dec 27, 2018
    Posts:
    237
    ROBYER1 likes this.
  4. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,455
    Same issue here, its unusable for XR because of this
     
  5. Extrys

    Extrys

    Joined:
    Oct 25, 2017
    Posts:
    345
    Same here upload_2020-2-27_23-20-36.png

    Just create some Actions in a MonoBehaviour and just enabling them
    they will give those errors on reloading scene in runtime, also Disposing doesnt works
     
  6. tatelax

    tatelax

    Joined:
    Feb 4, 2010
    Posts:
    1,168
    Still happening when I have a PlayerInput component on a GameObject in my scene. I can't exactly upload our entire game to the Unity bug reporter but I can show screenshots.

    I'm using the Rebind Action UI script from the Input System samples. I think the issue might be that it does not work with PlayerInput.cs
     
    Last edited: Jul 16, 2021
  7. AshishNikhil

    AshishNikhil

    Joined:
    Nov 4, 2020
    Posts:
    2
    Could you please help me out for


    NullReferenceException while executing 'performed' callbacks of 'Player/Attack[/Gamepad/rightShoulder]'
    UnityEngine.InputSystem.LowLevel.<>c__DisplayClass7_0:<set_onUpdate>b__0(NativeInputUpdateType, NativeInputEventBuffer*)
    UnityEngineInternal.Input.NativeInputSystem:NotifyUpdate(NativeInputUpdateType, IntPtr)
     
  8. RazT

    RazT

    Joined:
    Feb 7, 2019
    Posts:
    15
    Same here with the issue using Valv eIndex controllers. get similar errors
     
  9. paradizIsCool

    paradizIsCool

    Joined:
    Jul 10, 2014
    Posts:
    178
  10. iconomy

    iconomy

    Joined:
    Oct 16, 2019
    Posts:
    1
    Hi, did you fid a fix for this?
     
  11. paradizIsCool

    paradizIsCool

    Joined:
    Jul 10, 2014
    Posts:
    178
    Still not fixed on our side, unity closes my bug with unable to reproduce.
    I'm not able to reproduce either, but it still happens on very few devices with a very low probability.
     
  12. Azazello2020

    Azazello2020

    Joined:
    Mar 22, 2020
    Posts:
    12
    repeats after pressing again

    (UnityEngine.InputSystem.LowLevel.InputUpdateType,UnityEngine.InputSystem.LowLevel.InputEventBuffer&) (at Library/PackageCache/com.unity.inputsystem@1.3.0/InputSystem/InputManager.cs:3363)
    UnityEngine.InputSystem.LowLevel.NativeInputRuntime/<>c__DisplayClass7_0:<set_onUpdate>b__0 (UnityEngineInternal.Input.NativeInputUpdateType,UnityEngineInternal.Input.NativeInputEventBuffer*) (at Library/PackageCache/com.unity.inputsystem@1.3.0/InputSystem/NativeInputRuntime.cs:65)
    UnityEngineInternal.Input.NativeInputSystem:NotifyUpdate (UnityEngineInternal.Input.NativeInputUpdateType,intptr)
     
  13. Wolfos

    Wolfos

    Joined:
    Mar 17, 2011
    Posts:
    954
    I also got a whole bunch of these. Seems to be fixed after checking "generate C# class", then apply, and then reverting that same process.
    I think it was related to me deleting an action.
     
    Last edited: Apr 13, 2023
  14. kenzen0

    kenzen0

    Joined:
    Sep 17, 2018
    Posts:
    16
    What are you doing?
    It has been two years already, why have you not replied?
    Please tell me what is going on with this problem!!!!
     
    paradizIsCool likes this.
  15. keerthikamath

    keerthikamath

    Joined:
    Aug 23, 2022
    Posts:
    1
  16. skGameDevv

    skGameDevv

    Joined:
    Aug 3, 2020
    Posts:
    1
    Happened to me
    Idk how to stop it
    this is so unprofessional from unity. its been over 2 years
     
    Aldeminor likes this.
  17. michaeljeffersonlee

    michaeljeffersonlee

    Joined:
    Dec 6, 2021
    Posts:
    1
    This issue is still not addressed :mad:
     
    Aldeminor and TriCenaTop like this.
  18. handfoamsanitiser

    handfoamsanitiser

    Joined:
    Sep 26, 2021
    Posts:
    1
    I was getting input system errors when I loaded another scene, and it took me several months to figure out how to prevent them.

    Basically, when you subscribe functions to an input action like this, it gives you errors when you reload the scene:
    Code (CSharp):
    1. _playerInputActions.Player.Enable();
    2. _playerInputActions.Player.Jump.performed += Jump;
    To fix this, you have to unsubscribe from the actions and disable the input in the OnDestroy function:
    Code (CSharp):
    1. void OnDestroy()
    2. {
    3.     _playerInputActions.Player.Jump.performed -= Jump;
    4.     _playerInputActions.Player.Disable();
    5. }
     
    Last edited: Aug 2, 2023
  19. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    2,059
    L
    to be honest I thought it was well documented as it's something ive seen on all the new input info ive seen.
     
  20. beevik_

    beevik_

    Joined:
    Sep 27, 2020
    Posts:
    107
    Sorry for the necro-post, but I just encountered this assertion as well, and it was caused by registering for a NavigationCancelEvent callback when I also had an InputAction performed callback for the same key binding.

    Perhaps this information might be useful to someone else encountering this problem.
     
  21. gabrieloc

    gabrieloc

    Joined:
    Apr 6, 2014
    Posts:
    53
    This package is driving me insane and I'm worried I'm too far invested to be able to migrate off it.

    I started getting tons of exceptions from inside the library when connecting and disconnecting gamepads. Now with just keyboard and mouse I reliably get exceptions spamming my console after a domain reload and no input is recognized until I restart Unity.

    Code (CSharp):
    1. ArgumentNullException: Value cannot be null.
    2. Parameter name: source
    3. System.Linq.Enumerable.Contains[TSource] (System.Collections.Generic.IEnumerable`1[T] source, TSource value, System.Collections.Generic.IEqualityComparer`1[T] comparer) (at <da2c421c5cee4c5abffcb37d07c3a87c>:0)
    4. System.Linq.Enumerable.Contains[TSource] (System.Collections.Generic.IEnumerable`1[T] source, TSource value) (at <da2c421c5cee4c5abffcb37d07c3a87c>:0)
    5. UnityEngine.InputSystem.InputActionState.FetchActionState (UnityEngine.InputSystem.InputAction action) (at ./Library/PackageCache/com.unity.inputsystem@1.8.2/InputSystem/Actions/InputActionState.cs:892)
    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. UnityEngine.InputSystem.InputActionState+TriggerState.get_pressedInUpdate () (at ./Library/PackageCache/com.unity.inputsystem@1.8.2/InputSystem/Actions/InputActionState.cs:3791)
    3. UnityEngine.InputSystem.InputAction.WasPressedThisFrame () (at ./Library/PackageCache/com.unity.inputsystem@1.8.2/InputSystem/Actions/InputAction.cs:1239)
    4. UnityEngine.InputSystem.UI.InputSystemUIInputModule.ProcessNavigation (UnityEngine.InputSystem.UI.NavigationModel& navigationState) (at ./Library/PackageCache/com.unity.inputsystem@1.8.2/InputSystem/Plugins/UI/InputSystemUIInputModule.cs:701)
    5. UnityEngine.InputSystem.UI.InputSystemUIInputModule.Process () (at ./Library/PackageCache/com.unity.inputsystem@1.8.2/InputSystem/Plugins/UI/InputSystemUIInputModule.cs:2168)
    6. UnityEngine.EventSystems.EventSystem.Update () (at ./Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/EventSystem.cs:530)
    This has got to be without a doubt one of the most frustrating packages in the unity ecosystem. Even if this is developer error, there's nothing actionable here.