Hello Jon,
I know now about the bug and I know the solution. This bug is one very interesting bug. It's a bug, most of the programmers will not find.
I didn't see the code b2World::Step(), but the bug happens here. But if you look at this function and want to see the bug, you will not see it. You cannot see it in the lines of you code, because it's not inside the lines of your code.
My first advice:
If you can't see the bug in the lines of the code, you shouldn't look at your code. |
There are not much programmers, who know this
And this is such a case, you can look as long you want, you will not see the bug.
And I know professional programmers, they looked and looked and looked, without any result.
What should you do then? Should you use a debugger. No, because:
My second advice:
If you cannot find a bug with the debugger, you shouldn't use a debugger. |
There are not much programmers, who know this
And it's also such a case, you can debug as long as you want, you will not find the bug
And I know professional programmers, they debugged and debugged and debugged, without any result.
My explenations:
If you look at the lines, you cannot see the lines missing. |
If you debug, maybe the bug never occures during a debugging session or only at one time out of 10000 times. Maybe you have luck, but miss, that this would the bug, then could be, you will find this situation one year later, if you debug all days, but could be, you also miss again, that this would be the bug.
|
Can you gess it?
What I saw clearly in my mind, without seeing your code:
There are two lines missing in your function b2World::Step(). Can you guess?