segmentation fault during "hideOverlay" when using anonymous function?

I note that I get segmentation fault below when I use an anonymous function to call “hideOverlay”.  Just wondering if this is a bug?

/Applications/CoronaSDK/Corona Terminal: line 9: 15228 Segmentation fault: 11  "$path/Corona Simulator.app/Contents/MacOS/Corona Simulator" "$@"

This gives an error:

resumeButton = widget.newButton {    onEvent = function(event)       composer.hideOverlay()    end } scene.view:insert(resumeButton)

This does NOT give an error (even if I take out the “backButton:removeEventListener(“touch”,backButtonListener)” from the hide function)

local function backButtonListener(event)    if event.phase == "ended" then       composer.hideOverlay(true, "fade", 400 )    end end resumeButton = widget.newButton {   onEvent = backButtonListener, } scene.view:insert(resumeButton)

 

 

 

Widget.newButton’s onEvent is a “touch” handler.  That is it has phases of “began” and “ended”.  You’re in effect calling hideOverlay() twice.  This of course should not cause it to segment fault.

If you could reduce a simple app that has this, engineering would love to see it.

Rob

Widget.newButton’s onEvent is a “touch” handler.  That is it has phases of “began” and “ended”.  You’re in effect calling hideOverlay() twice.  This of course should not cause it to segment fault.

If you could reduce a simple app that has this, engineering would love to see it.

Rob