A* Pathfinding Project

Possible crashes related to A*


#1

Some of my players are having lots of crashes in my “dungeon” which is procedurally generated and uses Recast Graph to generate the A* navigation mesh on the fly. This crash stack trace seems to be pointing to some methods that A* would use.

Is there something I can do about this?

Native StackTrace:

Thread 0
0 ntdll 0x00007ffaaba7cc14 ZwWaitForMultipleObjects
1 KERNELBASE 0x00007ffaa8ba8027 WaitForMultipleObjectsEx
2 GameAssembly 0x00007ffa2f69352e ?WaitAll_Handle_os_il2cpp__SA_NAEAV?$vector_PEAVHandle_os_il2cpp__V?$allocator_PEAVHandle_os_il2cpp___std___std__H_Z
3 GameAssembly 0x00007ffa2f6a9cb2 ?Wait_internal_WaitHandle_Threading_System_mscorlib_icalls_il2cpp__SAHPEAPEAXH_NH_Z
4 GameAssembly 0x00007ffa30492a1f WaitHandle_WaitMultiple_mAE04CACC2ADB312E42B0DF0E09EAB1744B50441E
5 GameAssembly 0x00007ffa304920b2 WaitHandle_WaitAll_m8D9643F79A9DF33D5EFB0B4F27763EE7B649F7A7
6 GameAssembly 0x00007ffa31853751 U3CRunU3Ed__7_MoveNext_mD9410FD3B8ACDB1CE0B2B34B73329C184E44D5C2_gshared
7 GameAssembly 0x00007ffa2ff571be U3CScanAllTilesU3Ed__50_MoveNext_mEFB4E924A9D253EDC9386B5470217CC1DF5B0BEB
8 GameAssembly 0x00007ffa2ff57d33 U3CScanInternalU3Ed__46_MoveNext_mFF500B3B07F5BCCAB6B4FC29A443E9022B7FF273
9 GameAssembly 0x00007ffa3000441a U3CScanGraphU3Ed__142_MoveNext_mA74F94E46889159DEB1C66E246F5399477300FF1
10 GameAssembly 0x00007ffa30003774 U3CScanAsyncU3Ed__141_MoveNext_m91C7A1E0C489D3DD9E95F3BE3792EF9F7F15BF66
11 GameAssembly 0x00007ffa2fffcc6a AstarPath_Scan_mA03F9DBDCEF4481D3C48DC8564339CFE8145F9CB
12 GameAssembly 0x00007ffa31167299 U3CRebuildLevelU3Ed__91_MoveNext_m0E0EE2117FCF9B84E8EA3B9F66E00AC5945BA00C
13 GameAssembly 0x00007ffa30564dee SetupCoroutine_InvokeMoveNext_m9106BA4E8AE0E794B17F184F1021A53F1D071F31
14 GameAssembly 0x00007ffa2f7ca126 ?RuntimeInvoker_FalseVoid_t22962CB4C05B1D89B55A6E1139F0E87A90987017_RuntimeObject_IntPtr_t__YAPEAXP6AXXZPEBUMethodInfo__PEAXPEAPEAX_Z
15 GameAssembly 0x00007ffa2f6c9dd9 ?Invoke_Runtime_vm_il2cpp__SAPEAUIl2CppObject__PEBUMethodInfo__PEAXPEAPEAXPEAPEAUIl2CppException___Z
16 UnityPlayer 0x00007ffa3e6efa00 ?scripting_method_invoke__YA?AVScriptingObjectPtr__VScriptingMethodPtr__V1_AEAUScriptingArguments__PEAVScriptingExceptionPtr___N_Z
17 UnityPlayer 0x00007ffa3e7000da ?Invoke_ScriptingInvocation__QEAA?AVScriptingObjectPtr__PEAVScriptingExceptionPtr___N_Z
18 UnityPlayer 0x00007ffa3e70953a ?Run_Coroutine__QEAA?AW4CallObjectState__PEA_N_Z
19 UnityPlayer 0x00007ffa3e4b0c6c ?Update_DelayedCallManager__UEAAXH_Z
20 UnityPlayer 0x00007ffa3e5eab37 ?ExecutePlayerLoop__YAXPEAUNativePlayerLoopSystem___Z
21 UnityPlayer 0x00007ffa3e5eabd9 ?ExecutePlayerLoop__YAXPEAUNativePlayerLoopSystem___Z
22 UnityPlayer 0x00007ffa3e5ecbd2 ?PlayerLoop__YAXXZ
23 UnityPlayer 0x00007ffa3e3b53c5 PerformMainLoop
24 UnityPlayer 0x00007ffa3e3b3e3a MainMessageLoop
25 UnityPlayer 0x00007ffa3e3b7fcc ?UnityMainImpl__YAHPEAUHINSTANCE____0PEA_WH_Z
26 UnityPlayer 0x00007ffa3e3bb94b UnityMain
27 GardenPaws 0x00007ff7b9ff11f2 _scrt_common_main_seh
28 KERNEL32 0x00007ffaab497bd4 BaseThreadInitThunk
29 ntdll 0x00007ffaaba4ced1 RtlUserThreadStart
30 ntdll 0x00007ffaaba4ced1 RtlUserThreadStart

Thread 1
0 ntdll 0x00007ffaaba7c144 ZwWaitForSingleObject
1 KERNELBASE 0x00007ffaa8b88ba3 WaitForSingleObjectEx
2 GameAssembly 0x00007ffa2f6932e9 ?Wait_Event_os_il2cpp__QEAA?AW4UnityPalWaitStatus___N_Z
3 GameAssembly 0x00007ffa2f6fd9ce il2cpp::gc::FinalizerThread
4 GameAssembly 0x00007ffa2f691842 ?RunWrapper_Thread_os_il2cpp__CAXPEAX_Z
5 GameAssembly 0x00007ffa2f692e03 il2cpp::os::ThreadStartWrapper
6 KERNEL32 0x00007ffaab497bd4 BaseThreadInitThunk
7 ntdll 0x00007ffaaba4ced1 RtlUserThreadStart
8 ntdll 0x00007ffaaba4ced1 RtlUserThreadStart

Thread 2
0 ntdll 0x00007ffaaba7c144 ZwWaitForSingleObject
1 KERNELBASE 0x00007ffaa8b88ba3 WaitForSingleObjectEx
2 UnityPlayer 0x00007ffa3e5a6015 ?ProcessJobs_JobQueue__AEAAXPEAUThreadInfo_1_PEAX_Z
3 UnityPlayer 0x00007ffa3e5a6fc0 ?WorkLoop_JobQueue__CAPEAXPEAX_Z
4 UnityPlayer 0x00007ffa3e67e688 ?RunThreadWrapper_Thread__CAKPEAX_Z
5 KERNEL32 0x00007ffaab497bd4 BaseThreadInitThunk
6 ntdll 0x00007ffaaba4ced1 RtlUserThreadStart
7 ntdll 0x00007ffaaba4ced1 RtlUserThreadStart

Thread 3
0 ntdll 0x00007ffaaba7c144 ZwWaitForSingleObject
1 KERNELBASE 0x00007ffaa8b88ba3 WaitForSingleObjectEx
2 UnityPlayer 0x00007ffa3e5a6015 ?ProcessJobs_JobQueue__AEAAXPEAUThreadInfo_1_PEAX_Z
3 UnityPlayer 0x00007ffa3e5a6fc0 ?WorkLoop_JobQueue__CAPEAXPEAX_Z
4 UnityPlayer 0x00007ffa3e67e688 ?RunThreadWrapper_Thread__CAKPEAX_Z
5 KERNEL32 0x00007ffaab497bd4 BaseThreadInitThunk
6 ntdll 0x00007ffaaba4ced1 RtlUserThreadStart
7 ntdll 0x00007ffaaba4ced1 RtlUserThreadStart

Thread 4
0 ntdll 0x00007ffaaba7c144 ZwWaitForSingleObject
1 KERNELBASE 0x00007ffaa8b88ba3 WaitForSingleObjectEx
2 UnityPlayer 0x00007ffa3e5a6015 ?ProcessJobs_JobQueue__AEAAXPEAUThreadInfo_1_PEAX_Z
3 UnityPlayer 0x00007ffa3e5a6fc0 ?WorkLoop_JobQueue__CAPEAXPEAX_Z
4 UnityPlayer 0x00007ffa3e67e688 ?RunThreadWrapper_Thread__CAKPEAX_Z
5 KERNEL32 0x00007ffaab497bd4 BaseThreadInitThunk
6 ntdll 0x00007ffaaba4ced1 RtlUserThreadStart
7 ntdll 0x00007ffaaba4ced1 RtlUserThreadStart

Thread 5
0 ntdll 0x00007ffaaba7c144 ZwWaitForSingleObject
1 KERNELBASE 0x00007ffaa8b88ba3 WaitForSingleObjectEx
2 UnityPlayer 0x00007ffa3e5a6015 ?ProcessJobs_JobQueue__AEAAXPEAUThreadInfo_1_PEAX_Z
3 UnityPlayer 0x00007ffa3e5a6fc0 ?WorkLoop_JobQueue__CAPEAXPEAX_Z
4 UnityPlayer 0x00007ffa3e67e688 ?RunThreadWrapper_Thread__CAKPEAX_Z
5 KERNEL32 0x00007ffaab497bd4 BaseThreadInitThunk
6 ntdll 0x00007ffaaba4ced1 RtlUserThreadStart
7 ntdll 0x00007ffaaba4ced1 RtlUserThreadStart

