Serious multitouch issue - framework bug?

Serious multitouch issue - framework bug?
0.0 0


Hi everyone,

I’m developing an iPad cocos2d-x game that uses multitouch.

I’ve noticed that in some cases, in the middle of the game, multitouch doesn’t work anymore.
Initially I thought this is probably my bug, but after trying to reconstruct the bug I found two things:

  1. When running in debug it never happens.
  2. When running in release it sometimes happens, and when it happens, it looks like the multitouch code is not even read. I mean, my touchesBegan method is either not called, or the touches set simply doesn’t contain the extra multitouch.

Any idea if this can be any kind of bug?
Here is my touchesBegan method, _inputAllowed is true for sure, as well as the condition below it, but processTouchBegin is not called.

What can be causing this?
I’m using cocos2d-1.0.1-x-0.9.2 if I’mt not mistaken (how can I verify this based on library code?)
Can this be a cocos2d-x bug? Should I upgrade to the latest version?

void DiskeyScene::ccTouchesBegan(CCSet* touches, CCEvent* event)
CCSetIterator it;
CCTouch* touch;

for( it = touches~~>begin; it != touches~~>end(); it++)
touch = (CCTouch*)(*it);


CCPoint location = touch->locationInView(touch->view());

location = CCDirector::sharedDirector()->convertToGL(location);

if (_inputAllowed)
if (!Constants::AI_ACTIVE || getPlayerIdArea(location) != FIRST_PLAYER)
processTouchBegin(touch, location);



This was resolved, it’s not a a framework bug :slight_smile:

I added a view for game center leaderboard, and didn’t remove it correctly by not calling removeFromSuperView.
After dismissing - multitouch didn’t work in successive games.

Once adding this call it was resolved :slight_smile: