Most random bug ever?

Heya!

I'm currently programming in VC++ 2008 and I've come to face atleast to me the most random bug ever.
I'm in a update function which is called each frame(it's a game yea) but in the end of the function it skips my last if-case, I know for sure that it's true but it still won't enter it. Here you think "well you've done something wrong and the if-case ain't true anyways BUT! here's the fun part, as soon as i put a breakpoint at the code that isn't being executed it breaks there as if it's saying "Hey thanks for letting me know there is code here!". I remove the breakpoint and press F5 to let it continue and voila now it goes into the if-case just as it should. problem is that when people play my game they don't do it by using my source code in VC++ so they can put a breakpoint in there themself in the beginning.
Rebuilden 3 times and restarted ones, doesn't help.

Worth mentioning is that I've tried removing the if-case and just letting the code inside it stay there so it should be executed every time no matter what BUT it still doesn't until i put a breakpoint down there.

Anyone have a clue on what's going on?
closed account (S6k9GNh0)
Don't use VC++?
I like VC++, nuff said. Anyone got any constructive ideas?
Problem solved, it was quite a simple and weird solution that fixed it but:
I just started up with a breakpoint in the If-case once, and it noticed the code directly on start-up.
Then i quit debuging and removed the breakpoint and voila, worked right away the next time i started it.
You should probably have posted this in the WINDOWS programming forum.
Yeah you're right, sorry
Nah, this belongs here. The Windows forum is for questions regarding developing for Windows, not questions regarding developing using tools available only on Windows.
For example, a question about a WinAPI function would go there, but a question about compilation failing while cross-compiling from Windows to Unix would go here.
Last edited on
ah Alright, thanks for the clearification^^
ic ic

I was thinking this one was for language and concept type things.
Last edited on
Topic archived. No new replies allowed.