Thread 6
0 ntdll 0x00007ffaaba7c144 ZwWaitForSingleObject
1 KERNELBASE 0x00007ffaa8b88ba3 WaitForSingleObjectEx
2 UnityPlayer 0x00007ffa3e5a6015 ?ProcessJobs_JobQueue__AEAAXPEAUThreadInfo_1_PEAX_Z
3 UnityPlayer 0x00007ffa3e5a6fc0 ?WorkLoop_JobQueue__CAPEAXPEAX_Z
4 UnityPlayer 0x00007ffa3e67e688 ?RunThreadWrapper_Thread__CAKPEAX_Z
5 KERNEL32 0x00007ffaab497bd4 BaseThreadInitThunk
6 ntdll 0x00007ffaaba4ced1 RtlUserThreadStart
7 ntdll 0x00007ffaaba4ced1 RtlUserThreadStart

Thread 7
0 ntdll 0x00007ffaaba7c144 ZwWaitForSingleObject
1 KERNELBASE 0x00007ffaa8b88ba3 WaitForSingleObjectEx
2 UnityPlayer 0x00007ffa3e5a6015 ?ProcessJobs_JobQueue__AEAAXPEAUThreadInfo_1_PEAX_Z
3 UnityPlayer 0x00007ffa3e5a6fc0 ?WorkLoop_JobQueue__CAPEAXPEAX_Z
4 UnityPlayer 0x00007ffa3e67e688 ?RunThreadWrapper_Thread__CAKPEAX_Z
5 KERNEL32 0x00007ffaab497bd4 BaseThreadInitThunk
6 ntdll 0x00007ffaaba4ced1 RtlUserThreadStart
7 ntdll 0x00007ffaaba4ced1 RtlUserThreadStart

Thread 8
0 ntdll 0x00007ffaaba7c144 ZwWaitForSingleObject
1 KERNELBASE 0x00007ffaa8b88ba3 WaitForSingleObjectEx
2 UnityPlayer 0x00007ffa3e5a6015 ?ProcessJobs_JobQueue__AEAAXPEAUThreadInfo_1_PEAX_Z
3 UnityPlayer 0x00007ffa3e5a6fc0 ?WorkLoop_JobQueue__CAPEAXPEAX_Z
4 UnityPlayer 0x00007ffa3e67e688 ?RunThreadWrapper_Thread__CAKPEAX_Z
5 KERNEL32 0x00007ffaab497bd4 BaseThreadInitThunk
6 ntdll 0x00007ffaaba4ced1 RtlUserThreadStart
7 ntdll 0x00007ffaaba4ced1 RtlUserThreadStart

Thread 9
0 ntdll 0x00007ffaaba7c144 ZwWaitForSingleObject
1 KERNELBASE 0x00007ffaa8b88ba3 WaitForSingleObjectEx
2 UnityPlayer 0x00007ffa3e5a6015 ?ProcessJobs_JobQueue__AEAAXPEAUThreadInfo_1_PEAX_Z
3 UnityPlayer 0x00007ffa3e5a6fc0 ?WorkLoop_JobQueue__CAPEAXPEAX_Z
4 UnityPlayer 0x00007ffa3e67e688 ?RunThreadWrapper_Thread__CAKPEAX_Z
5 KERNEL32 0x00007ffaab497bd4 BaseThreadInitThunk
6 ntdll 0x00007ffaaba4ced1 RtlUserThreadStart
7 ntdll 0x00007ffaaba4ced1 RtlUserThreadStart

Thread 10
0 ntdll 0x00007ffaaba7c144 ZwWaitForSingleObject
1 KERNELBASE 0x00007ffaa8b88ba3 WaitForSingleObjectEx
2 UnityPlayer 0x00007ffa3e5a6015 ?ProcessJobs_JobQueue__AEAAXPEAUThreadInfo_1_PEAX_Z
3 UnityPlayer 0x00007ffa3e5a6fc0 ?WorkLoop_JobQueue__CAPEAXPEAX_Z
4 UnityPlayer 0x00007ffa3e67e688 ?RunThreadWrapper_Thread__CAKPEAX_Z
5 KERNEL32 0x00007ffaab497bd4 BaseThreadInitThunk
6 ntdll 0x00007ffaaba4ced1 RtlUserThreadStart
7 ntdll 0x00007ffaaba4ced1 RtlUserThreadStart

Thread 11
0 ntdll 0x00007ffaaba7c144 ZwWaitForSingleObject
1 KERNELBASE 0x00007ffaa8b88ba3 WaitForSingleObjectEx
2 UnityPlayer 0x00007ffa3e5a6015 ?ProcessJobs_JobQueue__AEAAXPEAUThreadInfo_1_PEAX_Z
3 UnityPlayer 0x00007ffa3e5a6fc0 ?WorkLoop_JobQueue__CAPEAXPEAX_Z
4 UnityPlayer 0x00007ffa3e67e688 ?RunThreadWrapper_Thread__CAKPEAX_Z
5 KERNEL32 0x00007ffaab497bd4 BaseThreadInitThunk
6 ntdll 0x00007ffaaba4ced1 RtlUserThreadStart
7 ntdll 0x00007ffaaba4ced1 RtlUserThreadStart

Thread 12
0 ntdll 0x00007ffaaba7c144 ZwWaitForSingleObject
1 KERNELBASE 0x00007ffaa8b88ba3 WaitForSingleObjectEx
2 UnityPlayer 0x00007ffa3e5a6015 ?ProcessJobs_JobQueue__AEAAXPEAUThreadInfo_1_PEAX_Z
3 UnityPlayer 0x00007ffa3e5a6fc0 ?WorkLoop_JobQueue__CAPEAXPEAX_Z
4 UnityPlayer 0x00007ffa3e67e688 ?RunThreadWrapper_Thread__CAKPEAX_Z
5 KERNEL32 0x00007ffaab497bd4 BaseThreadInitThunk
6 ntdll 0x00007ffaaba4ced1 RtlUserThreadStart
7 ntdll 0x00007ffaaba4ced1 RtlUserThreadStart

Thread 13
0 ntdll 0x00007ffaaba7c144 ZwWaitForSingleObject
1 KERNELBASE 0x00007ffaa8b88ba3 WaitForSingleObjectEx
2 UnityPlayer 0x00007ffa3e5a6015 ?ProcessJobs_JobQueue__AEAAXPEAUThreadInfo_1_PEAX_Z
3 UnityPlayer 0x00007ffa3e5a6fc0 ?WorkLoop_JobQueue__CAPEAXPEAX_Z
4 UnityPlayer 0x00007ffa3e67e688 ?RunThreadWrapper_Thread__CAKPEAX_Z
5 KERNEL32 0x00007ffaab497bd4 BaseThreadInitThunk
6 ntdll 0x00007ffaaba4ced1 RtlUserThreadStart
7 ntdll 0x00007ffaaba4ced1 RtlUserThreadStart

Thread 14
0 ntdll 0x00007ffaaba7c144 ZwWaitForSingleObject
1 KERNELBASE 0x00007ffaa8b88ba3 WaitForSingleObjectEx
2 UnityPlayer 0x00007ffa3e5a6015 ?ProcessJobs_JobQueue__AEAAXPEAUThreadInfo_1_PEAX_Z
3 UnityPlayer 0x00007ffa3e5a6fc0 ?WorkLoop_JobQueue__CAPEAXPEAX_Z
4 UnityPlayer 0x00007ffa3e67e688 ?RunThreadWrapper_Thread__CAKPEAX_Z
5 KERNEL32 0x00007ffaab497bd4 BaseThreadInitThunk
6 ntdll 0x00007ffaaba4ced1 RtlUserThreadStart
7 ntdll 0x00007ffaaba4ced1 RtlUserThreadStart

Thread 15
0 ntdll 0x00007ffaaba7c144 ZwWaitForSingleObject
1 KERNELBASE 0x00007ffaa8b88ba3 WaitForSingleObjectEx
2 UnityPlayer 0x00007ffa3e5a6015 ?ProcessJobs_JobQueue__AEAAXPEAUThreadInfo_1_PEAX_Z
3 UnityPlayer 0x00007ffa3e5a6fc0 ?WorkLoop_JobQueue__CAPEAXPEAX_Z
4 UnityPlayer 0x00007ffa3e67e688 ?RunThreadWrapper_Thread__CAKPEAX_Z
5 KERNEL32 0x00007ffaab497bd4 BaseThreadInitThunk
6 ntdll 0x00007ffaaba4ced1 RtlUserThreadStart
7 ntdll 0x00007ffaaba4ced1 RtlUserThreadStart


#2

The rest of the stack is in this pastebin, it was too big to paste here
https://pastebin.com/8KnNwZ5P


#3

Hi

That seems to crash deep into the .net library. It looks like a Unity (or IL2CPP more specifically) bug. I’d report it to Unity.

Can you replicate this with more safety checks (e.g. bounds checking) enabled in your IL2CPP build?


#4

Honestly I can’t even replicate it :frowning: I tried a lot, but it only happens for some players.