Memory Leak and ObjectDisposedException

  • A* version: 5.3.7
  • Unity version: 2022.3.52f1

Hi,
I’m currently encountering a serious issue when entering and exiting Play Mode a few times, the Unity editor starts reporting native memory leaks and eventually throws an ObjectDisposedException, referencing internal structures like HierarchicalGraph and NavmeshEdges.

Is there anything I can do from my end to mitigate or patch this safely?

ObjectDisposedException: Cannot access a disposed object.
Object name: ‘The NativeReference is already disposed.’.
Unity.Collections.NativeReference1[T].CheckNotDisposed () (at ./Library/PackageCache/com.unity.collections@1.5.1/Unity.Collections/NativeReference.cs:350) Unity.Collections.NativeReference1[T].Dispose () (at ./Library/PackageCache/com.unity.collections@1.5.1/Unity.Collections/NativeReference.cs:128)
Pathfinding.NavmeshEdges.Dispose () (at ./Library/PackageCache/com.arongranberg.astar@5.3.7/Core/Misc/NavmeshEdges.cs:31)
Pathfinding.HierarchicalGraph.OnDisable () (at ./Library/PackageCache/com.arongranberg.astar@5.3.7/Core/Pathfinding/HierarchicalGraph.cs:110)
AstarPath.OnDisable () (at ./Library/PackageCache/com.arongranberg.astar@5.3.7/Core/AstarPath.cs:1348)

A Native Collection has not been disposed, resulting in a memory leak. Allocated from:
Unity.Collections.NativeReference`1:.ctor(Int32, AllocatorHandle) (at .\Library\PackageCache\com.unity.collections@1.5.1\Unity.Collections\NativeReference.cs:62)
Pathfinding.HierarchicalGraph:OnEnable() (at .\Library\PackageCache\com.arongranberg.astar@5.3.7\Core\Pathfinding\HierarchicalGraph.cs:174)
AstarPath:OnEnable() (at .\Library\PackageCache\com.arongranberg.astar@5.3.7\Core\AstarPath.cs:1276)

A Native Collection has not been disposed, resulting in a memory leak. Allocated from:
Unity.Collections.NativeList`1:.ctor(Int32, AllocatorHandle) (at .\Library\PackageCache\com.unity.collections@1.5.1\Unity.Collections\NativeList.cs:116)
Pathfinding.HierarchicalGraph:OnEnable() (at .\Library\PackageCache\com.arongranberg.astar@5.3.7\Core\Pathfinding\HierarchicalGraph.cs:172)
AstarPath:OnEnable() (at .\Library\PackageCache\com.arongranberg.astar@5.3.7\Core\AstarPath.cs:1276)

A Native Collection has not been disposed, resulting in a memory leak. Allocated from:
Unity.Collections.NativeList`1:.ctor(Int32, AllocatorHandle) (at .\Library\PackageCache\com.unity.collections@1.5.1\Unity.Collections\NativeList.cs:116)
Pathfinding.HierarchicalGraph:OnEnable() (at .\Library\PackageCache\com.arongranberg.astar@5.3.7\Core\Pathfinding\HierarchicalGraph.cs:175)
AstarPath:OnEnable() (at .\Library\PackageCache\com.arongranberg.astar@5.3.7\Core\AstarPath.cs:1276)

A Native Collection has not been disposed, resulting in a memory leak. Allocated from:
Unity.Collections.NativeList`1:.ctor(Int32, AllocatorHandle) (at .\Library\PackageCache\com.unity.collections@1.5.1\Unity.Collections\NativeList.cs:116)
Pathfinding.HierarchicalGraph:OnEnable() (at .\Library\PackageCache\com.arongranberg.astar@5.3.7\Core\Pathfinding\HierarchicalGraph.cs:173)
AstarPath:OnEnable() (at .\Library\PackageCache\com.arongranberg.astar@5.3.7\Core\AstarPath.cs:1276)

