Search Issue Tracker

Not Reproducible

Votes

0

Found in

2018.1.0b2

Issue ID

986861

Regression

No

[Job System] Unity crashes when deallocating Job data prior to calling JobHandle.Complete()

Scripting

-

Steps to reproduce:
1. Open attached project
2. Open Scene "scene"
3. Enter Play mode
4. Wait for a few seconds

Expected result: an error appears, but Unity does not crash
Actual result: an error about InvalidOperationException appears in the console, Unity crashes

The following error appears in the Console:
InvalidOperationException: The previously scheduled job NewBehaviourScript:ParallelSumJob reads from the NativeArray ParallelSumJob.lhs. You must call JobHandle.Complete() on the job NewBehaviourScript:ParallelSumJob, before you can deallocate the NativeArray safely.
Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle.CheckDeallocateAndThrow (Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle handle) <0x143644e60 + 0x00052> in <a202deeee37a4aadb0e7bbe523679e5d>:0
Unity.Collections.LowLevel.Unsafe.DisposeSentinel.Dispose (Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle safety, Unity.Collections.LowLevel.Unsafe.DisposeSentinel& sentinel) (at /Users/builduser/buildslave/unity/build/Runtime/Export/NativeArray/DisposeSentinel.cs:44)
Unity.Collections.NativeArray`1[T].Dispose () (at /Users/builduser/buildslave/unity/build/Runtime/Export/NativeArray/NativeArray.cs:133)
NewBehaviourScript.Start () (at Assets/NewBehaviourScript.cs:37)

Reproducible with: 2018.1.0b1, 2018.1.0b2, 2018.1.0b4

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.