Based upon the google svn: rev#6
I am not sure where we are posting bugs now being as we've moved away from source-forge. Are we using the system on google?
Anyway, I am seeing an infinite loop under certain circumstances. I modified the pyramid test-bed example to get it to happen consistently which really just involve in increasing the numbers of blocks (see below).
I am seeing it never getting out of the "void b2World::SolveTOI(const b2TimeStep& step)" function inside the "for (;;)" section.
I am not sure where we are posting bugs now being as we've moved away from source-forge. Are we using the system on google?
Anyway, I am seeing an infinite loop under certain circumstances. I modified the pyramid test-bed example to get it to happen consistently which really just involve in increasing the numbers of blocks (see below).
I am seeing it never getting out of the "void b2World::SolveTOI(const b2TimeStep& step)" function inside the "for (;;)" section.
Code:
enum
{
e_count = 50,
};
Pyramid()
{
{
b2BodyDef bd;
b2Body* ground = m_world->CreateBody(&bd);
b2PolygonShape shape;
shape.SetAsEdge(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
ground->CreateFixture(&shape);
}
{
b2PolygonShape shape;
shape.SetAsBox( 1.0f, 1.0f, b2Vec2(0.0f,0.0f), b2_pi * 0.25f );
b2BodyDef bd;
bd.position .Set( 0.0f, 5.0f );
b2Body* body = m_world->CreateBody(&bd);
body->CreateFixture(&shape, 5.0f);
}
{
float32 a = 0.25f;
b2PolygonShape shape;
shape.SetAsBox(a, a);
b2Vec2 x(-10.0f, +10.75f);
b2Vec2 y;
b2Vec2 deltaX(0.5625f, 1.25f);
b2Vec2 deltaY(1.125f, 0.0f);
deltaX *= 0.5f;
deltaY *= 0.5f;
for (int32 i = 0; i < e_count; ++i)
{
y = x;
for (int32 j = i; j < e_count; ++j)
{
b2BodyDef bd;
bd.position = y;
b2Body* body = m_world->CreateBody(&bd);
body->CreateFixture(&shape, 5.0f);
body->SetMassFromShapes();
y += deltaY;
}
x += deltaX;
}
}
}
{
e_count = 50,
};
Pyramid()
{
{
b2BodyDef bd;
b2Body* ground = m_world->CreateBody(&bd);
b2PolygonShape shape;
shape.SetAsEdge(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
ground->CreateFixture(&shape);
}
{
b2PolygonShape shape;
shape.SetAsBox( 1.0f, 1.0f, b2Vec2(0.0f,0.0f), b2_pi * 0.25f );
b2BodyDef bd;
bd.position .Set( 0.0f, 5.0f );
b2Body* body = m_world->CreateBody(&bd);
body->CreateFixture(&shape, 5.0f);
}
{
float32 a = 0.25f;
b2PolygonShape shape;
shape.SetAsBox(a, a);
b2Vec2 x(-10.0f, +10.75f);
b2Vec2 y;
b2Vec2 deltaX(0.5625f, 1.25f);
b2Vec2 deltaY(1.125f, 0.0f);
deltaX *= 0.5f;
deltaY *= 0.5f;
for (int32 i = 0; i < e_count; ++i)
{
y = x;
for (int32 j = i; j < e_count; ++j)
{
b2BodyDef bd;
bd.position = y;
b2Body* body = m_world->CreateBody(&bd);
body->CreateFixture(&shape, 5.0f);
body->SetMassFromShapes();
y += deltaY;
}
x += deltaX;
}
}
}