Leak Detected : Persistent allocates 34 individual allocations.

Found 25 leak(s) from callstack:
0x00000161d27009a3 (Mono JIT Code) Pathfinding.BinaryHeap:.ctor (int) (at ./Library/PackageCache/com.arongranberg.astar@5.3.7/Core/Collections/BinaryHeap.cs:94)
0x00000161d27007b3 (Mono JIT Code) Pathfinding.PathHandler:.ctor (Pathfinding.GlobalNodeStorage,int,int) (at ./Library/PackageCache/com.arongranberg.astar@5.3.7/Core/Pathfinding/PathHandler.cs:192)
0x00000161d270058b (Mono JIT Code) Pathfinding.PathProcessor:SetThreadCount (int,bool) (at ./Library/PackageCache/com.arongranberg.astar@5.3.7/Core/Pathfinding/PathProcessor.cs:99)
0x00000161d06efb7b (Mono JIT Code) AstarPath:InitializePathProcessor () (at ./Library/PackageCache/com.arongranberg.astar@5.3.7/Core/AstarPath.cs:1202)
0x00000161cee4073b (Mono JIT Code) AstarPath:OnEnable () (at ./Library/PackageCache/com.arongranberg.astar@5.3.7/Core/AstarPath.cs:1299)
0x000001631a8be4b8 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
0x00007ffcfd6d4c2e (mono-2.0-bdwgc) mono_jit_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/mini/mini-runtime.c:3445)
0x00007ffcfd60d254 (mono-2.0-bdwgc) do_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3068)
0x00007ffcfd60d3cc (mono-2.0-bdwgc) mono_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3115)
0x00007ff70fd27214 (Unity) scripting_method_invoke
0x00007ff70fd04e24 (Unity) ScriptingInvocation::Invoke
0x00007ff70fcec5b4 (Unity) MonoBehaviour::CallMethodIfAvailable
0x00007ff70fceaa16 (Unity) MonoBehaviour::AddToManager
0x00007ff70fceb62a (Unity) MonoBehaviour::AwakeFromLoad
0x00007ff70fdea77d (Unity) AwakeFromLoadQueue::InvokePersistentManagerAwake
0x00007ff70fdeb751 (Unity) AwakeFromLoadQueue::PersistentManagerSingleQueueAwakeFromLoad
0x00007ff70fdeb3c0 (Unity) AwakeFromLoadQueue::PersistentManagerAwakeFromLoad_NoChecks
0x00007ff70f9e627c (Unity) LoadSceneOperation::CompleteAwakeSequence
0x00007ff70f9e6ea0 (Unity) LoadSceneOperation::CompletePreloadManagerLoadSceneEditor

Found 1 leak(s) from callstack:
0x00000161cee44ac3 (Mono JIT Code) Pathfinding.Collections.HierarchicalBitset:.ctor (int,Unity.Collections.Allocator) (at ./Library/PackageCache/com.arongranberg.astar@5.3.7/Core/Collections/HierarchicalBitset.cs:31)
0x00000161cee40f2b (Mono JIT Code) Pathfinding.HierarchicalGraph:OnEnable () (at ./Library/PackageCache/com.arongranberg.astar@5.3.7/Core/Pathfinding/HierarchicalGraph.cs:176)
0x00000161cee406ab (Mono JIT Code) AstarPath:OnEnable () (at ./Library/PackageCache/com.arongranberg.astar@5.3.7/Core/AstarPath.cs:1279)
0x000001631a8be4b8 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
0x00007ffcfd6d4c2e (mono-2.0-bdwgc) mono_jit_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/mini/mini-runtime.c:3445)
0x00007ffcfd60d254 (mono-2.0-bdwgc) do_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3068)
0x00007ffcfd60d3cc (mono-2.0-bdwgc) mono_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3115)
0x00007ff70fd27214 (Unity) scripting_method_invoke
0x00007ff70fd04e24 (Unity) ScriptingInvocation::Invoke
0x00007ff70fcec5b4 (Unity) MonoBehaviour::CallMethodIfAvailable
0x00007ff70fceaa16 (Unity) MonoBehaviour::AddToManager
0x00007ff70fda75ba (Unity) SerializableManagedRefsUtilities::AwakeInstancesAfterBackupRestoration
0x00007ff70fcef8ff (Unity) MonoManager::FinalizeReload
0x00007ff711100fc5 (Unity) ScriptingInitializer::FinalizeReload
0x00007ff7111760a4 (Unity) ImportOutOfDateAssets
0x00007ff71118001c (Unity) RefreshInternalV2
0x00007ff711187ccc (Unity) StopAssetImportingV2Internal
0x00007ff710c7b923 (Unity) EditorSceneManager::RestoreSceneBackups
0x00007ff71097652a (Unity) PlayerLoopController::EnterPlayMode

Found 1 leak(s) from callstack:
0x00000161d2700c93 (Mono JIT Code) Pathfinding.GlobalNodeStorage:SetThreadCount (int) (at ./Library/PackageCache/com.arongranberg.astar@5.3.7/Core/Pathfinding/GlobalNodeStorage.cs:131)
0x00000161d27005cb (Mono JIT Code) Pathfinding.PathProcessor:SetThreadCount (int,bool) (at ./Library/PackageCache/com.arongranberg.astar@5.3.7/Core/Pathfinding/PathProcessor.cs:102)
0x00000161d06efb7b (Mono JIT Code) AstarPath:InitializePathProcessor () (at ./Library/PackageCache/com.arongranberg.astar@5.3.7/Core/AstarPath.cs:1202)
0x00000161cee4073b (Mono JIT Code) AstarPath:OnEnable () (at ./Library/PackageCache/com.arongranberg.astar@5.3.7/Core/AstarPath.cs:1299)
0x000001631a8be4b8 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
0x00007ffcfd6d4c2e (mono-2.0-bdwgc) mono_jit_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/mini/mini-runtime.c:3445)
0x00007ffcfd60d254 (mono-2.0-bdwgc) do_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3068)
0x00007ffcfd60d3cc (mono-2.0-bdwgc) mono_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3115)
0x00007ff70fd27214 (Unity) scripting_method_invoke
0x00007ff70fd04e24 (Unity) ScriptingInvocation::Invoke
0x00007ff70fcec5b4 (Unity) MonoBehaviour::CallMethodIfAvailable
0x00007ff70fceaa16 (Unity) MonoBehaviour::AddToManager
0x00007ff70fceb62a (Unity) MonoBehaviour::AwakeFromLoad
0x00007ff70fdea77d (Unity) AwakeFromLoadQueue::InvokePersistentManagerAwake
0x00007ff70fdeb751 (Unity) AwakeFromLoadQueue::PersistentManagerSingleQueueAwakeFromLoad
0x00007ff70fdeb3c0 (Unity) AwakeFromLoadQueue::PersistentManagerAwakeFromLoad_NoChecks
0x00007ff70f9e627c (Unity) LoadSceneOperation::CompleteAwakeSequence
0x00007ff70f9e6ea0 (Unity) LoadSceneOperation::CompletePreloadManagerLoadSceneEditor
0x00007ff70f9e7b8e (Unity) LoadSceneOperation::IntegrateMainThread

Found 1 leak(s) from callstack:
0x00000161cee44ac3 (Mono JIT Code) Pathfinding.Collections.HierarchicalBitset:.ctor (int,Unity.Collections.Allocator) (at ./Library/PackageCache/com.arongranberg.astar@5.3.7/Core/Collections/HierarchicalBitset.cs:31)
0x00000161cee40f2b (Mono JIT Code) Pathfinding.HierarchicalGraph:OnEnable () (at ./Library/PackageCache/com.arongranberg.astar@5.3.7/Core/Pathfinding/HierarchicalGraph.cs:176)
0x00000161cee406ab (Mono JIT Code) AstarPath:OnEnable () (at ./Library/PackageCache/com.arongranberg.astar@5.3.7/Core/AstarPath.cs:1279)
0x000001631a8be4b8 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
0x00007ffcfd6d4c2e (mono-2.0-bdwgc) mono_jit_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/mini/mini-runtime.c:3445)
0x00007ffcfd60d254 (mono-2.0-bdwgc) do_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3068)
0x00007ffcfd60d3cc (mono-2.0-bdwgc) mono_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3115)
0x00007ff70fd27214 (Unity) scripting_method_invoke
0x00007ff70fd04e24 (Unity) ScriptingInvocation::Invoke
0x00007ff70fcec5b4 (Unity) MonoBehaviour::CallMethodIfAvailable
0x00007ff70fceaa16 (Unity) MonoBehaviour::AddToManager
0x00007ff70fceb62a (Unity) MonoBehaviour::AwakeFromLoad
0x00007ff70fdea77d (Unity) AwakeFromLoadQueue::InvokePersistentManagerAwake
0x00007ff70fdeb751 (Unity) AwakeFromLoadQueue::PersistentManagerSingleQueueAwakeFromLoad
0x00007ff70fdeb3c0 (Unity) AwakeFromLoadQueue::PersistentManagerAwakeFromLoad_NoChecks
0x00007ff70f9e627c (Unity) LoadSceneOperation::CompleteAwakeSequence
0x00007ff70f9e6ea0 (Unity) LoadSceneOperation::CompletePreloadManagerLoadSceneEditor
0x00007ff70f9e7b8e (Unity) LoadSceneOperation::IntegrateMainThread
0x00007ff70f9eb03e (Unity) PreloadManager::UpdatePreloadingSingleStep

Found 1 leak(s) from callstack:
0x00000161d2700c93 (Mono JIT Code) Pathfinding.GlobalNodeStorage:SetThreadCount (int) (at ./Library/PackageCache/com.arongranberg.astar@5.3.7/Core/Pathfinding/GlobalNodeStorage.cs:131)
0x00000161d27005cb (Mono JIT Code) Pathfinding.PathProcessor:SetThreadCount (int,bool) (at ./Library/PackageCache/com.arongranberg.astar@5.3.7/Core/Pathfinding/PathProcessor.cs:102)
0x00000161d06efb7b (Mono JIT Code) AstarPath:InitializePathProcessor () (at ./Library/PackageCache/com.arongranberg.astar@5.3.7/Core/AstarPath.cs:1202)
0x00000161cee4073b (Mono JIT Code) AstarPath:OnEnable () (at ./Library/PackageCache/com.arongranberg.astar@5.3.7/Core/AstarPath.cs:1299)
0x000001631a8be4b8 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
0x00007ffcfd6d4c2e (mono-2.0-bdwgc) mono_jit_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/mini/mini-runtime.c:3445)
0x00007ffcfd60d254 (mono-2.0-bdwgc) do_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3068)
0x00007ffcfd60d3cc (mono-2.0-bdwgc) mono_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3115)
0x00007ff70fd27214 (Unity) scripting_method_invoke
0x00007ff70fd04e24 (Unity) ScriptingInvocation::Invoke
0x00007ff70fcec5b4 (Unity) MonoBehaviour::CallMethodIfAvailable
0x00007ff70fceaa16 (Unity) MonoBehaviour::AddToManager
0x00007ff70fda75ba (Unity) SerializableManagedRefsUtilities::AwakeInstancesAfterBackupRestoration
0x00007ff70fcef8ff (Unity) MonoManager::FinalizeReload
0x00007ff711100fc5 (Unity) ScriptingInitializer::FinalizeReload
0x00007ff7111760a4 (Unity) ImportOutOfDateAssets
0x00007ff71118001c (Unity) RefreshInternalV2
0x00007ff711187ccc (Unity) StopAssetImportingV2Internal
0x00007ff710c7b923 (Unity) EditorSceneManager::RestoreSceneBackups

Found 1 leak(s) from callstack:
0x00000161d27009a3 (Mono JIT Code) Pathfinding.BinaryHeap:.ctor (int) (at ./Library/PackageCache/com.arongranberg.astar@5.3.7/Core/Collections/BinaryHeap.cs:94)
0x00000161d27007b3 (Mono JIT Code) Pathfinding.PathHandler:.ctor (Pathfinding.GlobalNodeStorage,int,int) (at ./Library/PackageCache/com.arongranberg.astar@5.3.7/Core/Pathfinding/PathHandler.cs:192)
0x00000161d270058b (Mono JIT Code) Pathfinding.PathProcessor:SetThreadCount (int,bool) (at ./Library/PackageCache/com.arongranberg.astar@5.3.7/Core/Pathfinding/PathProcessor.cs:99)
0x00000161d06efb7b (Mono JIT Code) AstarPath:InitializePathProcessor () (at ./Library/PackageCache/com.arongranberg.astar@5.3.7/Core/AstarPath.cs:1202)
0x00000161cee4073b (Mono JIT Code) AstarPath:OnEnable () (at ./Library/PackageCache/com.arongranberg.astar@5.3.7/Core/AstarPath.cs:1299)
0x000001631a8be4b8 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
0x00007ffcfd6d4c2e (mono-2.0-bdwgc) mono_jit_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/mini/mini-runtime.c:3445)
0x00007ffcfd60d254 (mono-2.0-bdwgc) do_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3068)
0x00007ffcfd60d3cc (mono-2.0-bdwgc) mono_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3115)
0x00007ff70fd27214 (Unity) scripting_method_invoke
0x00007ff70fd04e24 (Unity) ScriptingInvocation::Invoke
0x00007ff70fcec5b4 (Unity) MonoBehaviour::CallMethodIfAvailable
0x00007ff70fceaa16 (Unity) MonoBehaviour::AddToManager
0x00007ff70fda75ba (Unity) SerializableManagedRefsUtilities::AwakeInstancesAfterBackupRestoration
0x00007ff70fcef8ff (Unity) MonoManager::FinalizeReload
0x00007ff711100fc5 (Unity) ScriptingInitializer::FinalizeReload
0x00007ff7111760a4 (Unity) ImportOutOfDateAssets
0x00007ff71118001c (Unity) RefreshInternalV2
0x00007ff711187ccc (Unity) StopAssetImportingV2Internal

Found 1 leak(s) from callstack:
0x00000161cee44a43 (Mono JIT Code) Pathfinding.Collections.HierarchicalBitset:.ctor (int,Unity.Collections.Allocator) (at ./Library/PackageCache/com.arongranberg.astar@5.3.7/Core/Collections/HierarchicalBitset.cs:30)
0x00000161cee40f2b (Mono JIT Code) Pathfinding.HierarchicalGraph:OnEnable () (at ./Library/PackageCache/com.arongranberg.astar@5.3.7/Core/Pathfinding/HierarchicalGraph.cs:176)
0x00000161cee406ab (Mono JIT Code) AstarPath:OnEnable () (at ./Library/PackageCache/com.arongranberg.astar@5.3.7/Core/AstarPath.cs:1279)
0x000001631a8be4b8 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
0x00007ffcfd6d4c2e (mono-2.0-bdwgc) mono_jit_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/mini/mini-runtime.c:3445)
0x00007ffcfd60d254 (mono-2.0-bdwgc) do_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3068)
0x00007ffcfd60d3cc (mono-2.0-bdwgc) mono_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3115)
0x00007ff70fd27214 (Unity) scripting_method_invoke
0x00007ff70fd04e24 (Unity) ScriptingInvocation::Invoke
0x00007ff70fcec5b4 (Unity) MonoBehaviour::CallMethodIfAvailable
0x00007ff70fceaa16 (Unity) MonoBehaviour::AddToManager
0x00007ff70fda75ba (Unity) SerializableManagedRefsUtilities::AwakeInstancesAfterBackupRestoration
0x00007ff70fcef8ff (Unity) MonoManager::FinalizeReload
0x00007ff711100fc5 (Unity) ScriptingInitializer::FinalizeReload
0x00007ff7111760a4 (Unity) ImportOutOfDateAssets
0x00007ff71118001c (Unity) RefreshInternalV2
0x00007ff711187ccc (Unity) StopAssetImportingV2Internal
0x00007ff710c7b923 (Unity) EditorSceneManager::RestoreSceneBackups
0x00007ff71097652a (Unity) PlayerLoopController::EnterPlayMode

Found 1 leak(s) from callstack:
0x00000161cee449cb (Mono JIT Code) Pathfinding.Collections.HierarchicalBitset:.ctor (int,Unity.Collections.Allocator) (at ./Library/PackageCache/com.arongranberg.astar@5.3.7/Core/Collections/HierarchicalBitset.cs:29)
0x00000161cee40f2b (Mono JIT Code) Pathfinding.HierarchicalGraph:OnEnable () (at ./Library/PackageCache/com.arongranberg.astar@5.3.7/Core/Pathfinding/HierarchicalGraph.cs:176)
0x00000161cee406ab (Mono JIT Code) AstarPath:OnEnable () (at ./Library/PackageCache/com.arongranberg.astar@5.3.7/Core/AstarPath.cs:1279)
0x000001631a8be4b8 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
0x00007ffcfd6d4c2e (mono-2.0-bdwgc) mono_jit_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/mini/mini-runtime.c:3445)
0x00007ffcfd60d254 (mono-2.0-bdwgc) do_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3068)
0x00007ffcfd60d3cc (mono-2.0-bdwgc) mono_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3115)
0x00007ff70fd27214 (Unity) scripting_method_invoke
0x00007ff70fd04e24 (Unity) ScriptingInvocation::Invoke
0x00007ff70fcec5b4 (Unity) MonoBehaviour::CallMethodIfAvailable
0x00007ff70fceaa16 (Unity) MonoBehaviour::AddToManager
0x00007ff70fceb62a (Unity) MonoBehaviour::AwakeFromLoad
0x00007ff70fdea77d (Unity) AwakeFromLoadQueue::InvokePersistentManagerAwake
0x00007ff70fdeb751 (Unity) AwakeFromLoadQueue::PersistentManagerSingleQueueAwakeFromLoad
0x00007ff70fdeb3c0 (Unity) AwakeFromLoadQueue::PersistentManagerAwakeFromLoad_NoChecks
0x00007ff70f9e627c (Unity) LoadSceneOperation::CompleteAwakeSequence
0x00007ff70f9e6ea0 (Unity) LoadSceneOperation::CompletePreloadManagerLoadSceneEditor
0x00007ff70f9e7b8e (Unity) LoadSceneOperation::IntegrateMainThread
0x00007ff70f9eb03e (Unity) PreloadManager::UpdatePreloadingSingleStep

Found 1 leak(s) from callstack:
0x00000161cee449cb (Mono JIT Code) Pathfinding.Collections.HierarchicalBitset:.ctor (int,Unity.Collections.Allocator) (at ./Library/PackageCache/com.arongranberg.astar@5.3.7/Core/Collections/HierarchicalBitset.cs:29)
0x00000161cee40f2b (Mono JIT Code) Pathfinding.HierarchicalGraph:OnEnable () (at ./Library/PackageCache/com.arongranberg.astar@5.3.7/Core/Pathfinding/HierarchicalGraph.cs:176)
0x00000161cee406ab (Mono JIT Code) AstarPath:OnEnable () (at ./Library/PackageCache/com.arongranberg.astar@5.3.7/Core/AstarPath.cs:1279)
0x000001631a8be4b8 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
0x00007ffcfd6d4c2e (mono-2.0-bdwgc) mono_jit_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/mini/mini-runtime.c:3445)
0x00007ffcfd60d254 (mono-2.0-bdwgc) do_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3068)
0x00007ffcfd60d3cc (mono-2.0-bdwgc) mono_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3115)
0x00007ff70fd27214 (Unity) scripting_method_invoke
0x00007ff70fd04e24 (Unity) ScriptingInvocation::Invoke
0x00007ff70fcec5b4 (Unity) MonoBehaviour::CallMethodIfAvailable
0x00007ff70fceaa16 (Unity) MonoBehaviour::AddToManager
0x00007ff70fda75ba (Unity) SerializableManagedRefsUtilities::AwakeInstancesAfterBackupRestoration
0x00007ff70fcef8ff (Unity) MonoManager::FinalizeReload
0x00007ff711100fc5 (Unity) ScriptingInitializer::FinalizeReload
0x00007ff7111760a4 (Unity) ImportOutOfDateAssets
0x00007ff71118001c (Unity) RefreshInternalV2
0x00007ff711187ccc (Unity) StopAssetImportingV2Internal
0x00007ff710c7b923 (Unity) EditorSceneManager::RestoreSceneBackups
0x00007ff71097652a (Unity) PlayerLoopController::EnterPlayMode

Found 1 leak(s) from callstack:
0x00000161cee44a43 (Mono JIT Code) Pathfinding.Collections.HierarchicalBitset:.ctor (int,Unity.Collections.Allocator) (at ./Library/PackageCache/com.arongranberg.astar@5.3.7/Core/Collections/HierarchicalBitset.cs:30)
0x00000161cee40f2b (Mono JIT Code) Pathfinding.HierarchicalGraph:OnEnable () (at ./Library/PackageCache/com.arongranberg.astar@5.3.7/Core/Pathfinding/HierarchicalGraph.cs:176)
0x00000161cee406ab (Mono JIT Code) AstarPath:OnEnable () (at ./Library/PackageCache/com.arongranberg.astar@5.3.7/Core/AstarPath.cs:1279)
0x000001631a8be4b8 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
0x00007ffcfd6d4c2e (mono-2.0-bdwgc) mono_jit_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/mini/mini-runtime.c:3445)
0x00007ffcfd60d254 (mono-2.0-bdwgc) do_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3068)
0x00007ffcfd60d3cc (mono-2.0-bdwgc) mono_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3115)
0x00007ff70fd27214 (Unity) scripting_method_invoke
0x00007ff70fd04e24 (Unity) ScriptingInvocation::Invoke
0x00007ff70fcec5b4 (Unity) MonoBehaviour::CallMethodIfAvailable
0x00007ff70fceaa16 (Unity) MonoBehaviour::AddToManager
0x00007ff70fceb62a (Unity) MonoBehaviour::AwakeFromLoad
0x00007ff70fdea77d (Unity) AwakeFromLoadQueue::InvokePersistentManagerAwake
0x00007ff70fdeb751 (Unity) AwakeFromLoadQueue::PersistentManagerSingleQueueAwakeFromLoad
0x00007ff70fdeb3c0 (Unity) AwakeFromLoadQueue::PersistentManagerAwakeFromLoad_NoChecks
0x00007ff70f9e627c (Unity) LoadSceneOperation::CompleteAwakeSequence
0x00007ff70f9e6ea0 (Unity) LoadSceneOperation::CompletePreloadManagerLoadSceneEditor
0x00007ff70f9e7b8e (Unity) LoadSceneOperation::IntegrateMainThread
0x00007ff70f9eb03e (Unity) PreloadManager::UpdatePreloadingSingleStep

Hi

Try to upgrade your unity collections package to a more recent version. That should resolve the issue.

It does fix, thank you very much! :smiley: