"Exception: Diagonal connections are not supported spam" after new version update

  • A* version: 5.4.5
  • Unity version: 6000.2.10f1

Hello,

I’ve had a setup working with A* Pathfinding and Agent Navigation from Project Dawn, which uses ECS to drive the agents.

Recently I’ve updated my Unity version to the latest LTS and both A* and Agent Nav packages to their latest versions.

After the update without changing any of the Grid Graph setup I started getting the following error spam:

Exception: Diagonal connections are not supported
Pathfinding.PathTracer.ResolveNormalizedGridPoint (Pathfinding.GridGraph grid, Pathfinding.Collections.CircularBuffer`1[Pathfinding.GraphNode]& nodes, Pathfinding.Collections.UnsafeSpan`1[T] cornerIndices, Pathfinding.Funnel+PathPart part, System.Int32 index, System.Int32& nodeIndex) (at ./Packages/com.arongranberg.astar/Utilities/PathTracer.cs:1846)
Pathfinding.PathTracer.SimplifyGridInnerVertex (Pathfinding.Collections.CircularBuffer`1[Pathfinding.GraphNode]& nodes, Pathfinding.Collections.UnsafeSpan`1[T] cornerIndices, Pathfinding.Funnel+PathPart part, Pathfinding.Collections.CircularBuffer`1[System.Byte]& portalIsNotInnerCorner, System.Collections.Generic.List`1[T] alternativePath, System.Int32& alternativeStartIndex, System.Int32& alternativeEndIndex, Pathfinding.TraversalConstraint& traversalConstraint, Pathfinding.TraversalCosts& traversalCosts, System.Boolean lastCorner) (at ./Packages/com.arongranberg.astar/Utilities/PathTracer.cs:1903)
Pathfinding.PathTracer.GetNextCornerIndices (Unity.Collections.NativeArray`1[System.Int32]& buffer, System.Int32 maxCorners, Unity.Collections.Allocator allocator, System.Boolean allowSimplify, System.Boolean& lastCorner) (at ./Packages/com.arongranberg.astar/Utilities/PathTracer.cs:1493)
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.NativeList`1[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)
ProjectDawn.Navigation.Astar.AstarPathSystem+AstarPathJob.Execute (Unity.Entities.ArchetypeChunk& chunk, System.Int32 unfilteredChunkIndex, System.Boolean useEnabledMask, Unity.Burst.Intrinsics.v128& chunkEnabledMask) (at ./Packages/com.projectdawn.navigation/ProjectDawn.Navigation.Astar/AstarPathingSystem.cs:444)
ProjectDawn.Navigation.Astar.AstarPathSystem+AstarPathJob.Unity.Entities.IJobChunk.Execute (Unity.Entities.ArchetypeChunk& chunk, System.Int32 unfilteredChunkIndex, System.Boolean useEnabledMask, Unity.Burst.Intrinsics.v128& chunkEnabledMask) (at <69cface521a34f33af564e71a925ab77>:0)
Unity.Entities.JobChunkExtensions+JobChunkProducer`1[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@f6e02210e263/Unity.Entities/IJobChunk.cs:452)
Unity.Entities.JobChunkExtensions+JobChunkProducer`1[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@f6e02210e263/Unity.Entities/IJobChunk.cs:364)

I’ve already contacted the Agent Navigation plugin dev, but we could not find any answer to the issue since it looks like the exceptions comes from somewhere deep within the A* architecture.

I’ve put together a quick repro project which I can provide, any help will be greatly appreciated!

Go ahead and send over that project if you can, thanks! I’ll let Aron know about this. Also thanks for checking in with the other developer to nail down where this might be coming from.

Here is a link to the project (will expire in 3 days from posting this):

WeTransfer Link: https:// we.tl/t-dNLkSjsg1N
(cannot create link as new user, need to copy and remove the space after the //)

Repro Steps:

  • Open and play AgentNavTest scene

  • Move with wasd/arrows around the console bit

  • Error triggers more often when moving diagonally around the obstacles

Highly Possible culprit - something in this ConcourseTerrain gameobject section triggers the issue.

Let me know if that works for you!

…Heyyy buddyyy, so… I was gone for three days because of the holidays :joy: Would you mind resending it?

Hey not a problem. Here is a new upload.
https:// we.tl/t-La3HHB9JCF

(again there is a space after the //)

Thanks! I’ll send this directly Aron to take a look at. I opened the project and checked the dependencies, and I’d recommend making a backup/duplicate project and trying to update the Collections, Entities, and Burst packages since they’re quite a bit behind. May help :+1:

Fair point, I’ll give it a go and let you know if that resolves anything.

Hello again, I did the updates, on my main project I wasn’t that far behind, a few minor versions.

Sadly the issue persists.

Gotcha. Thanks for the update. I’ve let Aron know about this- it may be related to another threads issue. I’ll link that here in case you want to follow it for updates or to chime in with the other users.

1 Like