Attempting to set property(x) with nil

In my game, when a collision occurs between two bodies I remove one of them like this:

obj:removeSelf();

The object is removed from the screen. However, the output window gets filled with messages like this:

WARNING: Attempting to set property(x) with nil  
WARNING: Attempting to set property(y) with nil  

I am not manually setting the x or y values of either object. Is it possible that the physics engine is still trying to update the x and y values of the body, even though I called removeSelf()? Can you think of any other reason I would be getting these warnings? [import]uid: 52127 topic_id: 9822 reply_id: 309822[/import]

yes, removing objects in collision handler functions messes up physics system.

What you want to do is remove them after a timedelay of few microseconds. 50ms is what I found out to be good for my games.

I personally add all the objects that I want to be removed to a table and then in each enterFrame event I empty the table. [import]uid: 48521 topic_id: 9822 reply_id: 35815[/import]