Search Issue Tracker
Duplicate
Votes
0
Found in
4.6.0b12
Issue ID
620604
Regression
No
Adding a script which adds itself to the object in OnAwake recursively, causes a crash in Windows
To Repro:
1. Run scene 'test', if you’re on windows Unity should crash, if you’re using OSX ‘StackOverflow’ exception should be thrown.
2. This is caused by the ‘Test.cs’ script which tries to add a new copy of itself to the GameObject recursively.
3. When running this script on OSX, one or more ‘StackOverflow’ exceptions are thrown, even though new duplicates of the script component continue to be add to the object, until (probably) the editor runs out of memory. Editor just crashes in Windows.
4. If in ‘test.cs’ the ‘Awake’ is changed to ‘Start’ the error is no longer thrown and the Editor no longer crashes on Windows, the script continues to be added infinitely, though. The same error should probably be thrown when using ‘Start’ aswell. But the script should be prevented from executing when the error is thrown for it to have any purpose.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Streaming is misspelled as "Steaming" in "Enable GPU Streaming" and "Enable Disk Streaming" tooltpis
- "IndexOutOfRangeException" thrown when moving caret left at start of TMP Input Field with rich text
- UIElements memory allocations grow when interacting with IMGUI custom Editor window
- AI Navigation Preferences are not indexed for Search and cannot be found when searching for them in the Preferences Search field
- Sprite with normal map is lit incorrectly when GameObject is rotated 180 degrees on Y axis or Z Scale is set to "-1"
Add comment