Hi,
first thank you for great simulation lib. I used it to create simple game, but now in testing phase, it happened once (I was unable to simulate it again) that application falls into infinite loop.
When I looked to debugger, it was in method b2World::Solve, in loop going through all b2joints:
for (b2Joint* j = m_jointList; j; j = j->m_next)
{
j->m_islandFlag = false;
}
what happened here was, that j->m_next was equal to j, so that loop never ended.
I didn't do any manual magic with world, I'm using create and destroy factory methods for everything. Sure, it is probably bug in my app, I'm beginner in box2d, but I'd like to ask for ideas, how it can happen - to help me where to start to look for bug.
Thank you very much,
Jindrich
first thank you for great simulation lib. I used it to create simple game, but now in testing phase, it happened once (I was unable to simulate it again) that application falls into infinite loop.
When I looked to debugger, it was in method b2World::Solve, in loop going through all b2joints:
for (b2Joint* j = m_jointList; j; j = j->m_next)
{
j->m_islandFlag = false;
}
what happened here was, that j->m_next was equal to j, so that loop never ended.
I didn't do any manual magic with world, I'm using create and destroy factory methods for everything. Sure, it is probably bug in my app, I'm beginner in box2d, but I'd like to ask for ideas, how it can happen - to help me where to start to look for bug.
Thank you very much,
Jindrich