-
Notifications
You must be signed in to change notification settings - Fork 329
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 68.14% 68.11% -0.04%
===========================================
Files 367 367
Lines 53685 53713 +28
===========================================
+ Hits 36585 36586 +1
- Misses 17100 17127 +27
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
{ | ||
try | ||
{ | ||
await Task.Delay(1); |
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.
This await Task.Delay(1) raises warning flags to me. What guarantees this is valid to execute 1 second from now?
- Why does it have to be delayed?
- It looks like this runs async but code being accessed do not seem to be thread safe?
- Is there a logical condition not based on time when this is valid to execute?
|
||
s_OnPasteCutElements.Add(this); | ||
|
||
Undo.undoRedoPerformed += CheckForInvalidControlSchemeInOneFrame; |
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.
Maybe I am misunderstanding this PR/issue so I want to check whether this problem is if you undo text editing while in text editing mode? Such editing should not have been applied yet to any serializedProperty right or am I misunderstanding this issue?
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....
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 stay open until you interact with it, once you interact it will close & no exceptions are thrown anymore.
Ticket:
https://jira.unity3d.com/browse/ISXB-1607
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
,Added
sections.Area_CanDoX
,Area_CanDoX_EvenIfYIsTheCase
,Area_WhenIDoX_AndYHappens_ThisIsTheResult
.During merge:
NEW: ___
.FIX: ___
.DOCS: ___
.CHANGE: ___
.RELEASE: 1.1.0-preview.3
.After merge: