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
- ListView fails to display items when the source list is cleared and a single element is added
- UI Toolkit ':hover' state remains active when another panel is drawn over the hovered element and Touch input is used
- Unsupported Orient modes can be selected and throw errors when using Strip VFX
- "Tab" key exits the name text field in the VFX Graph tab when renaming the Property
- Shader warnings are thrown when deleting blocks in the Ribbon VFX Graph
Resolution Note (fix version 2022.2):
Fixed in: 2022.2.0a17