Missing several functions name in Windows debug callstack

I want to know how appropriate investigate crashes in Unity.

  1. Why my callstack is missing part of functions?
    4 lines at the top.

  2. How to find line of C# code or script function name which exactly cause crash?

Callstack:

>    0000012d79760da3()    Unknown
     0000012d7973ff63()    Unknown
     0000012d7973e63b()    Unknown
     0000012c42af3398()    Unknown
     mono-2.0-bdwgc.dll!mono_jit_runtime_invoke(_MonoMethod * method, void * obj, void * * params, _MonoObject * * exc, _MonoError * error) Line 2809    C
     mono-2.0-bdwgc.dll!do_runtime_invoke(_MonoMethod * method, void * obj, void * * params, _MonoObject * * exc, _MonoError * error) Line 2921    C
     [Inline Frame] mono-2.0-bdwgc.dll!mono_runtime_try_invoke(_MonoMethod *) Line 3026    C
     mono-2.0-bdwgc.dll!mono_runtime_invoke(_MonoMethod * method, void * obj, void * * params, _MonoObject * * exc) Line 2968    C
     UnityPlayer.dll!scripting_method_invoke(ScriptingMethodPtr method, ScriptingObjectPtr object, ScriptingArguments & arguments, ScriptingExceptionPtr * exception, bool convertArgs) Line 642    C++
     UnityPlayer.dll!ScriptingInvocation::Invoke(ScriptingExceptionPtr * exception, bool convertArguments) Line 273    C++
     UnityPlayer.dll!MonoBehaviour::InvokeMethodOrCoroutineChecked(ScriptingMethodPtr scriptingMethod, ScriptingObjectPtr value, ScriptingExceptionPtr * exception) Line 852    C++
     UnityPlayer.dll!MonoBehaviour::InvokeMethodOrCoroutineChecked(ScriptingMethodPtr method, ScriptingObjectPtr value) Line 864    C++
     UnityPlayer.dll!MonoBehaviour::smile:elayedStartCall(Object * o, void * userData) Line 1237    C++
     UnityPlayer.dll!DelayedCallManager::Update(int modeMask) Line 182    C++
     UnityPlayer.dll!`InitPlayerLoopCallbacks'::`2'::EarlyUpdateScriptRunDelayedStartupFrameRegistrator::Forward() Line 1472    C++
     UnityPlayer.dll!ExecutePlayerLoop(NativePlayerLoopSystem * system) Line 352    C++
     UnityPlayer.dll!ExecutePlayerLoop(NativePlayerLoopSystem * system) Line 369    C++
     UnityPlayer.dll!PlayerLoop() Line 441    C++
     UnityPlayer.dll!PerformMainLoop() Line 220    C++
     UnityPlayer.dll!MainMessageLoop() Line 1101    C++
     UnityPlayer.dll!UnityMainImpl(HINSTANCE__ * hInst, HINSTANCE__ * hPrev, wchar_t * szCmdLine, int nCmdShow) Line 1618    C++
     UnityPlayer.dll!UnityMain(HINSTANCE__ * hInst, HINSTANCE__ * hPrev, wchar_t * szCmdLine, int nCmdShow) Line 1658    C++
     [External Code]

Details:

Here is my pdb files settings in Visual Studio.
Unity symbol server is included.
Also included pdb files produced by build of tested project.

Thank you!

First lines must be missing debug information, probably because this is code inside Mono or Unity C++ or as implied by the naming methods that were runtime-compiled.

What you need to do here is look at the first line from the top of the callstack that refers to code that you wrote. If none of that matches your code it’ll be more difficult to track down. It seems to be related to coroutines so I’d start checking that.

Also, does this happen every time? every platform? in editor or only in builds?

1 Like

The callstacks that just have addresses in them generally are C# stack frames. Native debuggers like Visual Studio are unable to decode Mono stackframes. What you can do, however, is double click on any frame that is part of “mono-2.0-bdwgc.dll” and then type “mono_pmip(0000012d79760da3)” into the watch window (the address is taken directly from the callstack window). It should print out what C# method that maps to.

Also, are you sure that is a crash? Crashes originating from C# code are extremely rare. What happens if you try to continue past the exception in the debugger?

2 Likes

Every time. Windows player. Thanks.

Thank you very much.
Thanks to your comment I found appropriate sector of documentation here:
https://docs.unity3d.com/Manual/WindowsDebugging.html

Thanks to you I found method name.

Do you know what this numeric values means?:
8205087--1070715--upload_2022-6-14_19-48-10.png
Is there info about particular line number anywhere?
Thank you!

I suspect:

  1. Pointer to “MethodInfo” struct, holding information about method metadata
  2. That’s “instructionPointer - 3?” (0x1B45558C - 0x1B4553A8 = 0x1E4). It’s number of bytes that the address you passed in is from the beginning of the function.
  3. Starting address of the function
  4. Ending address of the function
  5. Pointer to “MonoDomain” struct, holding information about the current app domain.

Not sure if there’s a way to get the exact line number. Is this a development build?

1 Like

Yes.
Thank you for all info!

No problem it is resolved.
Not adequate parameters were sent to Camera and crash was going from shadows processing.

So in case of this test 1 of 2 had be done:

  1. Stop sending not adequate parameters to camera.
  2. Either disable shadows for all quality levels.

Thank you for all info!