5

Thats in the stack trace and i dont understand this error:

0   CoreFoundation  0x30f57648 ___CFBasicHashFindBucket_Linear_NoCollision + 92  
1   CoreFoundation  0x30f59688 __CFBasicHashAddValue + 692
2   CoreFoundation  0x30eaff9f CFDictionarySetValue + 74
3   UIKit   0x35721a0b -[UITouchesEvent _gestureRecognizersForWindow:] + 282
4   UIKit   0x357215d5 -[UIWindow _sendGesturesForEvent:] + 28
5   UIKit   0x357214ab -[UIWindow sendEvent:] + 66
6   UIKit   0x3570a313 -[UIApplication sendEvent:] + 298
7   UIKit   0x35709c53 _UIApplicationHandleEvent + 5090
8   GraphicsServices    0x31a11e77 PurpleEventCallback + 666
9   CoreFoundation  0x30f1ba97     __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 26
10  CoreFoundation  0x30f1d83f __CFRunLoopDoSource1 + 166
11  CoreFoundation  0x30f1e60d __CFRunLoopRun + 520
12  CoreFoundation  0x30eaeec3 CFRunLoopRunSpecific + 230
13  CoreFoundation  0x30eaedcb CFRunLoopRunInMode + 58
14  GraphicsServices    0x31a1141f GSEventRunModal + 114
15  GraphicsServices    0x31a114cb GSEventRun + 62
16  UIKit   0x35734d69 -[UIApplication _run] + 404
17  UIKit   0x35732807 UIApplicationMain + 670
18  AppName 0x00002e3b 0x1000 + 7739  

The crash occurs sometimes, i dont know on what kind of action it occurs.

How can i understand this issue and can solve my problem?

brush51
  • 5,691
  • 6
  • 39
  • 73
  • Do you add gesture recognizers to your view? – Sergey Kalinichenko Jul 12 '12 at 14:37
  • If you can reproduce it running in the debug mode, type `bt` at debug console to see the detailed backtrace. – A-Live Jul 12 '12 at 14:46
  • yes i am adding gestures to the view. the gestures works very well. thats the first time that this kind of crash occurs within of gestures. – brush51 Jul 12 '12 at 14:49
  • @A-Live i cant reproduce it :(. i was switching between the views with calling the gesture recognizers very very fast and then...BUM. – brush51 Jul 12 '12 at 14:49
  • As always, you might want to check everything related to the gesture recognition memory management. Also it might help you to know, that every time i received this kind of crash it was related to threads/runLoops. – A-Live Jul 12 '12 at 15:12
  • I think the crash may be related to forgetting to remove gesture recognizers when a view gets deleted. Make sure that each of your gesture recognizers is assigned to a `__strong` variable in the view or the view controller, and that you remove your gesture recognizers upon closing of the view. – Sergey Kalinichenko Jul 13 '12 at 18:39

1 Answers1

2

I think the problem may be that you are re-using gesture objects for more than one UIView based object. They cannot be re-used. I have had similar problems in the past (not exactly the same crash). The documentation on it highlights the limitation. I suppose there is internal state (the hash table seen in the crash) which gets updated in conflicting ways for the different UI View based objects.

If you are not re-using them, try removing all of them temporarily just to confirm the system is otherwise stable.

Faisal Memon
  • 2,711
  • 16
  • 30