Debugging problem
Debugging problem
Hello evereyone. I've just finished watching Chili's 7th tutorial, started doing the homework and I have a problem with a debugger: it breaks, shows me the error line (assert (x >=0)) but when I try to step out or step in or step over I get send to the page "assert.cpp not found". Couldn't find anything about it on google. What should I do to fix it?
- Attachments
-
- VS2017_assert.cpp_not_found.jpg
- (272.85 KiB) Not downloaded yet
-
- Posts: 4373
- Joined: February 28th, 2013, 3:23 am
- Location: Oklahoma, United States
Re: Debugging problem
Wouldn't worry too much about the assert.cpp not found message, the main issue is what caused the assertion ( x >= 0 ) which in this case, means that x >= 0 is false. If you look down in the Autos or Locals window, your x and y variables have not been set to valid values and are negative.
Make sure you have correctly initialized your x and y values.
Make sure you have correctly initialized your x and y values.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com
-
- Posts: 4373
- Joined: February 28th, 2013, 3:23 am
- Location: Oklahoma, United States
Re: Debugging problem
One thing you can do is use the Call Stack window to back track a few functions and see where the problem started. For instance, double click on Game::ComposeFrame and see what values you get for that function, if they all look valid and correct, double click on the Graphics::DrawBox function and verify those values are valid and correct.
I'm willing to bet one of those functions is where you'll find your problem.
I'm willing to bet one of those functions is where you'll find your problem.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com
Re: Debugging problem
Yep, the thing to do is use the call stack to move up into your own code and find where the problem *really* lies.
Chili