EDN Admin
Well-known member
I am getting an application crash when closing down an MFC multi-threaded application. The crash appears to be when closing down the MFC debug dll. Here it the call stack:
ole32.dll!NotifyInitializeSpies(int fInitialize, int fPreNotify, unsigned long dwFlags, HRESULT hrInit) Line 1730 C++
ole32.dll!CoUninitialize() Line 2594 C++
mfc100ud.dll!AFX_GLOBAL_DATA::CleanUp() + 0x12e bytes
mfc100ud.dll!AFX_GLOBAL_DATA::~AFX_GLOBAL_DATA() + 0x37 bytes
mfc100ud.dll!__localtime64_s() + 0x3c251 bytes
mfc100ud.dll!__CRT_INIT@12() + 0x254 bytes
mfc100ud.dll!__DllMainCRTStartup@12() + 0x160 bytes
mfc100ud.dll!__DllMainCRTStartup@12() + 0x21 bytes
ntdll.dll!_LdrpCallInitRoutine@16() + 0x14 bytes
ntdll.dll!_LdrShutdownProcess@0() - 0x2ae bytes
ntdll.dll!_RtlExitUserProcess@4() + 0x74 bytes
kernel32.dll!767cbbf7()
msvcr100d.dll!___crtExitProcess() + 0x1b bytes
msvcr100d.dll!___freeCrtMemory() + 0x317 bytes
msvcr100d.dll!_exit() + 0x12 bytes
MyApp.exe!__tmainCRTStartup() Line 568 C
MyApp.exe!wWinMainCRTStartup() Line 371 C
kernel32.dll!@BaseThreadInitThunk@12() + 0x12 bytes
ntdll.dll!___RtlUserThreadStart@8() + 0x27 bytes
ntdll.dll!__RtlUserThreadStart@8() + 0x1b bytes
The actual crash in the debugger says:
Unhandled exception at 0x765d7a19 (ole32.dll) in MyApp.exe: 0xC0000005: Access violation reading location 0xfeeefefe.
The latest source code I can see is in crtexe.c in line 566:
if ( !managedapp ) // line 565
exit(mainret); // line 566
Is it possible to debug further into the MFC DLL ? The debugger is not showing me the source for MFC.
Any ideas how I can pursue what is causing the crash would be welcome.
View the full article
ole32.dll!NotifyInitializeSpies(int fInitialize, int fPreNotify, unsigned long dwFlags, HRESULT hrInit) Line 1730 C++
ole32.dll!CoUninitialize() Line 2594 C++
mfc100ud.dll!AFX_GLOBAL_DATA::CleanUp() + 0x12e bytes
mfc100ud.dll!AFX_GLOBAL_DATA::~AFX_GLOBAL_DATA() + 0x37 bytes
mfc100ud.dll!__localtime64_s() + 0x3c251 bytes
mfc100ud.dll!__CRT_INIT@12() + 0x254 bytes
mfc100ud.dll!__DllMainCRTStartup@12() + 0x160 bytes
mfc100ud.dll!__DllMainCRTStartup@12() + 0x21 bytes
ntdll.dll!_LdrpCallInitRoutine@16() + 0x14 bytes
ntdll.dll!_LdrShutdownProcess@0() - 0x2ae bytes
ntdll.dll!_RtlExitUserProcess@4() + 0x74 bytes
kernel32.dll!767cbbf7()
msvcr100d.dll!___crtExitProcess() + 0x1b bytes
msvcr100d.dll!___freeCrtMemory() + 0x317 bytes
msvcr100d.dll!_exit() + 0x12 bytes
MyApp.exe!__tmainCRTStartup() Line 568 C
MyApp.exe!wWinMainCRTStartup() Line 371 C
kernel32.dll!@BaseThreadInitThunk@12() + 0x12 bytes
ntdll.dll!___RtlUserThreadStart@8() + 0x27 bytes
ntdll.dll!__RtlUserThreadStart@8() + 0x1b bytes
The actual crash in the debugger says:
Unhandled exception at 0x765d7a19 (ole32.dll) in MyApp.exe: 0xC0000005: Access violation reading location 0xfeeefefe.
The latest source code I can see is in crtexe.c in line 566:
if ( !managedapp ) // line 565
exit(mainret); // line 566
Is it possible to debug further into the MFC DLL ? The debugger is not showing me the source for MFC.
Any ideas how I can pursue what is causing the crash would be welcome.
View the full article