Job/Burst exception with RVO (5.0.3)

Hello,

I am having an exception coming from the RVO system. It doesn’t occur 100% of the time but it does occur across PC/Mac Editors and on various devices.

System.IndexOutOfRangeException: Invalid allocation -2

This occurs when I am placing an obstacle in the game. I make a call to AstarPath.active.UpdateGraphs with a bounds surrounding my obstacle so I can set certain nodes on the graph as unwalkable.

I have an RVOSimulator in my scene and a handful of RVOAgents.

Am I using something incorrectly, or is there a way to workaround this issue? Happy to share more information.

It is Unity 2022.3.21f1, Package version 5.0.3. I am using 1 Grid Graph.

Here is the full trace from the exception:

System.IndexOutOfRangeException: Invalid allocation -2
This Exception was thrown from a job compiled with Burst, which has limited exception support.
0x00007ff9e4740c5e (fc401d4b6fd5260b967e0d0f96d295c) burst_Abort_Trampoline
0x00007ff9e470fbba (fc401d4b6fd5260b967e0d0f96d295c) Pathfinding.Util.SlabAllocator`1<int>.GetSpan (at C:/ProjectPath/Library/PackageCache/com.unity.burst@1.8.12/.Runtime/Packages/com.arongranberg.astar/Core/Collections/SlabAllocator.cs:99)
0x00007ff9e47059c4 (fc401d4b6fd5260b967e0d0f96d295c) Pathfinding.NavmeshEdges.NavmeshEdgeData.GetHierarchicalNodesInRangeRec (at C:/ProjectPath/Library/PackageCache/com.unity.burst@1.8.12/.Runtime/Packages/com.arongranberg.astar/Core/Misc/NavmeshEdges.cs:296)
0x00007ff9e470b82e (fc401d4b6fd5260b967e0d0f96d295c) Pathfinding.RVO.JobRVO`1<Pathfinding.RVO.XZMovementPlane>.GenerateObstacleVOs (at C:/ProjectPath/Library/PackageCache/com.unity.burst@1.8.12/.Runtime/Packages/com.arongranberg.astar/Core/RVO/RVOAgentBurst.cs:756)
0x00007ff9e4707489 (fc401d4b6fd5260b967e0d0f96d295c) Pathfinding.RVO.JobRVO`1<Pathfinding.RVO.XZMovementPlane>.ExecuteORCA (at C:/ProjectPath/Library/PackageCache/com.unity.burst@1.8.12/.Runtime/Packages/com.arongranberg.astar/Core/RVO/RVOAgentBurst.cs:1193)
0x00007ff9e4704246 (fc401d4b6fd5260b967e0d0f96d295c) Pathfinding.Jobs.JobParallelForBatchedExtensions.ParallelForBatchJobStruct`1<Pathfinding.RVO.JobRVO`1<Pathfinding.RVO.XZMovementPlane>>.Execute(ref Pathfinding.RVO.JobRVO`1<Pathfinding.RVO.XZMovementPlane> jobData, System.IntPtr additionalPtr, System.IntPtr bufferRangePatchData, ref Unity.Jobs.LowLevel.Unsafe.JobRanges ranges, int jobIndex) -> void_6a5bb0409ee2801a4447e6821ec1b7dd from AstarPathfindingProject, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null (at C:/ProjectPath/Library/PackageCache/com.unity.burst@1.8.12/.Runtime/Packages/com.arongranberg.astar/Utilities/IJobParallelForBatched.cs:42)
0x00007ff9e4703a8d (fc401d4b6fd5260b967e0d0f96d295c) 82cbe6c0c10a60340fd2850c60245b29
0x00007ff7d65c1292 (Unity) ExecuteJob
0x00007ff7d65c1604 (Unity) ExecuteJobCopyData
0x00007ff7d65c233f (Unity) ForwardJobForEachToManaged
0x00007ff7d65be71d (Unity) ujob_execute_job
0x00007ff7d65bd92d (Unity) lane_guts
0x00007ff7d65c0514 (Unity) worker_thread_routine
0x00007ff7d67ed876 (Unity) Thread::RunThreadWrapper
0x00007ffa587f7344 (KERNEL32) BaseThreadInitThunk
0x00007ffa59ae26b1 (ntdll) RtlUserThreadStart

Hi

This has already been fixed in version 5.0.4.

1 Like