ArgumentException: left and right lists must have equal length

We recently added Crash Reporting to our game, and I saw this exception come in:

ArgumentException: left and right lists must have equal length

Stack Trace:
Pathfinding.RichFunnel.FindNextCorners (Vector3 origin, Int32 startIndex, System.Collections.Generic.List1 funnelPath, Int32 numCorners, System.Boolean& lastCorner) Pathfinding.RichFunnel.Update (Vector3 position, System.Collections.Generic.List1 buffer, Int32 numCorners, System.Boolean& lastCorner, System.Boolean& requiresRepath)
Pathfinding.RichAI.UpdateTarget (Pathfinding.RichFunnel fn)
Pathfinding.RichAI.Update ()
AiPath.Update ()

We haven’t seen this internally, and so far only one occurrence from users, but I am wondering if you have some idea what could cause this, and how to prevent it? We use Recast Graphs, and our A* version is 3.8.1

Hi

Weird. No I never seen that exception myself. I will try to find out what have caused it.

Thanks – there are a couple exceptions that we can’t explain either:

ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index

System.Collections.Generic.List1[Pathfinding.GraphNode].get_Item (Int32 index) Pathfinding.RichFunnel.SimplifyPath (IRaycastableGraph graph, System.Collections.Generic.List1 nodes, Int32 start, Int32 end, System.Collections.Generic.List1 result, Vector3 startPoint, Vector3 endPoint) Pathfinding.RichFunnel.BuildFunnelCorridor (System.Collections.Generic.List1 nodes, Int32 start, Int32 end)
Pathfinding.RichPath.Initialize (.Seeker s, Pathfinding.Path p, Boolean mergePartEndpoints, FunnelSimplification simplificationMode)
Pathfinding.RichAI.OnPathComplete (Pathfinding.Path p)
Seeker.OnPathComplete (Pathfinding.Path p, Boolean runModifiers, Boolean sendCallbacks)
Seeker.OnPathComplete (Pathfinding.Path p)
Pathfinding.Path.ReturnPath ()
AstarPath.ReturnPaths (Boolean timeSlice)
AstarPath.Update ()

AND

ReflectionTypeLoadException: The classes in the module cannot be loaded.

System.Reflection.Assembly.GetTypes ()
Pathfinding.AstarData.FindGraphTypes ()
AstarPath.Initialize ()
AstarPath.Awake ()

Regarding the out of range exception in SimplifyPath, further narrowing down via crash reporting has shown the error is due to accessing the “result” list out of range. Not sure if this is due to an underflow or overflow. Looking at the code, it seems possible that the result list could be accessed out of range.