The attached 24-line very simple code snippet causes a bus error (=seg fault) when I try to run it in the simulator:
/Applications/Corona Game Edition Beta/simulator: line 9: 2340 Bus error "$path/Corona Simulator.app/Contents/MacOS/Corona Simulator" $\*
If I remove the object inline, outside of an event handler, all is ok.
Very confusing as it “used to work”… in a much larger program.
Please advise.
Thanks, Frank.
[lua]local physics = require(“physics”)
physics.start()
physics.setScale( 60 )
physics.setGravity( 0, 0 )
physics.setDrawMode(“debug”)
b0 = display.newCircle( 100, 100, 10 )
b0:setFillColor( 0, 255, 0)
physics.addBody( b0, { density=1, friction=0, bounce=0.9, radius=10 } )
b1 = display.newCircle( b0.x, b0.y+20, 10 )
b1:setFillColor( 0, 0, 255)
physics.addBody( b1, { density=1, friction=0, bounce=0.9, radius=10 } )
j01 = physics.newJoint( “pivot”, b0, b1, b0.x, b0.y+10 )
–b1:removeSelf()
afterDelay = function( event )
b1:removeSelf()
end
timer.performWithDelay( 2000, afterDelay)[/lua] [import]uid: 8093 topic_id: 2189 reply_id: 302189[/import]
[import]uid: 8194 topic_id: 2189 reply_id: 7022[/import]