Search Issue Tracker
Fixed in 2022.2.X
Duplicate in 2020.3.X, 2021.3.X
Votes
0
Found in
2021.2.0a18
2021.3
2022.1
2022.2
Issue ID
1418412
Regression
Yes
Garbage is allocated when GraphicsBuffers constructor and other APIs that returns GraphicsBuffers are called
Reproduction:
1. Open the attached project "MinimalRepro-1418412.zip"
2. Open Assets/Scenes/TestMeshGetVertexBufferDoesNotAllocateMemory.unity
3. Open Window > Analysis > Profiler
4. In the Profiler window ensure that the "record" icon is red and the mode dropdown shows "Play Mode"
5. Enter Play Mode
6. Go to the Profiler window and click the CPU Usage graph
7. In the detailed view navigate to PlayerLoop > Update.ScriptRunBehaviorUpdate > BehaviorUpdate > ProfilerMarkersForCreatingGraphicsBuffer.Update() [Invoke] > Repro > Allocation
8. Observe the GC.Alloc
Expected result: < 50 B of garbage is allocated
Actual result: > 330 B of garbage is allocated
Reproducible with: 2021.2.0a18, 2021.3.4f1, 2022.1.6f1, 2022.2.0a16
Not reproducible with: 2020.3.36f1, 2021.2.0a17
Couldn't test with: 2019.4.39f1 (Couldn't resolve console errors)
Reproducible on: Windows 10
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
- Editor is non-responsive and flickers when multiple Water System instances are enabled
- Texture2D.PackTextures causes mips 7-9 to turn pink when packed textures are of ASTC 4x4 compression
- "OnApplicationQuit" is called when "Application.wantsToQuit" returns false
- Console search fails to find log messages when log messages contain <B></B> tags
- Crash on Object::SetCachedScriptingObject when opening the project
Resolution Note (fix version 2022.2):
Fixed in: 2022.2.0a17