Multithreading related crash

Hi,

I’ve just had a sudden crash to desktop on a build using a* and the log file shows several of these errors:

Path Failed : Computation Time 0.00 ms Searched Nodes 0
Error: Canceled by script (Seeker.CancelCurrentPathRequest)
Path Number 12744 (unique id)
UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogWarning(Object)
AstarPath:LogPathResults(Path)
AstarPath:b__122_1(Path)
Pathfinding.PathProcessor:CalculatePathsThreaded(PathHandler)
Pathfinding.<>c__DisplayClass24_0:<.ctor>b__0()
System.Threading.ThreadHelper:ThreadStart_Context(Object)
System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object)
System.Threading.ThreadHelper:ThreadStart()

(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

It is then followed by these errors which continue for thousands of lines.

d3d11: failed to create buffer (target 0x1 mode 1 size 55977744) [0x8007000E]
d3d11: failed to create buffer (target 0x1 mode 1 size 55977744) [0x8007000E]
d3d11: failed to create buffer (target 0x1 mode 1 size 55977744) [0x8007000E]
d3d11: failed to create buffer (target 0x1 mode 1 size 55977744) [0x8007000E]
d3d11: failed to create buffer (target 0x1 mode 1 size 55977744) [0x8007000E]
d3d11: failed to create buffer (target 0x1 mode 1 size 55977744) [0x8007000E]
d3d11: failed to create buffer (target 0x1 mode 1 size 55977744) [0x8007000E]
d3d11: failed to create buffer (target 0x1 mode 1 size 55977744) [0x8007000E]
d3d11: attempt to lock null buffer
d3d11: attempt to lock null buffer
d3d11: attempt to lock null buffer
d3d11: attempt to lock null buffer
d3d11: attempt to lock null buffer
d3d11: attempt to lock null buffer
d3d11: attempt to lock null buffer
d3d11: attempt to lock null buffer
d3d11: attempt to lock null buffer
d3d11: attempt to lock null buffer
d3d11: attempt to lock null buffer

The file finishes with this stack trace:

========== OUTPUTTING STACK TRACE ==================

0x79AA63DD (UnityPlayer) UnityMain
0x79A9F1E9 (UnityPlayer) UnityMain
0x79A8E9E5 (UnityPlayer) UnityMain
0x79A9D36F (UnityPlayer) UnityMain
0x7A1DFF6E (UnityPlayer) UnityMain
0x7AB315EB (UnityPlayer) UnityMain
0x7ABE98B0 (UnityPlayer) UnityMain
0x7ABE8148 (UnityPlayer) UnityMain
0x7AC3F107 (UnityPlayer) UnityMain
0x7AC3E0F9 (UnityPlayer) UnityMain
0x7AC3F953 (UnityPlayer) UnityMain
0x7AC3EA6E (UnityPlayer) UnityMain
0x7AC40E76 (UnityPlayer) UnityMain
0x7ABE7586 (UnityPlayer) UnityMain
0x7ABEAB84 (UnityPlayer) UnityMain
0x7A1DD13E (UnityPlayer) UnityMain
0x79F0344F (UnityPlayer) UnityMain
0x79F03A77 (UnityPlayer) UnityMain
0x7A1DBDCF (UnityPlayer) UnityMain
0x79FC459E (UnityPlayer) UnityMain
0x79FC71CC (UnityPlayer) UnityMain
ERROR: SymGetSymFromAddr64, GetLastError: ‘Attempt to access invalid address.’ (Address: 79A3F7B8)
0x79A3F7B8 (UnityPlayer) (function-name not available)
ERROR: SymGetSymFromAddr64, GetLastError: ‘Attempt to access invalid address.’ (Address: 79A3E458)
0x79A3E458 (UnityPlayer) (function-name not available)
ERROR: SymGetSymFromAddr64, GetLastError: ‘Attempt to access invalid address.’ (Address: 79A41F80)
0x79A41F80 (UnityPlayer) (function-name not available)
0x79A45235 (UnityPlayer) UnityMain
ERROR: SymGetSymFromAddr64, GetLastError: ‘Attempt to access invalid address.’ (Address: 00F21015)
0x00F21015 (abstract) (function-name not available)
ERROR: SymGetSymFromAddr64, GetLastError: ‘Attempt to access invalid address.’ (Address: 00F211D9)
0x00F211D9 (abstract) (function-name not available)
0x76DA6359 (KERNEL32) BaseThreadInitThunk
0x77967C24 (ntdll) RtlGetAppContainerNamedObjectPath
0x77967BF4 (ntdll) RtlGetAppContainerNamedObjectPath

========== END OF STACKTRACE ===========

A* is the only multithreaded part of my project so it would seem (althought not certain) that something is going wrong with it. Any ideas?

Cheers,

Chris

Update:

Ive found this in the error file which does seem to imply that it’s astars multithreading that caused that crash.

Call Stack for Thread 11836:
0x77971E4C (ntdll) NtWaitForSingleObject
0x790D03D8 (mono-2.0-bdwgc) mono_conc_hashtable_remove
0x7919D388 (mono-2.0-bdwgc) mono_object_hash
0x0C5BF5A0 (mscorlib) System.Threading.Monitor.Monitor_wait()
0x0C5BF368 (mscorlib) System.Threading.Monitor.ObjWait()
0x0C5BF298 (mscorlib) System.Threading.Monitor.Wait()
0x0C5BF1B0 (mscorlib) System.Threading.Monitor.Wait()
0x0C5BE020 (mscorlib) System.Threading.ManualResetEventSlim.Wait()
0x0C5BD928 (mscorlib) System.Threading.ManualResetEventSlim.Wait()
0x0C5BD878 (AstarPathfindingProject) Worker.Run()
0x0C5BD4C1 (mscorlib) System.Threading.ThreadHelper.ThreadStart_Context()
0x0C5BD2AB (mscorlib) System.Threading.ExecutionContext.RunInternal()
0x0C5BD138 (mscorlib) System.Threading.ExecutionContext.Run()
0x0C5BD0A8 (mscorlib) System.Threading.ExecutionContext.Run()
0x0C5BD014 (mscorlib) System.Threading.ThreadHelper.ThreadStart()
0x0C5BCFC1 (mscorlib) System.Object.runtime_invoke_void__this__()
0x791B15EE (mono-2.0-bdwgc) mono_get_runtime_build_info
0x79148E07 (mono-2.0-bdwgc) mono_perfcounters_init
0x7914F78C (mono-2.0-bdwgc) mono_runtime_delegate_invoke
0x7914F6F7 (mono-2.0-bdwgc) mono_runtime_delegate_invoke
0x79165DBD (mono-2.0-bdwgc) mono_threads_set_shutting_down
0x79165B6C (mono-2.0-bdwgc) mono_threads_set_shutting_down
0x76DA6359 (KERNEL32) BaseThreadInitThunk
0x77967C24 (ntdll) RtlGetAppContainerNamedObjectPath
0x77967BF4 (ntdll) RtlGetAppContainerNamedObjectPath

Hi

That looks like a Unity bug. Make sure you are using an up to date version of Unity.