Sign in to follow this  

VS .NET 2005 Memory Error (From VS 2003 Project)?

This topic is 4256 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

Well, as some of you may know, I've been working on a 2D game engine using SDL. I was using VS .NET 2003 Pro. But some friends and I chipped in (for our "group" =D) and purchased VS .NET 2005 Pro. Well, I opened my project in VS 2005, and it converted successfully. But now, it tells me that the memory at a specific address could not be written. It happens in my call to 'g_pEngine->InitEngine(&initInfo);'. I don't have the code available right now, but this may help. When I run the debugger, it points to the file 'memcpy.asm' and points to the line copying memory to the destination. 'g_pEngine->InitEngine(InitInfo*);' actually calls 'm_pAppWindow->Create(initInfo->sTitle, initInfo->nWidth, etc.);', which just sets up the SDL window and 'SDL_Surface *screen;' object. And I'm not sure, but I may not be calling 'new' on all of the objects in the 'CAppWindow m_pAppWindow;' object. Could it possibly be (or IS it) that I'm not calling 'new' for all pointers to data members in the constructor? I am on Windows 2000 Professional SP4, Visual Studio .NET 2005 Pro. If this is not enough information, I'm sorry. But I explained the best I could. I'm really tired. LoL. I just got home from work (3:30PM-1:00AM). And I don't have the exact code available. Sorry. =) Thanks in advance, Matt U.

Share this post


Link to post
Share on other sites
Dont know if this will help, but I ran across a memory error changing from 2003 student to 2005 express.
It seems that 2005 no longer supports "single threaded" programs, and defaults to "multi threaded", as such, 2005 seems to generate background threads.
This caused an error to appear where two window messages got processed at the same time, resulting in one object being
deleted, then accesed imediatly afterwards. So, on some runs the program would crash in a specific spot at random intervals.

So, if there is anything that gets deleted, or is shared data that dies when it goes out of scope somewhere, then you may be
experiencing the same stupid race condition I ran into.

Share this post


Link to post
Share on other sites

This topic is 4256 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