Hello!
I am fairly new to Corona and am developing a Lua version of the arcade game “Space Shooter.” Everything works well except when the user is out of lives and the screen needs to be moved on to the next scene. Then I get the error: “physics.stop() cannot be called when the world is locked and in the middle of number crunching, such as during a collision event”
Here is the code for my scene:hide function:
function scene:hide( event )
local sceneGroup = self.view
local phase = event.phase
if event.phase == “will” then
– Called when the scene is on screen and is about to move off screen
–
– INSERT code here to pause the scene
– e.g. stop timers, stop animation, unload sounds, etc.)
– stop background music
audio.stop(playMusic)
– disable tap
--Runtime:remvoeEventListener(“tap”, shoot)
background:removeEventListener(“touch”, touchFunc)
– disable physics
player:removeEventListener(“collision”, collisionEvent)
physics.stop()
elseif phase == “did” then
– Called when the scene is now off screen
end
end
Any help would be greatly appreciated!
Thank you,
Liv 
