RVO Out of MemeryException When Recreating Graph

When I recreate my scene from a save file, I reconstruct each of the player created obstacles and graph modifications and I sometimes get stuck in an infinite loop in GraphUtilities.GetContours(). I haven’t been able to track down the specific issue, but it seems to happen inconsistently. I’m using V 4.2.15 of the plugin and Unity 2019.2.15f . The graph I’m using is a 2D Grid graph with RVO Simulator and Navmesh components.

OutOfMemoryException: Out of memory
System.Collections.Generic.List`1[T].set_Capacity (System.Int32 value) (at <567df3e0919241ba98db88bec4c6696f>:0)
System.Collections.Generic.List`1[T].EnsureCapacity (System.Int32 min) (at <567df3e0919241ba98db88bec4c6696f>:0)
System.Collections.Generic.List`1[T].Add (T item) (at <567df3e0919241ba98db88bec4c6696f>:0)
Pathfinding.GraphUtilities.GetContours (Pathfinding.GridGraph grid, System.Action`1[T] callback, System.Single yMergeThreshold, Pathfinding.GridNodeBase[] nodes) (at Assets/Plugins/AstarPathfindingProject/Core/Misc/GraphUtilities.cs:222)
Pathfinding.RVO.RVONavmesh.AddGraphObstacles (Pathfinding.RVO.Simulator sim, Pathfinding.GridGraph grid) (at Assets/Plugins/AstarPathfindingProject/RVO/RVONavmesh.cs:97)
Pathfinding.RVO.RVONavmesh.OnLatePostScan () (at Assets/Plugins/AstarPathfindingProject/RVO/RVONavmesh.cs:72)
Pathfinding.RVO.RVONavmesh.OnGraphsPostUpdate () (at Assets/Plugins/AstarPathfindingProject/RVO/RVONavmesh.cs:46)
Pathfinding.GraphModifier.TriggerEvent (Pathfinding.GraphModifier+EventType type) (at Assets/Plugins/AstarPathfindingProject/Core/Misc/GraphModifier.cs:80)
Pathfinding.GraphUpdateProcessor.ProcessGraphUpdates (System.Boolean force) (at Assets/Plugins/AstarPathfindingProject/Core/Misc/GraphUpdateProcessor.cs:186)
Pathfinding.WorkItemProcessor.ProcessWorkItems (System.Boolean force) (at Assets/Plugins/AstarPathfindingProject/Core/Misc/WorkItemProcessor.cs:307)
AstarPath.PerformBlockingActions (System.Boolean force) (at Assets/Plugins/AstarPathfindingProject/Core/AstarPath.cs:881)
AstarPath.Update () (at Assets/Plugins/AstarPathfindingProject/Core/AstarPath.cs:864)

1 Like