Search Issue Tracker
Won't Fix
Votes
0
Found in [Package]
1.4.0 - Collections
Issue ID
ECSB-401
Regression
No
NativeList with WriteOnly Attribute causes a memory leak when exiting Play Mode
How to reproduce:
1. Open the “MeshBreaker“ project
2. Open the “SampleScene”
3. Enter Play mode then exit Play mode and observe the Console
Expected result: “System::InvalidOperationException” and “ObjectDisposedException” errors are thrown
Actual result: “System::InvalidOperationException”, “ObjectDisposedException”, “A Native Collection has not been disposed, resulting in a memory leak” error is thrown
Reproduced with: 0.17.0-preview.18 (2022.3.1f1), 1.4.0 (2021.3.27f1, 2022.3.1f1, 2023.1.0b20, 2023.2.0a18)
Not reproduced with: 2.1.4 (2022.3.1f1, 2023.1.0b20, 2023.2.0a18)
Could not test with: 0.17.0-preview.18 (2021.3.27f1, 2023.1.0b20, 2023.2.0a18), 2.1.0-exp.4, 2.1.4 (2021.3.27f1) (Package not supported)
Fixed in: 2.1.0-exp.4 (2022.3.1f1, 2023.1.0b20, 2023.2.0a18)
Reproduced on: Windows 10 (by reporter), Windows 11
Error thrown to the Console:
{noformat}A Native Collection has not been disposed, resulting in a memory leak. Enable Full StackTraces to get more details. Leak tracking may be enabled via `Unity.Collections.NativeLeakDetection.Mode` or from the editor preferences menu Edit > Preferences > Jobs > Leak Detection Level.{noformat}
Note: “System::InvalidOperationException” and “ObjectDisposedException” errors are expected since a Burst Job is trying to access a ReadOnly NativeList
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
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
Resolution Note:
There are no fixes planned for this Bug