Recently, I regularly encounter errors like
"An unhandled exception of type 'System.StackOverflowException' occurred in the Unknown module."
This happens in a game (which I developed) with a fairly large code base (C # / XNA). But usually an error occurs only after a few minutes of gameplay (and not in every run).
The problem is that, unfortunately, the Visual Studio debugger does not seem to be able to localize the problem and just allows me to check the assembler code without reference to my source lines. How can I debug such an error? I think tools like Valgrind are not available in C #. Maybe the best debugger can show me where the problem is localized in the source code?
The call stack is available by applying the steps in the proposed answer below. It:
ntdll.dll!_NtWaitForSingleObject@12 () + 0x15 bytes ntdll.dll!_NtWaitForSingleObject@12 () + 0x15 bytes KernelBase.dll!_WaitForSingleObjectEx@12 () + 0xcb bytes kernel32.dll!_WaitForSingleObjectExImplementation@12 () + 0x43 bytes clr.dll!CLREvent::CreateManualEvent() - 0x15f3bb bytes clr.dll!CLREvent::CreateManualEvent() - 0x15f37a bytes clr.dll!CLREvent::WaitEx() + 0x47 bytes clr.dll!CLREvent::Wait() + 0x19 bytes clr.dll!Thread::WaitSuspendEventsHelper() + 0xa8 bytes clr.dll!Thread::WaitSuspendEvents() + 0x17 bytes clr.dll!Thread::RareEnablePreemptiveGC() + 0x181977 bytes clr.dll!Thread::RareDisablePreemptiveGC() + 0x38e3 bytes clr.dll!Debugger::SendException() + 0x12b bytes clr.dll!Debugger::LastChanceManagedException() + 0x19f bytes clr.dll!NotifyDebuggerLastChance() + 0x79 bytes clr.dll!WatsonLastChance() + 0x166 bytes clr.dll!EEPolicy::HandleFatalStackOverflow() + 0x189 bytes clr.dll!EEPolicy::HandleStackOverflow() + 0xd8 bytes clr.dll!_COMPlusFrameHandler() + 0xff302 bytes ntdll.dll!ExecuteHandler2@20 () + 0x26 bytes ntdll.dll!ExecuteHandler@20 () + 0x24 bytes ntdll.dll!_RtlDispatchException@8 () + 0xd3 bytes ntdll.dll!_KiUserExceptionDispatcher@8 () + 0xf bytes clr.dll!SystemNative::ArrayCopy() + 0x19 bytes mscorlib.ni.dll!6ed326a2() Frames below may be incorrect and/or missing, no symbols loaded for mscorlib.ni.dll
ares_games
source share