Memory Leak v4.3.76

Current Version Information

  • A* version: 5.3.1 (installed via Package Manager)
  • Unity version: 2022.3.55f1 LTS
  • Burst version: 1.8.19

Previous Version Information (a.k.a what I updated from)

  • A* version: 5.0.3 (installed via Scoped Registry)
  • Unity version: 2022.3.55f1 LTS
  • Burst version: 1.8.18

Hello! Got two errors after upgrading A* and Burst to the versions specified above! Also it threw the leak notification as well on the update. I also listed the previous versions that I updated from above as well.

Leak Notification

Leak Detected : Persistent allocates 1 individual allocations. To find out more please enable ‘Preferences > Jobs > Leak Detection Level > Enabled With Stack Trace’ and reproduce the leak again.

First Error

System.IndexOutOfRangeException: Index -1 is out of range of ‘64’ Length.
This Exception was thrown from a job compiled with Burst, which has limited exception support.
0x00007ffe56b2a94e (3067f78bff826081d754c721f356cd0) burst_Abort_Trampoline
0x00007ffe56b0c599 (3067f78bff826081d754c721f356cd0) Unity.Collections.NativeArray1<Unity.Mathematics.float3>.FailOutOfRangeError (at C:/Development/Personal Projects/Pantheon/Surreal-Game/Surreal Game/Library/PackageCache/com.unity.burst@1.8.19/.Runtime/unknown/unknown:0) 0x00007ffe56b0a7be (3067f78bff826081d754c721f356cd0) Pathfinding.RVO.JobRVOCalculateNeighbours1<Pathfinding.RVO.XZMovementPlane>.CalculateNeighbours (at C:/Development/Personal Projects/Pantheon/Surreal-Game/Surreal Game/Library/PackageCache/com.unity.burst@1.8.19/.Runtime/Packages/com.arongranberg.astar/Core/RVO/RVOAgentBurst.cs:412)
0x00007ffe56b09f50 (3067f78bff826081d754c721f356cd0) Pathfinding.Jobs.JobParallelForBatchedExtensions.ParallelForBatchJobStruct1<Pathfinding.RVO.JobRVOCalculateNeighbours1<Pathfinding.RVO.XZMovementPlane>>.Execute(ref Pathfinding.RVO.JobRVOCalculateNeighbours`1<Pathfinding.RVO.XZMovementPlane> jobData, System.IntPtr additionalPtr, System.IntPtr bufferRangePatchData, ref Unity.Jobs.LowLevel.Unsafe.JobRanges ranges, int jobIndex) → void_e5e8763e8ef4e72b2ea137a8bdfe63c2 from AstarPathfindingProject, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null (at C:/Development/Personal Projects/Pantheon/Surreal-Game/Surreal Game/Library/PackageCache/com.unity.burst@1.8.19/.Runtime/Packages/com.arongranberg.astar/Utilities/IJobParallelForBatched.cs:42)
0x00007ffe56b098dd (3067f78bff826081d754c721f356cd0) 378830c622707226f05192ad7eebcc24
0x00007ff689f292c2 (Unity) ExecuteJob
0x00007ff689f29634 (Unity) ExecuteJobCopyData
0x00007ff689f2a36f (Unity) ForwardJobForEachToManaged
0x00007ff689f266ed (Unity) ujob_execute_job
0x00007ff689f258dd (Unity) lane_guts
0x00007ff689f28544 (Unity) worker_thread_routine
0x00007ff68a15609b (Unity) Thread::RunThreadWrapper
0x00007fff1dc2259d (KERNEL32) BaseThreadInitThunk
0x00007fff1fc6af38 (ntdll) RtlUserThreadStart

Second Error

System.IndexOutOfRangeException: Index -1 is out of range of ‘64’ Length.
This Exception was thrown from a job compiled with Burst, which has limited exception support.
0x00007ffe56b2a94e (3067f78bff826081d754c721f356cd0) burst_Abort_Trampoline
0x00007ffe56b0c599 (3067f78bff826081d754c721f356cd0) Unity.Collections.NativeArray1<Unity.Mathematics.float3>.FailOutOfRangeError (at C:/Development/Personal Projects/Pantheon/Surreal-Game/Surreal Game/Library/PackageCache/com.unity.burst@1.8.19/.Runtime/unknown/unknown:0) 0x00007ffe56b0a7be (3067f78bff826081d754c721f356cd0) Pathfinding.RVO.JobRVOCalculateNeighbours1<Pathfinding.RVO.XZMovementPlane>.CalculateNeighbours (at C:/Development/Personal Projects/Pantheon/Surreal-Game/Surreal Game/Library/PackageCache/com.unity.burst@1.8.19/.Runtime/Packages/com.arongranberg.astar/Core/RVO/RVOAgentBurst.cs:412)
0x00007ffe56b09f50 (3067f78bff826081d754c721f356cd0) Pathfinding.Jobs.JobParallelForBatchedExtensions.ParallelForBatchJobStruct1<Pathfinding.RVO.JobRVOCalculateNeighbours1<Pathfinding.RVO.XZMovementPlane>>.Execute(ref Pathfinding.RVO.JobRVOCalculateNeighbours1<Pathfinding.RVO.XZMovementPlane> jobData, System.IntPtr additionalPtr, System.IntPtr bufferRangePatchData, ref Unity.Jobs.LowLevel.Unsafe.JobRanges ranges, int jobIndex) -> void_e5e8763e8ef4e72b2ea137a8bdfe63c2 from AstarPathfindingProject, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null (at C:/Development/Personal Projects/Pantheon/Surreal-Game/Surreal Game/Library/PackageCache/com.unity.burst@1.8.19/.Runtime/Packages/com.arongranberg.astar/Utilities/IJobParallelForBatched.cs:42) 0x00007ffe56b098dd (3067f78bff826081d754c721f356cd0) 378830c622707226f05192ad7eebcc24 0x00007ff689f292c2 (Unity) ExecuteJob 0x00007ff689f29634 (Unity) ExecuteJobCopyData 0x00007ff689f2a36f (Unity) ForwardJobForEachToManaged 0x00007ff689f266ed (Unity) ujob_execute_job 0x00007ff689f258dd (Unity) lane_guts 0x00007ff689f27ec2 (Unity) ujob_wait_for 0x00007ff689f221e7 (Unity) CompleteFenceInternal 0x00007ff68940ccff (Unity) JobHandle_CUSTOM_ScheduleBatchedJobsAndComplete 0x00000215e96bf15a (Mono JIT Code) (wrapper managed-to-native) Unity.Jobs.JobHandle:ScheduleBatchedJobsAndComplete (Unity.Jobs.JobHandle&) 0x00000215475c31bb (Mono JIT Code) Unity.Jobs.JobHandle:Complete () 0x00000215e9a591a3 (Mono JIT Code) Pathfinding.RVO.RVOSimulator:Update () (at ./Packages/com.arongranberg.astar/RVO/RVOSimulator.cs:154) 0x000002172cce1b18 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr) 0x00007ffe560d4c7e (mono-2.0-bdwgc) mono_jit_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/mini/mini-runtime.c:3445) 0x00007ffe5600d284 (mono-2.0-bdwgc) do_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3068) 0x00007ffe5600d3fc (mono-2.0-bdwgc) mono_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3115) 0x00007ff68a30a8d4 (Unity) scripting_method_invoke 0x00007ff68a2e71f4 (Unity) ScriptingInvocation::Invoke 0x00007ff68a2ce964 (Unity) MonoBehaviour::CallMethodIfAvailable 0x00007ff68a2cea9a (Unity) MonoBehaviour::CallUpdateMethod 0x00007ff689d6034b (Unity) BaseBehaviourManager::CommonUpdate<BehaviourManager> 0x00007ff689d676ca (Unity) BehaviourManager::Update 0x00007ff689f9d9cd (Unity) InitPlayerLoopCallbacks’::`2’::UpdateScriptRunBehaviourUpdateRegistrator::Forward
0x00007ff689f7d25c (Unity) ExecutePlayerLoop
0x00007ff689f7d3d0 (Unity) ExecutePlayerLoop
0x00007ff689f83985 (Unity) PlayerLoop
0x00007ff68af61edf (Unity) PlayerLoopController::InternalUpdateScene
0x00007ff68af6effd (Unity) PlayerLoopController::UpdateSceneIfNeededFromMainLoop
0x00007ff68af6d291 (Unity) Application::TickTimer
0x00007ff68b3f058a (Unity) MainMessageLoop
0x00007ff68b3f5924 (Unity) WinMain
0x00007ff68c7c003e (Unity) __scrt_common_main_seh
0x00007fff1dc2259d (KERNEL32) BaseThreadInitThunk
0x00007fff1fc6af38 (ntdll) RtlUserThreadStart

If you haven’t already, try deleting your current installation and reimporting it :+1: Namely because 5.2.2 was a version that required a full reimport.

1 Like

Hi

Would it be possible for you to disable the burst compiler and try again? That might produce some more detailed stack traces.

Hi

I have managed to replicate this. A fix will be included in the next update.

1 Like

Hi! Sorry for the delay! Do you still need any more information from me regarding the issue?

1 Like

You should be good, thanks! Aron was able to reproduce this and found a fix :+1: Thanks anyways :slight_smile: