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
- GPU utilization increases by 20% on Meta Quest headsets when Render Graph is enabled on 6000.0.16f1 and higher
- Value on Slider (Int) control in UI Builder displays as default when saving UI Document
- Color mismatch in UI Builders Library panel when the Editors theme is set to Light Mode
- [Android ] "AndroidJNI.ToBooleanArray" returns a random non-zero value instead of "IntPtr.Zero" when the method argument is null
- Non-HDR color picker opens when selecting material color with HDR enabled
Resolution Note:
There are no fixes planned for this Bug