removeSelf crashes app

I’ve been using this function for 5+ years.

local coronaMetaTable = getmetatable(display.getCurrentStage()) local isDisplayObject = function(aDisplayObject)     return (type(aDisplayObject) == "table" and getmetatable(aDisplayObject) == coronaMetaTable) end local cleanGroups cleanGroups = function ( objectOrGroup, anim )   if not anim then     if(not isDisplayObject(objectOrGroup)) then return end     if objectOrGroup.numChildren then         while objectOrGroup.numChildren \> 0 do             cleanGroups ( objectOrGroup[objectOrGroup.numChildren])         end     end     if objectOrGroup.audioFile then       objectOrGroup.audioStop()     end     objectOrGroup:removeSelf()     objectOrGroup = nil     return   else     anim.onComplete = function () cleanGroups(objectOrGroup);end     transition.to(objectOrGroup,anim)   end end

For the last 2 weeks of daily builds it crashes the simulator and the app on device.

object:removeSelf()

Something has definitely changed with this function, it’s buggy and it crashes any instance WITHOUT an assertion, warning, anything.

Please fix.

Thank you,

Aidan

Can you build a simple test case for us? If so, please file a Bug Report using the link at the top of the page. The bug report needs to have a main.lua, config.lua and build.settings as well as any assets needed. Make sure its in a .zip file and submit that with the form above.

The engineers will need that. It would also help to know what build this started with.

Thanks

Rob

Bug report submitted.

Thank you Rob.

Can you build a simple test case for us? If so, please file a Bug Report using the link at the top of the page. The bug report needs to have a main.lua, config.lua and build.settings as well as any assets needed. Make sure its in a .zip file and submit that with the form above.

The engineers will need that. It would also help to know what build this started with.

Thanks

Rob

Bug report submitted.

Thank you Rob.