Hi,
we area playing around with the new Beta versions which support Burst compiler. On PC everything runs fine, but when we build for Nintendo Switch we get the following error:
InvalidOperationException: A job tries to read from the native array JobCheckCollisions.collisionResult which contains uninitialized data
at Pathfinding.Jobs.JobDependencyAnalyzer1[T].GetDependencies (T& data, Pathfinding.Jobs.JobDependencyTracker tracker, Unity.Jobs.JobHandle additionalDependency, System.Boolean useAdditionalDependency) [0x00000] in <00000000000000000000000000000000>:0
at Pathfinding.Jobs.JobDependencyAnalyzer1[T].GetDependencies (T& data, Pathfinding.Jobs.JobDependencyTracker tracker) [0x00000] in <00000000000000000000000000000000>:0
at Pathfinding.Jobs.IJobExtensions.ScheduleManagedInMainThread[T] (T data, Pathfinding.Jobs.JobDependencyTracker tracker) [0x00000] in <00000000000000000000000000000000>:0
at Pathfinding.GridGraph+GridGraphScanData.CollisionCheck (Pathfinding.GraphCollision collision) [0x00000] in <00000000000000000000000000000000>:0
at Pathfinding.GridGraph+<UpdateAreaBurstCoroutine>d103.MoveNext () [0x00000] in <00000000000000000000000000000000>:0
at Pathfinding.Jobs.JobHandleWithMainThreadWork+<CompleteTimeSliced>d6.MoveNext () [0x00000] in <00000000000000000000000000000000>:0
at Pathfinding.GridGraph+<ScanInternalBurst>d98.MoveNext () [0x00000] in <00000000000000000000000000000000>:0
at Pathfinding.GridGraph+<ScanInternal>d106.MoveNext () [0x00000] in <00000000000000000000000000000000>:0
at AstarPath+<ScanGraph>d142.MoveNext () [0x00000] in <00000000000000000000000000000000>:0
at AstarPath+<ScanInternal>d141.MoveNext () [0x00000] in <00000000000000000000000000000000>:0
at GraphUpdateManager+<ScanGraphs>d__7.MoveNext () [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) [0x00000] in <00000000000000000000000000000000>:0
I also looked into the code, however i can’t seem to find the “branch” between PC and Switch. We have other Jobs running fine in our game (however not as complicated as the A* Project ones). I thought it might have to do with the UninitializedMemory option somehow? Maybe on Switch they are “even more” uninitialized?
Would love a fix or at least an idea on how to fix this.
Thanks & Best regards
Bennet