The app result when run simulator is differnce as run in device?

I’m learning using piston join with Corona SDK for windows.

Here is my code:

local physics = require("physics")  
physics.start()  
  
display.setStatusBar( display.HiddenStatusBar )  
  
local beam = display.newRect( 0, 0, 320, 10 )  
beam:setFillColor(255, 255, 0)  
physics.addBody( beam, "static", { friction=0.5 } )  
local ball = display.newCircle( 160, 30, 16 )  
ball:setFillColor(0, 200, 255)  
physics.addBody(ball,"dynamic",{friction=0.3,density=0.5,bounce=0, radius=16})  
local myJoints  
myJoints = physics.newJoint( "piston", beam, ball, beam.x,beam.y,0,1 )  
myJoints.isLimitEnabled = true -- (boolean)  
local heigh=50  
myJoints:setLimits( 0, heigh)  

When I run with simulator. It display correctly and the ball will stop when it goes to the upper limits.

But when I build this code and install to device (using google emulator) or run with simulator of Corona SDK for Mac. The ball does not stop. it falls to button of screen and disappear.

So Where’s my mistake or it’s a bug of Corona SDK? Please show me how to correct it.

thanks to your help!
[import]uid: 44119 topic_id: 8354 reply_id: 308354[/import]

is there anyone can help me? [import]uid: 44119 topic_id: 8354 reply_id: 29953[/import]