Sign in to follow this  

Memory errors I don't understand

This topic is 4819 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm writing an app using D3D9 and Winsock in C++. There are two memory errors I frequently get when exiting my program: The first that occurs is an "illegal operation". I've narrowed down the cause of it to the line "free(statik);" in my cleanup() function. It seems to crash like this with with all of my dynamically allocated memory, and only when I free it. I'll note that malloc() and realloc() have always worked flawlessly for me. I just don't get it o_O; My second error also occurs when my program is exiting: The instruction at "0x007a6696" referenced memory at "0x007a6696". The memory could not be "written". An alternate version of this I get reads "The memory could not be "read"." Now what I first thought when seeing this is "0x007a6696 == 0x007a6696, that's probably not a good thing, heh", and I figured I had done something stupid like pointing a pointer to itself. I went through all my code and couldn't find anything problematic like that. So now I'm thinking "buffer overflow" or something. I dunno if I'm even in the right ball park, though. Could someone tell me what kind of thing causes an error like this? I'll note that I didn't have this problem until I wrote code for my UDP interface and my client and server started sending packets to eachother

Share this post


Link to post
Share on other sites

This topic is 4819 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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