Sure. The error type is EXC_BAD_ACCESS. This means you tried to access memory that you cannot access. This is not specific to Box2D. Consider these examples:
This will crash because the pointer is random data when you try to access it:
Code:
b2Body* body;
b2Vec2 pos = body->GetPosition(); //crash
This will crash because the pointer does not point to a valid b2Body:
Code:
b2Body* body = NULL;
b2Vec2 pos = body->GetPosition(); //crash
This is ok because the pointer points to a valid b2Body:
Code:
b2Body* body = world->CreateBody(&bodyDef);
b2Vec2 pos = body->GetPosition(); //ok
This will crash because the pointer once again does not point to a valid b2Body:
Code:
b2Body* body = world->CreateBody(&bodyDef);
world->DestroyBody(body);
b2Vec2 pos = body->GetPosition(); //crash
If you check google about this there are many many pages to read. Judging from other threads you seem to be quite stuck on this problem and I think your case is the last one above right? Here is one way you could try to avoid accessing the body after you delete it:
Code:
//when destroying a body, also set the pointer to NULL
world->DestroyBody(body);
body = NULL;
//every time you want to use the body somewhere, check if it is not NULL first
if ( body != NULL )
pos = body->GetPosition();