Stacktrace for player crashes

Hi, for some time now (at least since switching to 2018.1, possibly longer) whenever our builds crash they contain a lot of entries that can not be resolved, like in this example:

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

0x00007FFEF87EA388 (KERNELBASE) RaiseException
0x00007FFEC4071158 (mono) set_vprintf_func
0x00007FFEC407117C (mono) set_vprintf_func
0x00007FFEC40A78A1 (mono) mono_gc_out_of_memory
0x00007FFEC40EA8E1 (mono) mono_object_new_alloc_specific
0x00007FFEC40EBD3A (mono) mono_object_new_specific
0x00000218385F0625 (Mono JIT Code) (wrapper managed-to-native) object:__icall_wrapper_mono_object_new_specific (intptr)
0x000002187AE5BC07 (Mono JIT Code) System.Threading.WaitHandle:set_Handle (intptr)
0x000002187AE5B919 (Mono JIT Code) System.Threading.EventWaitHandle:.ctor (bool,System.Threading.EventResetMode)
0x000002187AE5B85B (Mono JIT Code) System.Threading.ManualResetEvent:.ctor (bool)
0x000002187AE5B7E5 (Mono JIT Code) (wrapper remoting-invoke-with-check) System.Threading.ManualResetEvent:.ctor (bool)
0x000002187AE61E67 (Mono JIT Code) ThreadManager/TaskInfo:.ctor (bool)
0x000002187AE61CB3 (Mono JIT Code) ThreadManager:AddSingleTask (ThreadManager/TaskFunctionDelegate,object,ThreadManager/ExitCallbackTask,bool)
0x000002182AD3AD13 (Mono JIT Code) NetConnectionRPC:FlushSendQueue ()
0x000002185016F02D (Mono JIT Code) ConnectionManager:Update ()
0x00000218386035BB (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
0x00007FFEC419668F (mono) mono_set_defaults
0x00007FFEC40E8A95 (mono) mono_runtime_invoke
  ERROR: SymGetSymFromAddr64, GetLastError: 'The specified module could not be found.' (Address: 000002183189EE1A)
  ERROR: SymGetModuleInfo64, GetLastError: 'A dynamic link library (DLL) initialization routine failed.' (Address: 000002183189EE1A)
0x000002183189EE1A ((<unknown>)) (function-name not available)
  ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FFEAE2291A4)
0x00007FFEAE2291A4 (UnityPlayer) (function-name not available)
  ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FFEAE226590)
0x00007FFEAE226590 (UnityPlayer) (function-name not available)
  ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FFEAE20ACC9)
0x00007FFEAE20ACC9 (UnityPlayer) (function-name not available)
  ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FFEAE20AE60)
0x00007FFEAE20AE60 (UnityPlayer) (function-name not available)
  ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FFEADFF3040)
0x00007FFEADFF3040 (UnityPlayer) (function-name not available)
  ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FFEAE115987)
0x00007FFEAE115987 (UnityPlayer) (function-name not available)
  ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FFEAE115A0F)
0x00007FFEAE115A0F (UnityPlayer) (function-name not available)
  ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FFEAE1179E6)
0x00007FFEAE1179E6 (UnityPlayer) (function-name not available)
  ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FFEAE75CB11)
0x00007FFEAE75CB11 (UnityPlayer) (function-name not available)
  ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FFEAE75BC5A)
0x00007FFEAE75BC5A (UnityPlayer) (function-name not available)
  ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FFEAE75E409)
0x00007FFEAE75E409 (UnityPlayer) (function-name not available)
0x00007FFEAE75E59B (UnityPlayer) UnityMain
  ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FF66B491207)
0x00007FF66B491207 (7daystodie) (function-name not available)
0x00007FFEF9793034 (KERNEL32) BaseThreadInitThunk
0x00007FFEFC0B1431 (ntdll) RtlUserThreadStart

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

Is there anything that we can do to make them appear? Like add a missing PDB file? I know in an earlier Unity version Unity itself added some PDB files to the output folder, even on non-development builds, but it does no longer do that and I was wondering if that’s the issue here.

Regards,
Chris

There’s an option “Copy PDB files” in the build window for this. However, you shouldn’t ship your game with the PDB file present in the output folder. In general, stack trace walking in a crashed process is not a reliable process, and you should not depend on it being correct. Instead, you should look at the generated .dmp file. Open that up from Visual Studio, plug in Unity’s symbol server (https://symbolserver.unity3d.com) and you’ll see the correct callstack every time.

Hi,

thanks for your reply :slight_smile:

Yeah, noticed this, but there’s no flag in BuildOptions and I don’t see any other way of setting this by script (we have a custom build pipeline set up so using Unity’s build window is not gonna work for us :wink: ) so anything I’m not aware of to specify this?

Any reason for that other than it possibly not being 100% accurate in the resulting log output?

Yeah, heard about that one :slight_smile:
Not using MSVS though but rather JetBrains Rider and it seems that they don’t support post-mortem analysis of those dumps (yet?). Would be nice to have a non-VS solution for looking at those.

Regards,
Chris

They’re huge and increase build size for no good reason. And they make it much easier to reverse engineer your game.

There are many tools that are able to open and analyze .dmp files. For instance, you can use WinDBG which is pretty small.

Huge: 40 MiB compared to the > 4 GiB we are at I doubt that would be a real issue :wink:
As for the reverse engineering: Seems like the major issue here at hand is the UnityPlayer* and WindowsPlayer* PDB in the base folder of the output. Those aren’t related to the game anyway. Adding those two definitely helped with the traces :slight_smile:

On the contrary, actually. UnityPlayer.dll is what runs the game. It’s the engine.

Ultimately, it’s your choice whether to ship the PDB or not. I wouldn’t do it myself.

Oh, yeah, very unprecise wording there :slight_smile:
What I meant was that it’s not our code but generic Unity code (or more exactly its debugging symbols) that everyone can download freely anyway. We’re not giving away any details of our own IP.
Though with the .NET assemblies it’s not like it makes a lot of difference to ship the according debugging symbols of your own code either. People read and modify that code anyway (luckily mostly for modding :slight_smile: ).

Hey sorry to revive, but is there a manual for this? “plug in Unity’s symbol server”

nvm, this works for me, the WinDbg one