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
- "Draw Additional Lights Shadowmap" calls increase when custom MaterialBlockProperty is used
- Crash on _platform_memmove when importing the "Dragon Crashers - URP 2D Sample Project" to a new 2D project
- "Shader is not supported on this GPU" warnings and and shaders are not loading when building the project for non-Chromium browsers
- [iOS][URP] The screen flickers and the "Execution of the command buffer was aborted due to an error during execution" error is thrown continuously
- Shortcut Manager shows empty conflict filter when resolving runtime conflicts involving different contexts
Resolution Note (fix version 2022.2):
Fixed in: 2022.2.0a17