Crashes removing display objects

5 replies [Last post]
dwallin33
User offline. Last seen 18 weeks 1 day ago. Offline
Joined: 6 Feb 2010

I can't totally confirm this, but I've seen a few crashes in instances where I removed an object from the display hierarchy but kept a variable referencing said object.

Replies

fpassa's picture
fpassa
User offline. Last seen 21 hours 41 min ago. Offline
Joined: 17 Sep 2009

dwallin33,

I don't know if it could help you, but I was having trouble with newGroup treatment in SDK 1.1 that was running on SDK 1.0.

I was using a menu=display.newGroup() to keep my menu buttons organized. Then I used a transition.to(menu, delay...) Everything was well except, when I removed by calling a function like this:

function freeMenu()
--if disableMenuListener() then
for i=menu.numChildren,1,-1 do
local child = menu[i]
child.isVisible=false
menu:remove( child )
child=nil
end
--end
return true
end

which is expected to remove only childs under menu Group. The things is after removal, menu group goes to indeterminate state. So, when I called again my buildMenu() function, which only makes menu:insert(startButton) etc, it reports an error producing a stack traceback, due nil value related to menu. This function was well running on SDK 1.0, but for some reason I have to change it to work in SDK 1.1

I don't know if it can help you or not, but I think it can be useful any way.

Flavio.

carlos m. icaza's picture
carlos m. icaza
User offline. Last seen 9 hours 24 min ago. Offline
Ansca Staff
Joined: 22 Jun 2009

dwallin33

do you have code you can send us to see the bug you are seeing? info@asncamobile.com

thanks

carlos

evank
User offline. Last seen 1 year 4 weeks ago. Offline
Joined: 16 Sep 2009

(Logged as bug #129)

carlos m. icaza's picture
carlos m. icaza
User offline. Last seen 9 hours 24 min ago. Offline
Ansca Staff
Joined: 22 Jun 2009

we can't reproduce. is there some code you guys can send to us that reproduces this on your drop?

please send to support@anscamobile.com

carlos

Viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.