You are right ! The crash also happens on helloworld sample… Nevertheless, it is not just when you touch the screen but when you touch the button at the bottom right corner of the screen (red crosses with the image named CloseSelected.png) that the app crashes. This button has a similar code to the code I gave in my initial post. And this bug has been reported here: http://www.cocos2d-x.org/boards/10/topics/8618
Anybody from the cocos2d-x team can tell us what is happening? Thanks
Hum…actually, I think that I concluded a little bit too fast concerning the case of the helloworld sample. Indeed, I forgot that the goal of this button is to close the app :). So, it launches the menuCloseCallback method where it is written “CCDirector::sharedDirector()->end();”… Consequently, it is normal that the app closes and also probably normal that the messages “Consumer closed input channel or an error occurred. ~ Channel is unrecoverably broken and will be disposed!” appear in the LogCat…
I replaced the code in menuCloseCallback method by just CCLog(“HelloWorld::menuCloseCallback”); and I can see that the method can be called several times without crashing the app.
Are you sure that you really have a crash ? Or is it the normal behaviour ?
Upon further investigation with git version it turned out that error occurs only on emulator while clicking close button. On x86 vm everything goes well.
I test with HelloWorld sample, if Cocos2d-x SDK.11 and NDK r7b, also crash,
but with Cocos2d-x SDK.11 and NDK r6b, it is normal.
For my game code, crash problem always exist, even it cann’t go into the game UI, once you open it will exit automatically.