Search Issue Tracker
By Design
Votes
0
Found in
2021.3.39f1
2022.3.33f1
6000.0.6f1
7000.0.0a1
Issue ID
UUM-73951
Regression
No
StackOverflowException is thrown when dragging the window in the Play mode while using Animator.Update
Reproduction steps:
1. Open the attached “BugRepro” project
2. Open the “Assets/Scenes/SampleScene.unity” Scene
3. Enter the Play mode
4. Drag the Console window around
5. Observe the Console window
Expected result: No errors are thrown
Actual result: “StackOverflowException: The requested operation caused a stack overflow.” is thrown
Reproducible with: 2021.3.39f1, 2022.3.33f1, 6000.0.6f1
Reproducible on: Windows 11
Not reproducible on: No other environment tested
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- "NullReferenceException" is thrown when setting a long string in TMP with "Atlas Population Mode" set to "Dynamic" and "Multi Atlas Textures" enabled
- TextMeshPro text is misaligned when alignment is set via script
- A DX11 shader error is thrown when compiling shaders for platforms without DX11 support
- Rigidbody2D.Slide correctly ignores colliders specified with "Physics2D.IgnoreCollision" however encountering them can still modify movement behaviour in subtle ways.
- [Quality Hackweek] A black separator appears when the left panel in the UI Builder tab is resized, and the tab is narrow
Resolution Note:
This is a user error.
Animator.Update triggers an update of the state machine. This, in turn will call the StateMachineBehaviour.OnUpdate callback on any state machine behaviour that is attached to the current state.
In the repro project, the StateMachineBehaviour.OnUpdate callback is calling Animator.Update, resulting in an infinite callback loop. At some point, we run out of stack space, and the StackOverflowException is thrown.
If the Animator.Update call is removed from the StateMachineBehaviour, the exception is no longer thrown.