Search Issue Tracker

Fixed in 1.1.0-preview.1

Votes

1

Found in [Package]

1.0.0-preview

Issue ID

1232893

Regression

Yes

[InputSystem] SwitchCurrentActionMap() causes a StackOverflow when called by each phase of an Action

Package: Input System

-

How to reproduce:
1. Open the attached "1232893 repro" project
2. Open the "SampleScene" Scene from the Assets folder
3. Enter Play Mode
4. Press the 'B' key on the keyboard

Expected result: the Action Map Switches ignoring the additional unnecessary calls
Actual result: the Editor freezes and then generates a StackOverflowException

Reproducible with: 1.0.0-preview (2019.4.0f1, 2020.1.0b11, 2020.2.0a13), 1.0.0 (2019.3.16f1, 2020.1.0b11, 2020.2.0a13)
Not reproducible with: 0.2.10-preview (2020.1.0b11), 0.9.6-preview (2020.1.0b11)

Notes:
-Very rarely (5-10% of the time) the Editor closes without the crash window
-In the built version of the project the game always crashed after calling the SwitchCurrentActionMap()
-When using PressOnly Interaction on the Action Unity only generates an IndexOutOfRangeException and not a StackOverflow
-This only reproduces if an existing Action Map is being declared in the SwitchCurrentActionMap() method. If an invalid one is declared, an error is thrown and performance isn't affected
-On 2019.3 and 2019.4 streams the errors and warning are being thrown constantly, while on 2020.1 and 2020.2 streams a single batch of errors is thrown to warn about the StackOverflow

  1. Resolution Note (fix version 1.1.0-preview.1):

    Fixed in Input System 1.1.0-preview.1 and above, available in 2019.4.0f1 and above

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.