When I try to exit my Qt application in Visual Studio 2005, I encounter the following error:
Unhandled exception at 0x67076a25 in myapp.exe: 0xC0000005: Access violation writing location 0x00000063.
After breaking, crt0dat.c file opens up and my application breaks in a function called void __cdecl __freeCrtMemory() along this line inside the function:
if (onexitbegin) {
while ( --onexitend >= onexitbegin )
/*
* if current table entry is non-NULL,
* call thru it.
*/
if ( *onexitend != NULL && *onexitend != _encoded_null())
(*(_PVFV)_decode_pointer(*onexitend))();
}
Now, in output window, it says First-chance exception at 0x67076a25 in myapplication.exe: 0xC0000005: Access violation writing location 0x00000063.
After this, I have to stop debugging because my application cannot continue anymore without breaking.
What could possibly be wrong here? Is this a memory leak in my application or something else? What are your suggestions in fixing this?