Open Dauch opened 7 years ago
DelayCall.delay(function() pText:removeFromParent() DelayCall.delay(function() pText:setString("") end, 1) end, 1)
look at this code: you remove this node and after 1 second you want to setString age. when you remove it ,this node will free in native. So there will be a invaild 'cobj'
I guess the native object associated with pText
was released since pText:removeFromParent
was invoked.
@Dauch , yes, anyway, any lua invocations should not make game crash. For a quick fix, please don't use a binding object which was released.
Yes I knew, but sometimes coder forgot to check,
Any lua invocations should not make game crash.
I think the engine should check a binding object is valid before use.
Steps to Reproduce:
On windows it will prop a error(not crash):
But on android it will crash, I think best way to is prop a error rather then crash.