Collision Join?

In my game, when two certain object hit, I want to make a joint between them.

When I do a postCollision function, and try to create a new joint between the object and event.other, i get the following error, and then Corona crashes:
Assertion failed: (IsLocked() == false), function CreateJoint, file /Users/ansca/.hudson/jobs/Main-DMG/workspace/platform/mac/…/…/external/Box2D_v2.1.2/Box2D/Box2D/Dynamics/b2World.cpp, line 184.
/Applications/CoronaSDK/simulator: line 9: 60246 Abort trap “$path/Corona Simulator.app/Contents/MacOS/Corona Simulator” $*
Any clues on how to proceed? [import]uid: 5652 topic_id: 6126 reply_id: 306126[/import]

OK, found a quick hack; in the postCollision function, I call a subfunction with a 10 millisecond delay, ie:

timer.performWithDelay( 10, makeJoin )

Not so elegant, but its works… [import]uid: 5652 topic_id: 6126 reply_id: 20970[/import]

This is the correct solution because can’t modify physics objects in their own events.

M [import]uid: 8271 topic_id: 6126 reply_id: 21111[/import]