Crashing when using b2ChainShape

I'm currently using the following code to create a player object

Code:
   
b2BodyDef bodyDef;
bodyDef.type = b2_dynamicBody;
bodyDef.position.Set(2.0f, 0.0f);
b2Body* body = world->CreateBody(&bodyDef);

b2PolygonShape box;
box.SetAsBox(2.0f, 2.0f);

b2FixtureDef fixtureDef;
fixtureDef.shape = &box;
fixtureDef.density = 1.0f;
fixtureDef.friction = 0.3f;
body->CreateFixture(&fixtureDef);


and the following code to create a b2ChainShape

Code:
vector<b2Vec2> points;
for (int i = 0; i < 5; i ++)
{
   points.push_back(b2Vec2(i * 1.0f,1.0f));
}
b2ChainShape chain;
chain.CreateChain(&points[0], points.size());

b2BodyDef bodyDef;
bodyDef.position.Set(0.0f, 0.0f);
b2Body* body = world->CreateBody(&bodyDef);

b2FixtureDef fixtureDef;
fixtureDef.shape = &chain;
fixtureDef.density = 1.0f;
fixtureDef.friction = 0.3f;
body->CreateFixture(&fixtureDef);


But during update, when the two collide I get a crash at line 203 of b2ContactManager.cpp

Code:
      if (edge->other == bodyA)


But I'm not sure why?

Can I get some help?
Runs ok with 2.3.0
I'm currently running 2.2.1, which I thought was the latest version
Do you have a contact listener? Try disabling that. You might be trying to modify the world somehow during the step.
Not sure exactly what I did to fix it, but it's all fixed now... Pulled out Box2d and then put it back... All fixed now :s not sure what did that...

Original thread: https://box2d.org/forum/viewtopic.php?t=8190