Support Forum

[BUG] Inf loop error

There seems to be a random error popping when we start the game, thus initializing the Grid Graph with Seeker agents having Funnel modifier. This error appears only on 1 of our PCs, and only once when starting unity during runtime, which is very strange.

We are using the 4.3.49 beta package

"Inf loop
UnityEngine.Debug:LogError (object)
Pathfinding.GridStringPulling:Calculate (System.Collections.Generic.List`1<Pathfinding.GraphNode>,int,int,UnityEngine.Vector3,UnityEngine.Vector3,System.Func`2<Pathfinding.GraphNode, uint>,System.Func`2<Pathfinding.GraphNode, bool>,int) (at Library/PackageCache/com.arongranberg.astar@4.3.49/Utilities/GridStringPulling.cs:290)
Pathfinding.FunnelModifier:Apply (Pathfinding.Path) (at Library/PackageCache/com.arongranberg.astar@4.3.49/Modifiers/FunnelModifier.cs:132)
Pathfinding.Seeker:RunModifiers (Pathfinding.Seeker/ModifierPass,Pathfinding.Path) (at Library/PackageCache/com.arongranberg.astar@4.3.49/Core/AI/Seeker.cs:271)
Pathfinding.Seeker:OnPathComplete (Pathfinding.Path,bool,bool) (at Library/PackageCache/com.arongranberg.astar@4.3.49/Core/AI/Seeker.cs:314)
Pathfinding.Seeker:OnPathComplete (Pathfinding.Path) (at Library/PackageCache/com.arongranberg.astar@4.3.49/Core/AI/Seeker.cs:297)
Pathfinding.Path:ReturnPath () (at Library/PackageCache/com.arongranberg.astar@4.3.49/Core/Path.cs:845)
Pathfinding.Path:Pathfinding.IPathInternals.ReturnPath () (at Library/PackageCache/com.arongranberg.astar@4.3.49/Core/Path.cs:903)
Pathfinding.PathReturnQueue:ReturnPaths (bool) (at Library/PackageCache/com.arongranberg.astar@4.3.49/Core/Misc/PathReturnQueue.cs:58)
AstarPath:Update () (at Library/PackageCache/com.arongranberg.astar@4.3.49/Core/AstarPath.cs:874)"

Another error which accompanies this error is:

Inconsistent linecasts
UnityEngine.Debug:LogError (object)
Pathfinding.GridStringPulling:Calculate (System.Collections.Generic.List`1<Pathfinding.GraphNode>,int,int,UnityEngine.Vector3,UnityEngine.Vector3,System.Func`2<Pathfinding.GraphNode, uint>,System.Func`2<Pathfinding.GraphNode, bool>,int) (at Library/PackageCache/com.arongranberg.astar@4.3.49/Utilities/GridStringPulling.cs:447)
Pathfinding.FunnelModifier:Apply (Pathfinding.Path) (at Library/PackageCache/com.arongranberg.astar@4.3.49/Modifiers/FunnelModifier.cs:132)
Pathfinding.Seeker:RunModifiers (Pathfinding.Seeker/ModifierPass,Pathfinding.Path) (at Library/PackageCache/com.arongranberg.astar@4.3.49/Core/AI/Seeker.cs:271)
Pathfinding.Seeker:OnPathComplete (Pathfinding.Path,bool,bool) (at Library/PackageCache/com.arongranberg.astar@4.3.49/Core/AI/Seeker.cs:314)
Pathfinding.Seeker:OnPathComplete (Pathfinding.Path) (at Library/PackageCache/com.arongranberg.astar@4.3.49/Core/AI/Seeker.cs:297)
Pathfinding.Path:ReturnPath () (at Library/PackageCache/com.arongranberg.astar@4.3.49/Core/Path.cs:845)
Pathfinding.Path:Pathfinding.IPathInternals.ReturnPath () (at Library/PackageCache/com.arongranberg.astar@4.3.49/Core/Path.cs:903)
Pathfinding.PathReturnQueue:ReturnPaths (bool) (at Library/PackageCache/com.arongranberg.astar@4.3.49/Core/Misc/PathReturnQueue.cs:58)
AstarPath:Update () (at Library/PackageCache/com.arongranberg.astar@4.3.49/Core/AstarPath.cs:874)

Hi

Interesting. Can you replicate this error?

@aron_granberg not om my PC, only my coworker gets this error, and only once, which I bet is annoying to replicate and debug.
Maybe there is some logic in that part of the code that could cause such an issue even without debugging?

That code is incredibly tricky. I already have a dozen testcases for it. I thought I had taken care of all edge cases, but apparently not. To fix this, I really need a reproducible test case.

We can close this issue for now, as me and you cannot reproduce it for now.

1 Like