Please read your logs. https://docs.coronalabs.com/guide/basics/debugging/index.html#consoledebugging
If you read them, I am pretty sure you will get a warning saying that physics bodies can not be removed while in a collision. My guess is somewhere in your code when scene:hide or scene:destroy is called you remove the physics bodies. Now as soon as the physics engine detects a collision(in your onCollision function), you call gotoScene which triggers your scene:hide and then if you have a removeScene call it triggers scene:destroy. And due to limitations of the physics engine, you can’t remove physics bodies mid-collision. My guess is that is the problem. You will have to post more code, especially if you are using removeScene call.
Edit: IF this is indeed the problem, the solution is to set a timer.performWithDelay on the gotoScene function.