Unhandled Exception at 0xccccccc8 When Closing Visual Studio Applications

by John Ryding

I was running into this error whenever I tried to close a Visual Studio C++ application I was developing.  It said the following whenever I closed it:

Unhandled exception at <MEMORY ADDRESS> in <APP NAME>.exe: 0xC0000005: Access violation reading location 0xccccccc8

What this exception is telling you is that you have uninitialized variables in your application whose memory address you are trying to manipulate.  My problem was that I was trying to delete a pointer that was never being initialized.

To fix this, you will have to being debugging you application, then hit Alt+F7 to view the call trace in Visual Studio.  Looking through it, you should see the point in your app where things go awry, probably something that involves the value of 0xcccccccc.  Whenever you see either memory address of 0xcccccccc or 0xccccccc8, it is VS’s way of telling you that you have an uninitialized variable being used.

For further help with this problem, consult the two following links (the first helped me best):

http://www.gamedev.net/community/forums/topic.asp?topic_id=505687

http://seek42.net/phpBB3/viewtopic.php?f=13&t=9764&p=99420