Jump to content
  • Advertisement
Sign in to follow this  
Oberon_Command

Odd problem...

This topic is 4817 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 an odd problem. I'm writing a simple RTS game for 4e4, and every time my game quits, it causes an access violation. I tried commenting out my entire main file, so that I was left with this:
int main (int argc, char *argv[])
{
 return 0;
}
Still, the error occurred. I tried running it through a debugger, and I didn't really get anything (Stupid Dev-C++...). Does anybody know why this might happen?

Share this post


Link to post
Share on other sites
Advertisement
...it could be something weird like not rebooting your machine in a long time.

Just for fun try main() without any parameters, and also try with void as return type; see if these make any difference.

Share this post


Link to post
Share on other sites
1. I removed all #include<> commands as well, so it can't be from that.
2. I'll try main() without any parameters, but since I'm using C++ I may get an error from declaring it void instead of int. And I reboot my machine every night (it boots up rather quickly, it's a laptop so it has to). Also, the error happens on every computer that I test it on.
3. I know that the error occurs when I return from the function. If I omit that, it may fix it, but then again I'll probably get errors and warnings. I'll try that, though.

Share this post


Link to post
Share on other sites
So a destructor of a global variable is failing. I hope you didn't think that removing the includes would disable the instantiation of global variables defined in other translation units?

Share this post


Link to post
Share on other sites
I seriously doubt this will help. But try only having this in your
command line (for testing purposes)

int main(void)
{
return(0);
}


See if it gives you that error then.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!