1

I get crash at -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] without any trace refer to our app,could any one tell me what's the problem. There are about 500 crashes with 99% on the ios7 System.

Thread : Crashed: com.apple.main-thread
0  libobjc.A.dylib                0x397e1b26 objc_msgSend + 5
1  UIKit                          0x31c358bb -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 1078
2  UIKit                          0x31ce8f7b -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 214
3  UIKit                          0x31b98fb9 _applyBlockToCFArrayCopiedToStack + 316
4  UIKit                          0x31b111f3 _afterCACommitHandler + 430
5  CoreFoundation                 0x2f3711cd __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 20
6  CoreFoundation                 0x2f36eb71 __CFRunLoopDoObservers + 284
7  CoreFoundation                 0x2f36eeb3 __CFRunLoopRun + 730
8  CoreFoundation                 0x2f2d9c27 CFRunLoopRunSpecific + 522
9  CoreFoundation                 0x2f2d9a0b CFRunLoopRunInMode + 106
10 GraphicsServices               0x34000283 GSEventRunModal + 138
11 UIKit                          0x31b7d049 UIApplicationMain + 1136
12 MyApp                          0x0004e813 main (main.m:16)
Muddu Patil
  • 713
  • 1
  • 11
  • 24
kenshin
  • 36
  • 4
  • Has your table view delegate been changed/removed? The table view delegate is `unsafe_unretained` so if ARC is removing it somehow, you might get a crash log like this. – Jason Coco Feb 24 '14 at 07:44
  • Thanks @Jason Coco. Do you mean that if we use ARC, crash like this will happen because the ARC is removed the delegate somehow which cause the wild pointer? Our project is MRC with only several files ARC, I will check the ARC files, but I'm not sure how to reproduce the problem, can you show me an example if possible? – kenshin Feb 25 '14 at 02:47
  • @kenshin: Me also facing a similar crash like this. Did u solve it? – Umesh Kumar Mar 05 '14 at 13:44

1 Answers1

1

@Umesh Kumar: YES

Finally, it turns out that its the navigation stacks confusion. Here is the detail:

  1. We all know two or more buttons action can be performed at the same time by default.(exclusiveTouch=NO)
  2. Sometimes, when a button in you controller be taped which will cause the nav to push to next controller, but people may taped the back button on the left of the navbar which will simply pop the controller. This will cause the navigation stacks confusion. You will see the controller pushed in or poped back really strange.
  3. When this happens, there will always be many strange crashes, include the crash I figured above.
  4. Note that, According to my experience, This happens on IOS 7 only, and these crashes only happens on IOS 7 too.
  5. So, we need to set button.exclusiveTouch = YES.But indeed, i realy do not know why this happens only on IOS 7.
kenshin
  • 36
  • 4