Degenerate geometry error since updating

  • A* version: 5.3.4
  • Unity version: 6000.0.41f1

This is a survival open world game. I use FollowerEntity & NavmeshCut’s. The NavmeshCut is used by things you can build in the world. For example, when you place down a floor it has 2 components: A cutter (to cut the terrain navmesh below the floor) then an adder to add to the surface of the floor.

This causes 2 problems:
First, since updating from an older version I now get this error consistently: “Exception: Caught in a potentially infinite loop. The navmesh probably contains degenerate geometry.”

Second, where two floors meet, the AI often spin in a circle for a bit before they’re able to continue moving normally.

Thanks for the help!

Bump:
This is still a problem. I don’t know what degenerate geometry is. Whenever this error is present though, NPCs across the map using FollowerEntity seem to freeze up.

Hi

Do you have a screenshot of your navmesh cut setup?
Have you narrowed it down to a specific navmesh cut that is causing the issue?

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.List1[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.List1[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.List1[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.EnabledRefRW1[T] readyToTraverseOffMeshLink, Pathfinding.ECS.ManagedState managedState, Pathfinding.ECS.MovementSettings& settings, Unity.Collections.NativeList1[T] nextCornersScratch, Unity.Collections.NativeArray1[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+JobChunkWrapper1[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+JobChunkWrapper1[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)

I’m trying to switch to a grid pathfinder, recast is giving me a lot of problems