Search Issue Tracker
Third Party Issue
Votes
4
Found in
2021.3.34f1
2022.3.17f1
2023.2.6f1
2023.3.0b3
Issue ID
UUM-60503
Regression
No
The Editor freezes on GizmoManager.DrawGizmos Unity's code execution when opening a project
Reproduction steps:
1. Open the attached “repro-project“
2. Observe the Editor freezing on GizmoManager.DrawGizmos Unity’s code execution
Reproducible with: 2021.3.34f1, 2022.3.17f1, 2023.2.6f1, 2023.3.0b3
Reproduced on: Windows 10
Not reproducible on: No other environment tested
Notes:
1. The user reported the freeze eventually leading to a crash with the following error:
”[Assets/Generated/QueenTouchPoints.cs line 40]
GUI Window tried to begin rendering while something else had not finished rendering! Either you have a recursive OnGUI rendering, or the previous OnGUI did not clean up properly.
Crash!!!”
2. The freeze is no longer reproducible after removing the script mentioned in the error
3. In the script OnDrawGizmos() method is being called inside the Update() method, which might be causing recursive OnGUI rendering issues and contributing to the freeze and crash
First few lines of the stack trace:
0x00007FF6A2AEB9E5 (Unity) AddPrimitivesImpl
0x00007FF6A2ADAEBC (Unity) DrawLine
0x00007FF6A0EFD923 (Unity) Gizmos_CUSTOM_DrawLine_Injected
0x0000022DE9C33F55 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.Gizmos:DrawLine_Injected (UnityEngine.Vector3&,UnityEngine.Vector3&)
0x0000022DE9C33E7B (Mono JIT Code) UnityEngine.Gizmos:DrawLine (UnityEngine.Vector3,UnityEngine.Vector3)
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
- Unity CIL Linker fails on Player build when persistent listeners have "<" and ">" in their XML attribute names
- ”Lighting data asset ‘LightingData’ is incompatible with the current Unity version…” warnings are thrown when saving Indoors (URP) and Outdoors (URP) Scenes as Scene Templates
- [iOS] The screen blinks when transitioning from custom to Unity splash screen
- [macOS] ”Ignoring depth surface load action as it is memoryless” warnings are thrown when taking Game View Snapshot
- UI Builder Inspector scrolls back up when changes on an expanded but not fully displayed Inspector tab are saved
Resolution Note:
The issue is not a problem on the editor side, rather the user code responsible for drawing gizmos is an infinite loop.
QueenTouchPoints.DrawRaycasts has a for loop that iterates from startAngle to endAngle with a step value. All of the parameters being passed into this function are 0, resulting in the loop endlessly running.