ArgumentOutOfRangeException when simulateMovement is set to false on top of OffMeshLink (v5.4.5)

As mentioned in the title when the agent is on top of an offmesh link and I call simulateMovement = false then I get this error. Is it supposed to happen? If I disable FollowerEntity there is no issue.

ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: partIndexPathfinding.PathTracer.GetLinkInfo (System.Int32 partIndex) (at ./Packages/com.arongranberg.astar/Utilities/PathTracer.cs:1694)
Pathfinding.ECS.TraverseOffMeshLinkSystem.NextLinkToTraverse (Pathfinding.ECS.ManagedState state) (at ./Packages/com.arongranberg.astar/Core/ECS/Systems/TraverseOffMeshLinkSystem.cs:69)
Pathfinding.ECS.TraverseOffMeshLinkSystem.StartOffMeshLinkTraversal (Unity.Entities.SystemState& systemState, Unity.Entities.EntityCommandBuffer commandBuffer) (at ./Packages/com.arongranberg.astar/Core/ECS/Systems/TraverseOffMeshLinkSystem.cs:57)
Pathfinding.ECS.TraverseOffMeshLinkSystem.OnUpdate (Unity.Entities.SystemState& systemState) (at ./Packages/com.arongranberg.astar/Core/ECS/Systems/TraverseOffMeshLinkSystem.cs:42)
Pathfinding.ECS.TraverseOffMeshLinkSystem.\__codegen__OnUpdate (System.IntPtr self, System.IntPtr state) (at <4a6f5e90e7eb48a29d0759c6638bf610>:0)
Unity.Entities.SystemBaseRegistry+<>c__DisplayClass9_0.b__0 (System.IntPtr system, System.IntPtr state) (at ./Library/PackageCache/com.unity.entities@42c4e852ffb4/Unity.Entities/SystemBaseRegistry.cs:249)
UnityEngine.Debug:LogException(Exception)Unity.Debug:LogException(Exception) (at ./Library/PackageCache/com.unity.entities@42c4e852ffb4/Unity.Entities/Stubs/Unity/Debug.cs:17)
Unity.Entities.<>c__DisplayClass9_0:b__0(IntPtr, IntPtr) (at ./Library/PackageCache/com.unity.entities@42c4e852ffb4/Unity.Entities/SystemBaseRegistry.cs:253)
Unity.Entities.UnmanagedUpdate_00001691$BurstDirectCall:wrapper_native_indirect_000001DF9B458130(IntPtr&, Void\*)
Unity.Entities.UnmanagedUpdate_00001691$BurstDirectCall:Invoke(Void\*)Unity.Entities.WorldUnmanagedImpl:UnmanagedUpdate(Void\*)
Unity.Entities.WorldUnmanagedImpl:UpdateSystem(SystemHandle) (at ./Library/PackageCache/com.unity.entities@42c4e852ffb4/Unity.Entities/WorldUnmanaged.cs:926)
Unity.Entities.ComponentSystemGroup:UpdateAllSystems() (at ./Library/PackageCache/com.unity.entities@42c4e852ffb4/Unity.Entities/ComponentSystemGroup.cs:717)
Unity.Entities.ComponentSystemGroup:OnUpdate() (at ./Library/PackageCache/com.unity.entities@42c4e852ffb4/Unity.Entities/ComponentSystemGroup.cs:687)
Pathfinding.ECS.AIMovementSystemGroup:OnUpdate() (at ./Packages/com.arongranberg.astar/Core/ECS/Systems/AIMovementSystemGroup.cs:211)
Unity.Entities.SystemBase:Update() (at ./Library/PackageCache/com.unity.entities@42c4e852ffb4/Unity.Entities/SystemBase.cs:420)
Unity.Entities.ComponentSystemGroup:UpdateAllSystems() (at ./Library/PackageCache/com.unity.entities@42c4e852ffb4/Unity.Entities/ComponentSystemGroup.cs:723)
Unity.Entities.ComponentSystemGroup:OnUpdate() (at ./Library/PackageCache/com.unity.entities@42c4e852ffb4/Unity.Entities/ComponentSystemGroup.cs:681)
Unity.Entities.SystemBase:Update() (at ./Library/PackageCache/com.unity.entities@42c4e852ffb4/Unity.Entities/SystemBase.cs:420)
Unity.Entities.DummyDelegateWrapper:TriggerUpdate() (at ./Library/PackageCache/com.unity.entities@42c4e852ffb4/Unity.Entities/ScriptBehaviourUpdateOrder.cs:523)
``
1 Like

I’ll tag Aron in this exception to take a look at. Can you let us know what versions of the Entities dependency/package you have installed? Also if you’re able to edit your post with a formatted version of the exception with line breaks that would be nice as well- tried to format it as code but it didn’t work without line breaks.

I have Entities: 1.4.3 in Unity version 6000.2.10f. Sorry but I can’t find the way to format it

Np, I took the time to parse the text and reformat it. Thanks for the info!

1 Like

Hi

I cannot replicate this. But I did already fix a very related bug. Possibly it was the same one.

I’ll include that fix in the next update. Let me know if it resolves the issue for you.

I have not come across the issue so far so it seems to be fixed after the latest update. Thanks a lot!

1 Like