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)