Search Issue Tracker
Fixed in 2019.3.X
RenderTarget Release create garbage on MacOS
Step to reproduce:
- Create a new project.
- Add the provided MinimalRenderer.cs into an Editor folder of your project.
- Open Debug > Small Rendering Window.
- Resize the Minimal Renderer window.
What should be expected:
- No memory leak should occurs while releasing RenderTexture (either on Profiler or on MacOS's Activity Monitor)
What can be seen:
- On MacOS's Activity Monitor, the memory increase each time we resize the window
- In the script, resizing the window call Release() and Create() with a change of size.
- In the script you can change tops define to swap between SceneView way to handle resize and full destruction and recreation. Both create the leak on MacOS.
- On Windows, this create no leaks either we fully destroy or go as in SceneView
- Using htop also show a memory leak.
- The fact that Profiler cannot be able to show the leak is reported on this FB https://fogbugz.unity3d.com/f/cases/1169950/
- Seen in 2019.3.0a10, dunno for version before.
- When memory is full, MacOS kill Unity that leads to data loss.
Reproducible in: 2019.3.0a10 (memory keeps going up and up)
Not reproducible with: 2019.3.0a9 (this version goes up to 2GB but will go down to around 800 - 900MB)
Not reproducible with: 2019.3.0a8 (this version goes up to 2GB but will go down to around 700 - 800MB)
Not reproducible with: 2019.3.0a4, 2019.2.0b10 (these versions stay at around 600-700MB)
Reproducible with: Mac Metal
Not reproducible with: Win DX11, Mac GLCore
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- Build fails when building with ILCPP Scripting Backend and ARMv7 as the Target Architecture
- Textures turn black in Player when they are referenced by a script instance
- [Android] Virtual device crashes with "Scudo ERROR: invalid chunk state when deallocating address" error in Firebase Test Lab when Optimized Frame Pacing is enabled
- Particle System does not resume when its Culling Mode is set to "Pause" or "Pause and Catch-up," and particle position simulate in world space
- "Custom Render Queue" field cannot be set above "2000" when changing it in the Inspector window using Debug mode