Jump to content
  • Advertisement
Sign in to follow this  
ynkm169

How to debug runtime error - vector subscript out of range?

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

Hi: When I encounter such an error(vector subscript out of range), the error message only mentions where in the VisualStudio/include/vector file that the error comes from. However, this is not helpful for debugging purpose at all. Is there anyway to trace where in, say.. a million places where i have vector subscript, that the error is generated? I use Visual Studio 2005. Thanks a lot!

Share this post


Link to post
Share on other sites
Advertisement
Just look further down in the call stack, to find out where the vector function was called from.

Share this post


Link to post
Share on other sites
Run it in your debugger and run up the call stack when the error occurs.

That and learn to love asserts and try/catch blocks.

Edit: Sneftel stole my thunder.

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!