You are not logged in.

1

Wednesday, April 23rd 2008, 6:24am

Access violation. Is this a resource or memory leak?

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?

2

Wednesday, April 23rd 2008, 9:39am

seems like you free/deleted something that you shouldn't.
maybe build up your application from scratch to find out what happens: start by commenting out everything, then add items one at a time
madinsjamania