We use cocos2d-x+lua to develop mobile game. Most of time it runs ok. But there is a strange problem， that is when i add some CCObject such as CCSprite, CCLayer, CCNode … to the other CCObject such as CCLayer,CCNode … sometimes it runs ok, but sometimes it cause the error: error in function ‘addChild’. argument #2 is ‘CCxxx’; ‘CCMenuItem’ expected. the CCxxx may be CCLayerColor, CCSprite, CCNode …, I really don’t found the reason of the problem, and the lua syntax looks right(because the game runs good until the problem appear). anybody can give me some ideas? I am deeply appreciative of any ideas.