Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unhandled exception when application exits

Status
Not open for further replies.

pjc300

Programmer
Aug 5, 2004
1
GB
When the application is exiting in either debug or release mode I am getting an unhandled exception, but i have no clue where to start looking for it (I've picked up the code from someone).

The following stack trial in debug mode is shown below:

NTDLL.DLL!77f75a58()
NTDLL.DLL!77f9cb5e()
NTDLL.DLL!77f83b88()
NTDLL.DLL!77f851ee()
NTDLL.DLL!77f85529()
NTDLL.DLL!77f9d2d3()
NTDLL.DLL!77f852f6()
NTDLL.DLL!77f85529()
NTDLL.DLL!77f9e227()
NTDLL.DLL!77f9d2d3()
NTDLL.DLL!77f9e28f()
NTDLL.DLL!77f85010()
NTDLL.DLL!77f9e28f()
NTDLL.DLL!77f85010()
NTDLL.DLL!77f85529()
NTDLL.DLL!77f85529()
NTDLL.DLL!77f58b37()
NTDLL.DLL!77f939e3()
NTDLL.DLL!77f82c59()
NTDLL.DLL!77f9cf55()
NTDLL.DLL!77f8c366()
NTDLL.DLL!77f8c44a()
NTDLL.DLL!77f8c430()
> msvcr71d.dll!_free_base(void * pBlock=0x00d86d40) Line 103 C
msvcr71d.dll!_free_dbg_lk(void * pUserData=0x00d86d60, int nBlockUse=1) Line 1207 + 0x9 C
msvcr71d.dll!_free_dbg(void * pUserData=0x00d86d60, int nBlockUse=1) Line 1070 + 0xd C
msvcr71d.dll!free(void * pUserData=0x00d86d60) Line 1025 + 0xb C
mfc71d.dll!CAfxStringMgr::Free(ATL::CStringData * pData=0x00d86d60) Line 154 + 0xa C++
mfc71d.dll!ATL::CStringData::Release() Line 99 C++
mfc71d.dll!ATL::CSimpleStringT<wchar_t,1>::~CSimpleStringT<wchar_t,1>() Line 265 C++
mfc71d.dll!ATL::CStringT<wchar_t,StrTraitMFC_DLL<wchar_t,ATL::ChTraitsCRT<wchar_t> > >::~CStringT<wchar_t,StrTraitMFC_DLL<wchar_t,ATL::ChTraitsCRT<wchar_t> > >() Line 963 + 0x8 C++
PKIToolsD.dll!CApplicationProfile::~CApplicationProfile() Line 100 + 0x3f C++
PKIToolsD.dll!$E2() + 0x13 C++
PKIToolsD.dll!_CRT_INIT(void * hDllHandle=0x00310000, unsigned long dwReason=0, void * lpreserved=0x00000001) Line 234 C
PKIToolsD.dll!_DllMainCRTStartup(void * hDllHandle=0x00310000, unsigned long dwReason=0, void * lpreserved=0x00000001) Line 288 + 0x11 C
NTDLL.DLL!77f5b42c()
NTDLL.DLL!77f62864()
NTDLL.DLL!77f59037()
KERNEL32.DLL!77e798cc()
NTDLL.DLL!77f939de()
NTDLL.DLL!77f939e3()
KERNEL32.DLL!77e7a479()
KERNEL32.DLL!77e6c8bf()
NTDLL.DLL!77f59037()
KERNEL32.DLL!77e760cb()
KERNEL32.DLL!77e760de()
mscorwks.dll!7921d079()
mscorwks.dll!791b2f0a()
KERNEL32.DLL!77e7990f()
mscorwks.dll!7921d0eb()
mscorwks.dll!791c6f25()
mscoree.dll!7917d0b8()
KERNEL32.DLL!77e814c7()

The ~CApplicationProfile()is empty.
I believe it may be something to do with the destruction of strings but i don't know where to start looking

Is there any configuration or means in visual studio.NET 2003 where I can get a better idea of the source of the exception.
 
This happened to me once when I was using Winsock and forgetting to call WSACleanup() before the program exited. Since you didn't say what your program was using, I don't know if this kind of thing could apply, but make sure that you aren't initializing something like that without cleaning it up. Then again, that was in a win32 app - in MFC there are more possible causes for this kind of thing and they can be harder to locate.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top