krzysztofzablocki / CCNode-SFGestureRecognizers

Adding UIGestureRecognizers to cocos2d, painless.
http://twitter.com/merowing_
Other
202 stars 34 forks source link

Issue with UIPopover / UIWebview over the top of cocos2d scene using SFGestureRecognizers #2

Closed pkester closed 11 years ago

pkester commented 11 years ago

When you use a UIPopover over a scene with UIGestures added, you get objc_release errors while using ARC.

*\ -[_UIWebViewScrollView release]: message sent to deallocated instance 0x21cb01b0

See https://github.com/pkester/webViewTest-Cocos2D for test case. (Press the bon button twice)

krzysztofzablocki commented 11 years ago

Works fine under xcode 4.5.1 ( sim + ipad 3 ), it will only crash on cocos display link when clicking very quickly many times but that not gesture issue.

pkester commented 11 years ago

Strange. I am running Xcode 4.5.1 (4G1004) with sim and an ipad3, both the sample app and my own app will crash every time ARC releases the popover, so every 2nd time the popover is opened.

Here is a short video showing it happen, first time without NSZombie enabled, second time with.

http://screencast.com/t/5fdeZ35hk6

On Oct 25, 2012, at 3:45 PM, Krzysztof Zabłocki notifications@github.com wrote:

Works fine under xcode 4.5.1 ( sim + ipad 3 ), it will only crash on cocos display link when clicking very quickly many times but that not gesture issue.

— Reply to this email directly or view it on GitHub.

krzysztofzablocki commented 11 years ago

Hey mate, You were right, for some reason when using popover something weird was going on with the gestures. I moved away from modifying global class tree and instead changes are now applied only to category classes. Try running your code with newest changes and let me know if it helped

pkester commented 11 years ago

Great work Krzysztof, this fixes the issue perfectly.

tonisalae commented 11 years ago

Same thing happens when using UITableView with cocos 2.x and ARC

krzysztofzablocki commented 11 years ago

It used to, but not with newest version :) http://foldifyapp.com is using gestures everywhere and have tableviews in popovers, works fine.

tonisalae commented 11 years ago

Ups! You are right, sir. Thank you!

krzysztofzablocki commented 11 years ago

You need to have newest version of category, it's no longer affecting any other gesture recognisers except the ones you add to cocos.

On Friday, 8 March 2013 at 04:32, Aaron London wrote:

Running into the same issue using UIActivityViewController with following error: *\ -[UIScrollView release]: message sent to deallocated instance

— Reply to this email directly or view it on GitHub (https://github.com/krzysztofzablocki/CCNode-SFGestureRecognizers/issues/2#issuecomment-14602299).

postmechanical commented 11 years ago

Yes. Pulled latest source but needed to do clean build apparently to get it working. All set now. Thanks!