- A* version: [5.2.3]
- Unity version: [2022.3.21f1]
- Burst version: [1.8.18]
Updated to 5.2.3 from 4.2.19 for Recast 2D. Immediately noticed the leak.
Leaks happen when a scene with a AstarPath component in it is played.
Leaks even happen in a newly created project after importing the package and creating a Gameobject with AstarPath component.
Leaks happen both in Unity 2022.3.21 and 2022.3.49.
Here’s the log:
Leak Detected : Persistent allocates 3 individual allocations.
Found 2 leak(s) from callstack:
0x0000020eaf36a8a3 (Mono JIT Code) Pathfinding.BinaryHeap:.ctor (int) (at ./Packages/com.arongranberg.astar/Core/Collections/BinaryHeap.cs:90)
0x0000020eaf36a683 (Mono JIT Code) Pathfinding.PathHandler:.ctor (Pathfinding.GlobalNodeStorage,int,int) (at ./Packages/com.arongranberg.astar/Core/Pathfinding/PathHandler.cs:191)
0x0000020eaf36a40b (Mono JIT Code) Pathfinding.PathProcessor:SetThreadCount (int,bool) (at ./Packages/com.arongranberg.astar/Core/Pathfinding/PathProcessor.cs:99)
0x0000020eaf369b8b (Mono JIT Code) AstarPath:InitializePathProcessor () (at ./Packages/com.arongranberg.astar/Core/AstarPath.cs:1201)
0x0000020eadaac50b (Mono JIT Code) AstarPath:OnEnable () (at ./Packages/com.arongranberg.astar/Core/AstarPath.cs:1298)
0x0000020f9eb61198 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
0x00007ffe67dc4bfe (mono-2.0-bdwgc) mono_jit_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/mini/mini-runtime.c:3445)
0x00007ffe67cfd254 (mono-2.0-bdwgc) do_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3068)
0x00007ffe67cfd3cc (mono-2.0-bdwgc) mono_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3115)
0x00007ff73b1f03a4 (Unity) scripting_method_invoke
0x00007ff73b1ce114 (Unity) ScriptingInvocation::Invoke
0x00007ff73b1b5904 (Unity) MonoBehaviour::CallMethodIfAvailable
0x00007ff73b1b3d66 (Unity) MonoBehaviour::AddToManager
0x00007ff73b1b497a (Unity) MonoBehaviour::AwakeFromLoad
0x00007ff73b2b2c9d (Unity) AwakeFromLoadQueue::InvokePersistentManagerAwake
0x00007ff73b2b3c71 (Unity) AwakeFromLoadQueue::PersistentManagerSingleQueueAwakeFromLoad
0x00007ff73b2b38e0 (Unity) AwakeFromLoadQueue::PersistentManagerAwakeFromLoad_NoChecks
0x00007ff73aeaf9d5 (Unity) LoadSceneOperation::CompleteAwakeSequence
0x00007ff73aeb0550 (Unity) LoadSceneOperation::CompletePreloadManagerLoadSceneEditor
Found 1 leak(s) from callstack:
0x0000020eaf36a8a3 (Mono JIT Code) Pathfinding.BinaryHeap:.ctor (int) (at ./Packages/com.arongranberg.astar/Core/Collections/BinaryHeap.cs:90)
0x0000020eaf36a683 (Mono JIT Code) Pathfinding.PathHandler:.ctor (Pathfinding.GlobalNodeStorage,int,int) (at ./Packages/com.arongranberg.astar/Core/Pathfinding/PathHandler.cs:191)
0x0000020eaf36a40b (Mono JIT Code) Pathfinding.PathProcessor:SetThreadCount (int,bool) (at ./Packages/com.arongranberg.astar/Core/Pathfinding/PathProcessor.cs:99)
0x0000020eaf369b8b (Mono JIT Code) AstarPath:InitializePathProcessor () (at ./Packages/com.arongranberg.astar/Core/AstarPath.cs:1201)
0x0000020eadaac50b (Mono JIT Code) AstarPath:OnEnable () (at ./Packages/com.arongranberg.astar/Core/AstarPath.cs:1298)
0x0000020f9eb61198 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
0x00007ffe67dc4bfe (mono-2.0-bdwgc) mono_jit_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/mini/mini-runtime.c:3445)
0x00007ffe67cfd254 (mono-2.0-bdwgc) do_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3068)
0x00007ffe67cfd3cc (mono-2.0-bdwgc) mono_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3115)
0x00007ff73b1f03a4 (Unity) scripting_method_invoke
0x00007ff73b1ce114 (Unity) ScriptingInvocation::Invoke
0x00007ff73b1b5904 (Unity) MonoBehaviour::CallMethodIfAvailable
0x00007ff73b1b3d66 (Unity) MonoBehaviour::AddToManager
0x00007ff73b27038a (Unity) SerializableManagedRefsUtilities::AwakeInstancesAfterBackupRestoration
0x00007ff73b1b8c0f (Unity) MonoManager::FinalizeReload
0x00007ff73c5b03da (Unity) ScriptingInitializer::FinalizeReload
0x00007ff73c625504 (Unity) ImportOutOfDateAssets
0x00007ff73c62fabc (Unity) RefreshInternalV2
0x00007ff73c6373fc (Unity) StopAssetImportingV2Internal