IvalidOperationException in RVOQuadtreeBurst

I keep getting an error on the latest beta. It happens whenever I spawn a unit with an RVO controller. Is it possible I have something wrong with me scene setup? Interestingly all units move around perfectly fine and avoidance seems to be doing ok? It happens ONLY when the unit is standing still.

InvalidOperationException: The previously scheduled job RVOQuadtreeBurst:JobBuild writes to the Unity.Collections.NativeArray`1[System.Int32] JobBuild.agents. You are trying to schedule a new job RVODestinationCrowdedBehavior:JobDensityCheck, which reads from the same Unity.Collections.NativeArray`1[System.Int32] (via JobDensityCheck.quadtree.agents). To guarantee safety, you must include RVOQuadtreeBurst:JobBuild as a dependency of the newly scheduled job.
Unity.Jobs.LowLevel.Unsafe.JobsUtility.ScheduleParallelFor (Unity.Jobs.LowLevel.Unsafe.JobsUtility+JobScheduleParameters& parameters, System.Int32 arrayLength, System.Int32 innerloopBatchCount) (at <1d5ae28f5ca3488dbddca7794af65eb1>:0)
Pathfinding.Jobs.JobParallelForBatchedExtensions.ScheduleBatch[T] (T jobData, System.Int32 arrayLength, System.Int32 minIndicesPerJobCount, Unity.Jobs.JobHandle dependsOn) (at ./Library/PackageCache/com.arongranberg.astar@4.3.66/Utilities/IJobParallelForBatched.cs:56)
Pathfinding.AIBase.OnUpdate (Pathfinding.AIBase[] components, System.Int32 count, UnityEngine.Jobs.TransformAccessArray transforms, Pathfinding.Util.BatchedEvents+Event ev) (at ./Library/PackageCache/com.arongranberg.astar@4.3.66/Core/AI/AIBase.cs:462)
Pathfinding.Util.BatchedEvents+<>c__DisplayClass15_0`1[T].<Add>b__0 (System.Object[] objs, System.Int32 count, UnityEngine.Jobs.TransformAccessArray tr, Pathfinding.Util.BatchedEvents+Event ev) (at ./Library/PackageCache/com.arongranberg.astar@4.3.66/Utilities/BatchedEvents.cs:176)
Pathfinding.Util.BatchedEvents.DoEvent (Pathfinding.Util.BatchedEvents+Event eventType) (at ./Library/PackageCache/com.arongranberg.astar@4.3.66/Utilities/BatchedEvents.cs:199)
Pathfinding.Util.BatchedEvents.FixedUpdate () (at ./Library/PackageCache/com.arongranberg.astar@4.3.66/Utilities/BatchedEvents.cs:219)

In case anyone else has this, turns out it’s related to a bug in Unity Version 2022.1.13
We updated to .16 and it works fine.

1 Like