First up, thanks for this port. I’m porting an iphone cocos2d game over to cocos2d-x, with a main target of Android. So far I’ve been mostly using the win32 version for more rapid development, and it’s going pretty well. After adding touch support though, I’m now getting a crash in the android version only.
I haven’t quite got the hang of debugging the NDK, but I’ve used the arm-eabi-addr2line tool as well as debug prints, and have narrowed the crash down to CCTouchDispatcher::forceAddHandler.
Sometimes the top of the call stack is inside of the pArray->stl’s begin() function, and other time’s its when dereferencing the iter pointer. This happened to anyone else, or anyone got any idea what I might be doing wrong? Higher up the stack, i see it’s being called from CCLayer::onEnter(), via the registerWithTouchDispatcher() call.
Thanks Walzer! But don’t worry about it too much, I’m in no rush - will probably be a week or so before I’m able to take another look into it.
I’ll also check out the tests and see if they’re all working correctly.
I have built tests used by ndk-r5b, the code is got from github. The tests runs ok on g3. The tests invokes CCTouchDispatcher::forceAddHandler.
So I don’t think it is the matter with CCTouchDispatcher::forceAddHandler.
So, after starting a new project from scratch with your awesome new create-android-project script, and then just copying over my source, it’s now running on the emulator. Awesome!