Search Issue Tracker

Fixed in 1.1.0-preview.2

Votes

7

Found in [Package]

1.0.0-preview.7

Issue ID

1245921

Regression

Yes

[Input System] NullReferenceException is thrown when "Player Input" component "Create Action" is pressed and saved

Package: Input System

-

How to reproduce:
1. Open attached project "new_proj.zip" and scene "SampleScene"
2. In Hierarchy window, select Packman object
3. In Inspector window, Player Input -> press Create Actions...
4. In "Create Input Actions Asset" screen, give asset any name and click save
5. Observe Console and Inspector window

Expected result: no errors are thrown. Player Input component has all the fields set
Actual result: "NullReferenceException: SerializedObject of SerializedProperty has been Disposed." is thrown. Player Input component remains with empty fields

Reproducible with: 2019.3.14f1, 2020.1.0b9, 2020.2.0a11 (1.0.0-preview.7, 1.0.0)
Not reproducible with: 2019.3.14f1, 2020.1.0b9, 2020.2.0a11 (1.0.0-preview.3, 1.0.0-preview.6)
Could not test with: 2018.4 (package was not yet released)

Comments (4)

  1. tristanlbailey

    Feb 05, 2021 04:13

    I have found that this happens after clicking on the "Create Actions..." button, and saving a new inputactions file. The workaround is to simply click on the target button next to the Actions field on the component, and set it to the new inputactions file that you just created. You can then continue setting additional properties in the component as required.

  2. DemiKnight39

    Jan 26, 2021 12:00

    I might have a solution/work around for this error. I'm running 2020.2.2f1 with Input System 1.0.2. After creating the actions by clicking "Create Actions..." inside of a player input component, we are going to manually make a copy of it (copy/paste or duplicating does not work). To do this just navigate to the project tab and in whatever folder right click, create, and then input actions. This method creates a completely blank input actions file. Double click the file and it will open the input actions window.
    In this window you can set up the inputs exactly like the inputs you made when you clicked the "Create Actions..." button inside the player input component.
    To do this, open the input action window for the first input actions you created and use it as a reference. In the second input actions you created you need to add control schemes by selecting the drop down menu in the top left corner. Make sure the control schemes that you make are the same as the ones from the first input actions. After your input schemes have been added just copy and paste the actions from the first one over to the new one. Close the first input actions window and delete its file. Now save the second input actions and it will not generate any errors. I hope I explained this clearly so that it was easy to follow and helped anybody that had this error.

  3. relser99

    Aug 19, 2020 14:19

    I hope this is fixed soon, Input System is awesome but this issue renders it completely unusable from the Editor even in 2019.4 LTS. It still works if you only interact with it in code, but for my simpler projects that makes it more trouble than it's worth.

  4. apyoung88

    Aug 15, 2020 15:05

    Commenting to follow this issue

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.