0

I have a Windows MFC application that is crashing on launch on a customer's Windows Server OS. The application runs fine on our Windows 10 workstations and Windows Server 2019 test OS. I have a crash dump and loaded the debug symbols but all I get is this call stack:

MyApp.exe!abort() Line 77
    at minkernel\crts\ucrt\src\appcrt\startup\abort.cpp(77)
MyApp.exe!terminate() Line 58
    at minkernel\crts\ucrt\src\appcrt\misc\terminate.cpp(58)
[External Code]

The exception is Unhandled exception at 0x008EAE83 (MyApp.exe) in MyApp.exe.9156.dmp: Fatal program exit requested.

Event viewer gives an application exception error code 0xc0000409 or STATUS_STACK_BUFFER_OVERRUN. But apparently, this can be called even though it's not actually a stack buffer overrun.

The weird thing is, if we insert AfxMessageBox() at the start of the app - CMainFrame::OnCreate() then it doesn’t crash and it launches fine.

There is an existing binary built using VS2008 or VS2013 with the same code that launches fine. We are unable to recreate that build from source code though.

DLT
  • 139
  • 8
  • 1
    I would suggest to use `::OutputDebugString()` instead of `AfxMessageBox()` for debugging; you can log from multiple places to narrow down a failure point. If that also "fixes" the issue - you most likely have a UB that manifested itself differently on that system. – Vlad Feinstein Jan 25 '22 at 23:47
  • What about remote debugging? As the alternative running release with DebugView https://learn.microsoft.com/en-us/sysinternals/downloads/debugview. It will output OutputDebugString running under administrative privilege and Capture Kernel ticked (Capture menu). – JohnCz Jan 27 '22 at 15:37

0 Answers0