physics.stop() Error in Storyboard exitScene()

I’ve been having some troubles getting my game functioning correctly and finally about have my first level working right. Right now everything works but I get an error that happens on the console. I have a function that switches my storyboard scene when it collides with another object. Once I collide the scene does switch but get a physics.stop error. As far as I know I have everything right and don’t know how to solve this problem. Anybody know whats going on? If you need some code let me know, thanks.

[lua]2013-01-22 15:39:54.191 Corona Simulator[59866:707] ERROR: physics.stop() cannot be called when the world is locked and in the middle of number crunching, such as during a collision event [import]uid: 20272 topic_id: 35210 reply_id: 335210[/import]

I’m pretty sure you need to add a short delay to your call so the physics engine can finish processing:

[lua]local function leavingNow()
physics.stop()
storyboard.gotoScene( “newScene” )
end
timer.performWithDelay( 10, leavingNow )[/lua]

Hope that helps. [import]uid: 202223 topic_id: 35210 reply_id: 139982[/import]

Sure did thank you. [import]uid: 20272 topic_id: 35210 reply_id: 139987[/import]

I’m pretty sure you need to add a short delay to your call so the physics engine can finish processing:

[lua]local function leavingNow()
physics.stop()
storyboard.gotoScene( “newScene” )
end
timer.performWithDelay( 10, leavingNow )[/lua]

Hope that helps. [import]uid: 202223 topic_id: 35210 reply_id: 139982[/import]

Sure did thank you. [import]uid: 20272 topic_id: 35210 reply_id: 139987[/import]