cocos2d-iphone-extensions icon indicating copy to clipboard operation
cocos2d-iphone-extensions copied to clipboard

CCLayerPanZoom: crash on line 289

Open hasyimibhar opened this issue 12 years ago • 2 comments

I'm using CCLayerPanZoom for a game scene, and I noticed that if I touch the screen while the scene is transitioning in, it will crash. After digging in into the code, it appears that the crash is caused by an attempt to access an empty array (self.touches) on line 289. This happens because ccTouchesBegan never gets called when the scene is transitioning in.

hasyimibhar avatar Apr 27 '12 07:04 hasyimibhar

Oops, my mistake. Here's how to reproduce the crash:

  1. Instead of just simply running the scene, apply a transition effect (e.g. fade in).
  2. While the scene is transitioning in, touch the screen.
  3. After the transition is over, slide your finger.

hasyimibhar avatar Apr 27 '12 07:04 hasyimibhar

To which class touches property belongs to? Maybe you can provide a pull request?

Thanks!

27.04.2012, в 11:50, [email protected] написал(а):

I'm using CCLayerPanZoom for a game scene, and I noticed that if I touch the screen while the scene is transitioning in, it will crash. After digging in into the code, it appears that the crash is caused by an attempt to access an empty array (self.touches) on line 289. This happens because ccTouchesBegan never gets called when the scene is transitioning in.


Reply to this email directly or view it on GitHub: https://github.com/cocos2d/cocos2d-iphone-extensions/issues/108

psineur avatar Apr 27 '12 17:04 psineur