Search Issue Tracker
Won't Fix
Votes
0
Found in
2021.3.39f1
2022.3.31f1
6000.0.4f1
Issue ID
UUM-72857
Regression
No
Freeze when spawning a Prefab while in Play Mode
Reproduction steps:
1. Open the attached “repro_IN-76097“ project
2. Watch the attached video for the pattern that you need to press
3. Observe a freeze
Reproducible with: 2021.3.39f1, 2022.3.31f1, 6000.0.4f1
Reproducible on: Windows 10 (22H2)
Not reproducible on: No other environments tested
Notes:
* Reproducible in Player
* When the freeze occurs, memory leak can be observed, which can cause a “Could not allocate memory: System out of memory!“ error and a crash if the PC doesn’t have a lot of RAM
* Was not able to reproduce the crash (with 64 GB of RAM)
* User was able to reproduce the crash
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
- Entities are jittering when Temporal Anti-aliasing (TAA) is applied
- The drawing order of Transparent objects is incorrect when changing the Material from Opaque to Transparent with GPU Resident Drawer enabled
- Sprite animations do not update when Animator parameters change in the Player
- [iOS] Memory increases significantly when a TMP Text component has a lot of text
- [Linux][X11] Editor Graphics API can't be set to OpenGL when running on an Nvidia Optimus laptop, prime offload enabled, and while using X11
Resolution Note:
The out of memory error is caused by the script of "WinCon.cs" entering a state where "collisionCounterCircle >= requiredCollisions" is true where two objects are instantiated. Unfortunately, "collisionCounterCircles" is never reset so this condition is true forever resulting in the continuous creation of objects until memory runs out. At some point, because physics is dealing with more and more objects it asks for more memory which is refused and triggers an out-of-memory assert.
The error here is in the script logic creating too many objects without limit.
This was quickly found by debugging the project, placing a breakpoint where instantiate happens. In the future I would recommend following the debugging guide so issues lik this can quickly be found:
https://docs.unity3d.com/Manual/ManagedCodeDebugging.html