Search Issue Tracker
By Design
Votes
0
Found in [Package]
Issue ID
1144526
Regression
No
Not all Jobs are terminated before "OnDestroy" is called
Reproduction steps:
1. Open "DidymosECS.zip" project
2. Enter and Exit Play mode
3. See errors in the Console window
Expected Result: No Errors
Actual Result: Errors
Reproduced with: 2019.2.0a11, 2019.1.0f1
Did not reproduce on: 2018.3.13f1 (Errors)
Note:
If the issue doesn't reproduce at first, repeat steps 2-3
Error:
"InvalidOperationException: The previously scheduled job NativeLRUCacheSingle`2:SetJob writes to the NativeArray SetJob.data.cache. You must call JobHandle.Complete() on the job NativeLRUCacheSingle`2:SetJob, before you can deallocate the NativeArray safely."
"A Native Collection has not been disposed, resulting in a memory leak. Enable Full StackTraces to get more details."
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
- Performance dropping when using Automatic Box Prunning or Sweep and Prune instead of Multibox Pruning Broadphase
- The Camera abruptly jumps after resuming the game when the mouse is moved slightly
- Package Manager's "Locate", "Manage", and "Open VFX Graph Samples.." buttons are not aligned when Visual Effect Graph package is installed
- [Ubuntu] Unity Version Control Setup Steps Display Cramped and Unformatted Text
- Editor hangs indefinitely when a Custom Attribute is created with a very long name in VFX Graph
Resolution Note:
The Behaviour is as expected.
If a container is owned by a MonoBehaviour and jobs from other code might write to it then there should be a JobHandle next to the container that is responsible for completing the job before the container is destroyed.
The responsibility is on the MonoBehaviour / System code that schedules the job and OnDestroy in the monobehaviour.