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
- Inspector's custom tooltip is displayed incorrectly when the name is truncated in UI toolkit
- Crash on ScriptableRenderLoopDraw when rendering a specific VFX in Play Mode
- The script is not renamed in the Project window when renaming and a compilation Error is present
- Average FPS in Play Mode degradation on a newly created BiRP project when it's upgraded from 2020.3.48f1 to a newer Editor version
- DecoratorDrawer indentation is incorrect when it is called with EditorGUI
Resolution Note:
There are no fixes planned for this Bug