2

I have a .NET WinForms application that is exiting with STATUS_STACK_BUFFER_OVERRUN (0xc0000409). If I am debugging with Visual Studio is it possible to break when the error occurs? In the Exception Settings window I have selected all Win32 exceptions, including the 'All Win32 Exceptions not on this list' entry. However, if I force the problem, using the method in this answer, the application still just exits without breaking into the debugger.

As I cannot reproduce the bug I need a good way to capture information when it does occur. If I cannot break into the debugger then are there other tools I can use? (This has been asked in this question but there were no real answers, although one suggested that the debugger should work).

Here is some context for the question.

  • This fault has been happening at random for many months, with no clear pattern and only infrequently (every week or so). The application has logging, with UnhandledException reporting, but as this answer explains that is all bypassed and the program terminates immediately for STATUS_STACK_BUFFER_OVERRUN.
  • The fault is recorded in the Windows Application log. This shows the exception code and also that it always occurs at the same offset (0x000000000006db9e) within ucrtbase.dll. Presumably this is the part of the CRT that implements the stack buffer overflow detection.
Nick Betts
  • 143
  • 1
  • 6

0 Answers0