-
Notifications
You must be signed in to change notification settings - Fork 331
FIX: out of range exception when pressing undo after creating and editing a new control scheme (ISXB-1607) #2237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
…ed by Undoing the creation of it via ctrl+z.
Codecov ReportAttention: Patch coverage is @@ Coverage Diff @@
## develop #2237 +/- ##
===========================================
- Coverage 77.95% 76.88% -1.07%
===========================================
Files 477 477
Lines 97416 93730 -3686
===========================================
- Hits 75943 72068 -3875
- Misses 21473 21662 +189 Flags with carried forward coverage won't be shown. Click here to find out more.
... and 15 files with indirect coverage changes 🚀 New features to boost your workflow:
|
...ges/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/InputActionsEditorView.cs
Outdated
Show resolved
Hide resolved
...ges/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/InputActionsEditorView.cs
Outdated
Show resolved
Hide resolved
ekcoh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mainly asking question at this point since I am not sure I understand this fix or problem yet....
…editing-new-controlscheme
ekcoh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for looking into this Darren, not sure I fully understand the fix but it seems legit. Since the editor is something where we do not have the greatest coverage, do you think it would be feasible to auto-test this regression somehow? If not or unfeasible I think it can land as-is with manual testing.
…editing-new-controlscheme
|
Merged develop into this branch to get critical CI fix from #2260. Hope this doesn't caused any inconvenience for you. |
…editing-new-controlscheme
…editing-new-controlscheme
|
@ekcoh I tried adding a test for this like discussed in standup but ran into issues with the advanced dropdown not using UIToolkit causing issues. |
…editing-new-controlscheme
Description
You could cause multiple null or out of range exceptions if you press undo while editing a control scheme.
This is caused by undo causing the control scheme to be removed while you still have the edit window open.
Now the edit window will close immediately if you press undo while it's open.
Ticket:
https://jira.unity3d.com/browse/ISXB-1607
Video of fix (Usually undoing when editing the new control scheme would throw an exception / it could also cause other exceptions if the window was left open, therefore I now close it when this happens to avoid future issues):
Screen.Recording.2025-10-07.at.15.06.14.mov
Testing status & QA
Tested manually all the cases I could find until all exceptions were gone. There was multiple paths to create exceptions due to the asset being removed via undo.
Overall Product Risks
Please rate the potential complexity and halo effect from low to high for the reviewers. Note down potential risks to specific Editor branches if any.
Comments to reviewers
Please describe any additional information such as what to focus on, or historical info for the reviewers.
Checklist
Before review:
Changed,Fixed,Addedsections.Area_CanDoX,Area_CanDoX_EvenIfYIsTheCase,Area_WhenIDoX_AndYHappens_ThisIsTheResult.During merge:
NEW: ___.FIX: ___.DOCS: ___.CHANGE: ___.RELEASE: 1.1.0-preview.3.After merge: