Memory leak when upgrading to 5.2.4 (from 4.2.18)

After clicking the “remind me in a week button” for a couple years I finally bit the bullet. Getting these messages from Unity (though the components seem to working still)

Found 1 leak(s) from callstack:
0x0000016c2e874eb3 (Mono JIT Code) Pathfinding.BinaryHeap:.ctor (int) (at ./Packages/com.arongranberg.astar/Core/Collections/BinaryHeap.cs:90)
0x0000016c2e874a93 (Mono JIT Code) Pathfinding.PathHandler:.ctor (Pathfinding.GlobalNodeStorage,int,int) (at ./Packages/com.arongranberg.astar/Core/Pathfinding/PathHandler.cs:191)
0x0000016c2e874753 (Mono JIT Code) Pathfinding.PathProcessor:SetThreadCount (int,bool) (at ./Packages/com.arongranberg.astar/Core/Pathfinding/PathProcessor.cs:99)
0x0000016c2e87266b (Mono JIT Code) AstarPath:InitializePathProcessor () (at ./Packages/com.arongranberg.astar/Core/AstarPath.cs:1201)
0x0000016c2e7a8dcb (Mono JIT Code) AstarPath:OnEnable () (at ./Packages/com.arongranberg.astar/Core/AstarPath.cs:1294)
0x0000016cd5235788 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
0x00007ff9fabf4c2e (mono-2.0-bdwgc) mono_jit_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/mini/mini-runtime.c:3445)
0x00007ff9fab2d254 (mono-2.0-bdwgc) do_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3068)
0x00007ff9fab2d3cc (mono-2.0-bdwgc) mono_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3115)
0x00007ff67ae86d14 (Unity) scripting_method_invoke

This is unity 2022.4.45f1

Hi

This is a bug in the unity collections package. Try updating to a newer version of that package.

Fixed my issue upgrading to collections package to 2.5.1.

(I hadn’t noticed these (optional?) updates before in the package manager - usually there is a little “up arrow” icon.)

Thanks for the quick response!

1 Like