If you click on a button that’s on a screen being changed from bfore the screen has fully transitioned it causes the next screen to be transitioned to again. This causes a crash on the device.
Ricardo (or anyone) how can this be fixed? TA! [import]uid: 9371 topic_id: 4925 reply_id: 304925[/import]
Don’t know as I fixed it by clearing the touch listeners prior to the director change scene call [import]uid: 9371 topic_id: 4925 reply_id: 16290[/import]
Solved:
The button handler was causing the issue. I went through and commented everything out. Last of course was the button handler. I switched it over to Ricardo’s button example, and that did it.
This does not work:
local btnPlay = ui.newButton{
default = "images/play.png",
over = "images/play.png",
onEvent = playHandler,
id = "playBtn",
text = "",
size = 12,
emboss=true
}
This works:
local bt02 = display.newImage("images/play.png")
local function bt02t ( event )
if event.phase == "ended" then
media.stopSound()
director:changeScene("playerSelection","moveFromRight")
end
end
bt02:addEventListener("touch",bt02t)
bt02.x = 240
bt02.y = 80
localGroup:insert(bt02)
[import]uid: 7197 topic_id: 4925 reply_id: 16308[/import]
Guys, please write your questions at Director’s sub-forum. I don’t have too much time to answer and I really didn’t see most of the topics created for Director. I’m sorry for that and I will appreciate if you all could go to this link:
I am too getting “367 Segmentation Fault” in my app and my app is crashing.Is this a Director Problem? I am just not able to understand the problem that I am facing. Can anybody help me?
Thanks in advance… [import]uid: 82446 topic_id: 4925 reply_id: 56035[/import]
I just traced the issue back to ui.lua, not sure to have the solution other than:
don’t use ui.lua buttons to switch between scenes, either director or storyboard.
or even better, don’t use ui.lua buttons AT ALL.
see more info at: http://developer.anscamobile.com/forum/2011/01/12/segmentation-or-bus-error#comment-107273
[import]uid: 80100 topic_id: 4925 reply_id: 107279[/import]