Crash in BBIosGame::TouchesEvent
Monkey Targets Forums/iOS/Crash in BBIosGame::TouchesEvent
| ||
Hi, I just added some social sharing features to my fairlight framework. Here is the code: https://bitbucket.org/joemanaco/fairlight/commits/100c96d72610d615bedfd4534f85336cb7baf916 It works fine, but when I close the ShareDialog the app crashes on the next Touch in the following line in BBIosGame::TouchesEvent: if( _touches[pid] && _touches[pid].view!=view ) _touches[pid]=0; // it crashes on _touches[pid].view I had a look at it but I don't understand what happens exactly here, but I sometimes encounter the same bug when I use the gamecenter module from Monkey. Any ideas? P.S.: When I comment the line out the crash disappears. It seems everythings working fine at first sight - but as I don't understand the code I don't know what else will be damaged by doing so. |
| ||
That code is actually a 'magic fix' that someone provided to fix a crash in their own gamecenter module, before brl.gamecenter happened. I'll remove it and do some testing today... |
| ||
thanks! |
| ||
Having a rough time getting game center going again though...wish apps didn't time out! |
| ||
What version of iOS are you seeing crashes on? I can reproduce on 4.3 but not 5, 6 etc... The above code seems to be a fix for an iOS 4.3 bug where touch events aren't always cancelled properly when game center appears. Without it, touches can get 'stuck'. It does crash here on iOS 4.3 so I need to find an alternate fix, but it should (theoretically) be harmless on iOS 5, 6 as touches should be correctly cancelled. If not...? |
| ||
Ok, just pushed a possible fix to the develop branch. |