Same error.
Version: 5.3.1
Unity: 6000.0.24f1
It happens slowly on each agent, at different times, and they always crash before entering a new node in the navmesh (Recast)
I attach the part of the code that I use to follow the navmesh refresh following the construction of a new building.
The agent continues walking while remaining stationary (I assume he is brought back shortly after).
This problem also happens with navlinks, they are executed, and when they are finished, the agents are teleported to the starting position
protected virtual void OnBuild()
{
GameSubsystem.instance.BuildsManager.CityStructureCompleted(this);
AstarPath.active.UpdateGraphs(boundsCollider.bounds);
if (GameSubsystem.instance.Terrain)
{
RemoveGrassInBounds(GameSubsystem.instance.Terrain, boundsCollider.bounds);
}
UObserver.Broadcast(GLMessageGateway.BUILD_COMPLETED, this);
}
Error:
Exception: Caught in a potentially infinite loop. The navmesh probably contains degenerate geometry.
Pathfinding.PathTracer.IsInnerVertexTriangleMesh (Pathfinding.Collections.CircularBuffer1[T] nodes, Pathfinding.Funnel+PathPart part, System.Int32 portalIndex, System.Boolean rightSide, System.Collections.Generic.List
1[T] alternativeNodes, Pathfinding.NNConstraint nnConstraint, System.Int32& startIndex, System.Int32& endIndex, Pathfinding.ITraversalProvider traversalProvider, Pathfinding.Path path) (at ./Packages/com.arongranberg.astar/Utilities/PathTracer.cs:1286)
Pathfinding.PathTracer.IsInnerVertex (Pathfinding.Collections.CircularBuffer1[T] nodes, Pathfinding.Funnel+PathPart part, System.Int32 portalIndex, System.Boolean rightSide, System.Collections.Generic.List
1[T] alternativeNodes, Pathfinding.NNConstraint nnConstraint, System.Int32& startIndex, System.Int32& endIndex, Pathfinding.ITraversalProvider traversalProvider, Pathfinding.Path path) (at ./Packages/com.arongranberg.astar/Utilities/PathTracer.cs:1180)
Pathfinding.PathTracer.FirstInnerVertex (Unity.Collections.NativeArray1[T] indices, System.Int32 numCorners, System.Collections.Generic.List
1[T] alternativePath, System.Int32& alternativeStartIndex, System.Int32& alternativeEndIndex, Pathfinding.ITraversalProvider traversalProvider, Pathfinding.Path path) (at ./Packages/com.arongranberg.astar/Utilities/PathTracer.cs:1310)
Pathfinding.PathTracer.GetNextCornerIndices (Unity.Collections.NativeArray1[System.Int32]& buffer, System.Int32 maxCorners, Unity.Collections.Allocator allocator, System.Boolean& lastCorner, Pathfinding.ITraversalProvider traversalProvider, Pathfinding.Path path) (at ./Packages/com.arongranberg.astar/Utilities/PathTracer.cs:1420) Pathfinding.ECS.JobRepairPath.Execute (Unity.Transforms.LocalTransform& transform, Pathfinding.ECS.MovementState& state, Pathfinding.ECS.AgentCylinderShape& shape, Pathfinding.ECS.AgentMovementPlane& movementPlane, Pathfinding.ECS.AutoRepathPolicy& autoRepathPolicy, Pathfinding.ECS.DestinationPoint& destination, Unity.Entities.EnabledRefRW
1[T] readyToTraverseOffMeshLink, Pathfinding.ECS.ManagedState managedState, Pathfinding.ECS.MovementSettings& settings, Unity.Collections.NativeList1[T] nextCornersScratch, Unity.Collections.NativeArray
1[System.Int32]& indicesScratch, Unity.Collections.Allocator allocator, System.Boolean onlyApplyPendingPaths) (at ./Packages/com.arongranberg.astar/Core/ECS/Jobs/JobRepairPath.cs:188)
Pathfinding.ECS.JobRepairPath.Execute (Unity.Entities.ArchetypeChunk& chunk, System.Int32 unfilteredChunkIndex, System.Boolean useEnabledMask, Unity.Burst.Intrinsics.v128& chunkEnabledMask) (at ./Packages/com.arongranberg.astar/Core/ECS/Jobs/JobRepairPath.cs:127)
Pathfinding.ECS.JobRepairPath.Unity.Entities.IJobChunk.Execute (Unity.Entities.ArchetypeChunk& chunk, System.Int32 unfilteredChunkIndex, System.Boolean useEnabledMask, Unity.Burst.Intrinsics.v128& chunkEnabledMask) <0x214454b2460 + 0x00072> in :0
Unity.Entities.JobChunkExtensions+JobChunkProducer1[T].ExecuteInternal (Unity.Entities.JobChunkExtensions+JobChunkWrapper
1[T]& jobWrapper, System.IntPtr bufferRangePatchData, Unity.Jobs.LowLevel.Unsafe.JobRanges& ranges, System.Int32 jobIndex) (at ./Library/PackageCache/com.unity.entities/Unity.Entities/IJobChunk.cs:420)
Unity.Entities.JobChunkExtensions+JobChunkProducer1[T].Execute (Unity.Entities.JobChunkExtensions+JobChunkWrapper
1[T]& jobWrapper, System.IntPtr additionalPtr, System.IntPtr bufferRangePatchData, Unity.Jobs.LowLevel.Unsafe.JobRanges& ranges, System.Int32 jobIndex) (at ./Library/PackageCache/com.unity.entities/Unity.Entities/IJobChunk.cs:363)