attempt to call method 'applyLinearImpulse' (a nil value)

On returning to my menu (im using the director class) then going to the game again, once my collision occurs i get :

attempt to call method ‘applyLinearImpulse’ (a nil value)

This works without fail on the first run of the game, it’s only when i return to the menu then back to the game that I get this error.

I know what it means, however I don’t understand why it is occuring, all other physic’s and there properties work as expected on the second run, just not this one… ?

Thanks [import]uid: 6981 topic_id: 4404 reply_id: 304404[/import]

Post your code here… [import]uid: 9371 topic_id: 4404 reply_id: 13773[/import]

I would rather not thanks. [import]uid: 6981 topic_id: 4404 reply_id: 13776[/import]

That makes it very hard to debug…

I can only guess you are not releasing / initialising an object correctly but without code it’s hard to say.

It might well be relating to not releasing an event handler.

Hope that helps, good luck. [import]uid: 9371 topic_id: 4404 reply_id: 13777[/import]

Thanks I will try your suggestions :slight_smile: [import]uid: 6981 topic_id: 4404 reply_id: 13784[/import]

Thanks, removing the two runtime listeners I had when changing scenes fixed the problem.

Thanks for the advice mate, appreciate it! [import]uid: 6981 topic_id: 4404 reply_id: 13846[/import]