Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Yanroy

The dreaded illegal operation

This topic is 6485 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 have a bit of a problem. My app doesn't works fine... until you try to turn it off. I get an access violation at the line below:
    
WriteError("Destructing CMap Object");
if (Tileset)
	Tileset->Release(); // this is the problem

WriteError("Released Tileset");
DeleteTiles();
WriteError("Done Destructing CMap Object");
    
It really has me stumped. Because of the WriteError() functions (as you can see), I was able to narrow the possible problem lines to the if statement and the conditional code. The debugger says it was the Tileset->Release() line that caused the access violation. It also says that Tileset is a valid address, and I tried a version of the code that did a Restore() on the surface before releasing it. Same problem. Any ideas? --Edit-- I think I may have figured it out myself, just now, but I am not going to delete this post in case I am wrong. I still want to hear your input. My new idea: the CMap object in question is a global... which means it is deallocated when the program quits, right? I should have realized this from the errorlog. It says "shutdown complete", then it says "Destructing CMap Object". I think it has something to do with DirectDraw being shut down before the surface is release.... now how do I fix it? Hopefully when I wake up in the morning, one of you brilliant programmers will have a solution for me (I don't mean to sound like I depend on all the Gamedev members for solving all my little problems, its just that you can apply brainpower from different time zones while I try to sleep ) Edited by - Yanroy on January 14, 2001 10:05:49 PM

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!