Please enable JavaScript to view this site.

Memory Validator Help

Navigation: Examples

Finding crashes due to deleted objects

Scroll Prev Top Next More


Access violations


Often crashes are caused by an Access Violation Exception.


This occurs when the program tries to access memory that is no longer valid, as in the following examples:


For each case we need to know the address that we are interested in querying.


accessing memory that has been freed and released by the virtual memory manager

This memory address is the one we are interested in.


accessing memory through a bad pointer held by an object that's since been deleted


The address of the object or data structure that held that pointer is the one we are interested in.


calling a function on an object that has been deleted


The address of the object is the one we are interested in.


Note, this case won't crash if all the following are true:

othe function is not virtual

othe function accessed no data members of the object

othe function calls no functions on the object that are virtual



Analysis Window


Knowing the address, we can use the analysis view and the Find Memory dialog to search for the allocation, reallocation and deallocation locations of the memory.


In the case of that memory then being re-used in an allocation for another object we can find that the analysis window and spot cases of code accessing one object when in reality it is accessing a completely different object in a re-used memory space.


The process is identical to the way we found objects using an address in the example of finding uninitialised memory.



Searching for Memory Allocations


Knowing the address, we can also use the query address dialog to find memory allocations with the specified address.


A description of this is in the example of finding memory corruptions.


The query address dialog can find all memory locations that contain pointers to the memory allocations and all memory locations that are pointed to by pointers in the memory allocations.