Search Issue Tracker
Editor and crash reporter both hang upon stack overflow in recursive component script with logging
Editor and crash reporter both hang upon stack overflow in recursive component script
When adding a recursive function which may result in a stack overflow to a component script, the Unity Editor and Crash Reporter will both hang indefinitely. No error is provided and the user will need to kill both processes to recover. This can be reproduced with the following component script:
public class RecursiveComponent : MonoBehaviour
int Overflow(int start)
return start + Overflow(start);
Steps to reproduce:
- Create a new Unity Project and paste and attach the above script to any object in a scene
- Enter Play Mode
- Observe the editor will hang
- Observe the crash reporter process will also hang
UPDATE: If the logging is removed, Unity appears to then sometimes catch the stack overflow. With logs in place it fails to catch and will hang.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- Reflection probe bounces don't work when Rendering Path is set to 'Deferred'
- Organizations are not displayed in the Services window
- Shader effect with specific view disappears when multiple materials in scene are present
- [Wild Crash] Editor crashes on mono_aot_get_cached_class_info when GizmoSetup has cached an outdated data
- [IMGUI] None,ScriptOnly and Full properties of stack trace are misaligned