Sign in to follow this  
raccoonone

nomemory.cpp?

Recommended Posts

Heap corruption detected at 08E51FE8
First-chance exception at 0x7c92a1e1 in Alpha 0.3 - Client.exe: 0xC0000005: Access violation reading location 0x00000000.
First-chance exception at 0x7c81eb33 in Alpha 0.3 - Client.exe: Microsoft C++ exception: std::bad_alloc @ 0x090dfc9c.
Unhandled exception at 0x7c81eb33 in Alpha 0.3 - Client.exe: Microsoft C++ exception: std::bad_alloc @ 0x090dfc9c.

I keep getting this run-time error. I'm writting a client/server game, and it happens to the client after a second player has been on the screen for 10-15secs. I'm assuming it's because I'm allocating memory dynamicly, and then not freeing it up. But I've looked over my code and can't figure it out. When I open Task Manager, it doesn't show that the ammount of free memory is going down. Any suggestions as to how I can track this down?

Share this post


Link to post
Share on other sites
The key to your problem is this: "Heap corruption detected at 08E51FE8". Heap corruption can occur when you allocate a certain amount of memory and then write values outside of that allocated memory. Something like this:

p = new int[1000];
p[-1] = 0; // bad
p[1000] = 0; // bad

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this