Quick触摸lua报错无法查明原因

注册了触摸事件,在响应时想按下添加一个layer,释放时移除这个layer 结果报错了 查不到原因
function Map:onCellTouch(event)
if not self.mapEditor then
self:initUIMapEditor();
end
if event.name == “began” and not self._displayeditor then
self._displayeditor = true;
print(self.mapEditor, “show”)
self.mapEditor:addTo(self.layer);
elseif event.name == “ended” and self._displayeditor then
self._displayeditor = false;
print(self.mapEditor, “hide”)
self.mapEditor:removeSelf()
end
return true
end

运行时会报诡异错误:
userdata show

LUA ERROR: :69: invalid ‘cobj’ in function ‘lua_cocos2dx_Node_getLocalZOrder’

stack traceback:
: in function ‘getLocalZOrder’
:69: in function ‘addTo’
:268: in function <:260>
(tail call): ?
:394: in function <:348>

userdata hide

LUA ERROR: :112: invalid ‘cobj’ in function ‘lua_cocos2dx_Node_removeFromParentAndCleanup’

stack traceback:
: in function ‘removeFromParent’
:112: in function ‘removeSelf’
:272: in function <:260>
(tail call): ?
:394: in function <:348>

对象被析构,闭包处理最好不要传递对象