TargetedDelegate works always on simulator, works rarely on platform

TargetedDelegate works always on simulator, works rarely on platform
0.0 0



I have 3 classes which are CCLayer registered with dispatcher using addTargetedDelegate ( I override CCLayer::registerWithTouchDispatcher() - as recommended in CCLayer source file). I have also couple plain CCMenu objects (which also registered with dispatcher with addTargetedDelegate ). All of them are set to swallow touches ( bSwallowsTouches = true ).

I’m using AirplaySDK on PC, and all works in the simulator. All of registered objects respond to touches.

The problem is CCMenu (which add/removes/manipulates other objects registered with dispatcher) often don’t respond to touches on the hardware(iPhone). Then I have to exit application (using push button), and start it again. And it is lottery, sometimes it works 1 time, sometimes after 10 tries. It is completely random. When it works - it works perfectly - meaning all object receive touches as expected (as it happens on simulator).

It’s not definitely priority issue of TargetDelegate - as it always works on simulator, and only sometime on platform.
I have jail-broken iPhone, and when this process is started and does not respond to touches, I double check if process is actually running. I login via ssh and check with ps. Some of ps
Process state = Rs
MEM = 52.0
CPU = 32.3

There is nothing wrong with this process as far as I can see - meaning it is running.
My code is still quite beta/unstable - but it does run perfectly on simulator.
Any idea what else I can do/check? What can cause this problem? To me looks like it is timing issue.
For now, I would rather avoid installing and running gdb on iPhone.



move to airplay subforum, wait Max’s appearance


Thnx Wang, will wait for Max.
Now I begin suspect it is related to limited memory on iPhone.



Looks like it was cause by incorrect memory settings in my app.icf
( i set up heap far too big, which left only crumbles of memory to the system ).

Max, please ignore this subject, sorry for wasting your time.