Search Unity

Bug "Control start index out of range on composite" error on diagonal inputs

Discussion in 'Input System' started by tetriser016, Nov 12, 2020.

  1. tetriser016

    tetriser016

    Joined:
    Jan 3, 2014
    Posts:
    100
    I have no idea what's wrong (got this error since 2020.1.11f), every time I start diagonal inputs (like pressing up while holding right), the editor sends this error.

    upload_2020-11-12_15-53-47.png

    This is how I configured my custom actions, I'm pretty sure this supposed to be correct:

    upload_2020-11-12_15-54-37.png

    upload_2020-11-12_15-55-16.png
     
  2. Rene-Damm

    Rene-Damm

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    Is this with 1.1-preview.2? If so, would you mind filing a ticket with the Unity bug reporter? ("Help >> Report a Bug..." in the editor's main menu)
     
  3. tetriser016

    tetriser016

    Joined:
    Jan 3, 2014
    Posts:
    100
    Ah, I'll try updating to that version, I'm currently on 1.0
     
  4. tetriser016

    tetriser016

    Joined:
    Jan 3, 2014
    Posts:
    100
    Updated and I still got the error, I'll try sending the report
     
  5. Rene-Damm

    Rene-Damm

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    Thank you :)
     
  6. FranFndz

    FranFndz

    Joined:
    Sep 20, 2018
    Posts:
    178
    Same error, diagonal input and;

    Control start index out of range on composite
    UnityEngine.InputSystem.LowLevel.<>c__DisplayClass7_0:<set_onUpdate>b__0(NativeInputUpdateType, NativeInputEventBuffer*)
    UnityEngineInternal.Input.NativeInputSystem:NotifyUpdate(NativeInputUpdateType, IntPtr)
     
  7. effieartoria

    effieartoria

    Joined:
    Apr 12, 2020
    Posts:
    3
    I encountered the same error under a specific circumstance, maybe this will help diagnose it- when moving diagonally using the keyboard *with no gamepad plugged in*, I get the exception. With a gamepad plugged in, it's fine.
     
  8. DeadlyArtist

    DeadlyArtist

    Joined:
    Oct 19, 2018
    Posts:
    9
    I got the same error (2020.2.1f1) and it happens every time I press 3 buttons of a composite at once. like w + a + d (results in error). it has weird patterns. e.g. while holding 4 buttons, whenever you remove one, add one, remove another, add it back it doesnt give an error. while holding 3 buttons including w, removing w, adding it back, and removing it again only sometimes gives an error. while holding 3 buttons including a, removing a and adding it back and removing it again always gives an error.

    Also it stopped happening after a unity restart.
     
    Last edited: Jan 29, 2021
  9. mahdi_jeddi

    mahdi_jeddi

    Joined:
    Jul 18, 2016
    Posts:
    246
    I'm experiencing this too, and restarting the Unity or detaching the gamepad doesn't fix it. I filed a bug report, Case 1327221.
     
  10. InnerCoder

    InnerCoder

    Joined:
    Nov 16, 2020
    Posts:
    15
    Hi,
    I have the same problem with Inputsystem 1.0.2 with Unity 2019.4.18f. With Gamepad connected, there is no error. The error is triggered when 2 keys are used and at least 1 is released. I use an AZERTY keyboard. Here are the specific settings :

    upload_2021-4-9_10-44-32.png

    I made some tests. I give you the results here for all purposes.

    Test 1:
    1. press Z,
    2. press D,
    3. release Z or D,
    4. -> no error.

    Test 2:
    1. press D,
    2. press Z,
    3. release Z or D,
    4. -> error: "Control start index out of range on composite".

    Test 3:
    1. press Z,
    2. press Q,
    3. release Q or Z,
    4. -> no error.

    Test 4:
    1. press Q,
    2. press Z,
    3. release Q or Z,
    4. -> error: "Control start index out of range on composite".

    Test 5:
    1. press S,
    2. press D,
    3. release S or D,
    4. -> error: "Control start index out of range on composite".

    Test 6:
    1. press D,
    2. press S,
    3. release S or D,
    4. -> error: "Control start index out of range on composite".

    Test 7:
    1. press S,
    2. press Q,
    3. release S or Q,
    4. -> no error.

    Test 8:
    1. press Q,
    2. press S,
    3. release S or Q,
    4. -> no error.
     
    Last edited: Apr 9, 2021
  11. Brouilles

    Brouilles

    Joined:
    Apr 14, 2019
    Posts:
    5
  12. ethanjc33

    ethanjc33

    Joined:
    Oct 27, 2018
    Posts:
    1
    For what it's worth, I've been getting what I think to be this same bug too - control index out of range. Using the new Input System (1.0.2). My experience was that when trying to pause the game, I would disable all actions in my action map, except for my Pause() action. The trouble came when trying to unpause, I use the same Pause() action and check if the game is paused or not. Since I had just paused, my idea was to disable all controls then enable my action map again, what I would assume would reset my controls back to normal. This wasn't the case; while the action map controls did return (I could move about, interact, open menus) - the pause action wouldn't trigger. Then after stopping play mode in the editor, I would see the error appear "control index out of range."

    tl;dr: Point being, I think I receive this error whenever I am selectively enabling and disabling specific actions or toggling maps with some enabled, some disabled actions. Maybe someone here is having the same problem, as it's the first search engine result.

    My solution: I ended up disabling every specific action in my action map except for Pause(), then when I unpause I once again go through every specific action in my action map, this time enabling all of them except for Pause(). Now everything works as it should, and I don't receive the error anymore. I couldn't begin to say whether or not this is the solution for everybody, but what worked for me may work for you for the interim until this is solved proper.
     
  13. PixelFireXY

    PixelFireXY

    Joined:
    Nov 2, 2011
    Posts:
    56
  14. Nietscape

    Nietscape

    Joined:
    Nov 25, 2019
    Posts:
    1
    Necro but this is top google search for this issue.

    You need to make a separate control scheme for alternate keyboard controls. Having two different Vector2 axes (i.e. both WASD and arrow keys) mapped under a single control scheme will cause this error.

    Just make a separate control scheme with the alternate controls you want and Unity's built-in control switching will deal with the rest.