Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Softbody Raycast Scene Error
#1
Obi softbody 6.3
Unity 2020.3.6f1
Collections package 1.0.0-pre.6
(job, burst, math .. etc)


InvalidOperationException: The previously scheduled job DequeueIntoArrayJob`1 writes to the Unity.Collections.NativeQueue`1[Obi.BurstQueryResult] DequeueIntoArrayJob`1.InputQueue. You must call JobHandle.Complete() on the job DequeueIntoArrayJob`1, before you can read from the Unity.Collections.NativeQueue`1[Obi.BurstQueryResult] safely.
Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle.CheckReadAndThrowNoEarlyOut (Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle handle) (at <c7864a0eaeb24b2a999fb177623d54b4>:0)
Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle.CheckReadAndThrow (Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle handle) (at <c7864a0eaeb24b2a999fb177623d54b4>:0)
Unity.Collections.NativeQueue`1[T].CheckRead () (at Library/PackageCache/com.unity.collections@1.0.0-pre.6/Unity.Collections/NativeQueue.cs:626)
Unity.Collections.NativeQueue`1[T].get_Count () (at Library/PackageCache/com.unity.collections@1.0.0-pre.6/Unity.Collections/NativeQueue.cs:353)
Obi.BurstSolverImpl.SpatialQuery (Obi.ObiNativeQueryShapeList shapes, Obi.ObiNativeAffineTransformList transforms, Obi.ObiNativeQueryResultList results) (at Assets/Obi/Scripts/Common/Backends/Burst/Solver/BurstSolverImpl.cs:929)
Obi.ObiSolver.Raycast (System.Collections.Generic.List`1[T] rays, System.Int32 filter, System.Single maxDistance, System.Single rayThickness) (at Assets/Obi/Scripts/Common/Solver/ObiSolver.cs:1764)
SoftbodyRaycasts.Update () (at Assets/Obi/Samples/Softbody/SampleResources/Scripts/SoftbodyRaycasts.cs:26)
Reply
#2
Hi there!

Thanks for reporting this! add the following code to line 918 of BurstSolverImpl.cs:

Quote:dequeueHandle.Complete();

Should look like this:

Code:
var dequeueQueryResults = new DequeueIntoArrayJob<BurstQueryResult>()
            {
                InputQueue = resultsQueue,
                OutputArray = results.AsNativeArray<BurstQueryResult>()
            };

            var dequeueHandle = dequeueQueryResults.Schedule();
            dequeueHandle.Complete(); //<---- new line

            var distanceJob = new CalculateQueryDistances()
            {

That should fix the issue. Let me know how it goes!
Reply
#3
(06-12-2021, 11:47 AM)josemendez Wrote: Hi there!

Thanks for reporting this! add the following code to line 918 of BurstSolverImpl.cs:


Should look like this:

Code:
var dequeueQueryResults = new DequeueIntoArrayJob<BurstQueryResult>()
            {
                InputQueue = resultsQueue,
                OutputArray = results.AsNativeArray<BurstQueryResult>()
            };

            var dequeueHandle = dequeueQueryResults.Schedule();
            dequeueHandle.Complete(); //<---- new line

            var distanceJob = new CalculateQueryDistances()
            {

That should fix the issue. Let me know how it goes!

Thank! It fixed!
Reply