Programming in objective-c: MKMapRectIntersectsRect throws EXC_BAD_ACCESS on newest questions tagged objective-c – Stack Overflow

Is this a problem that is caused by adding map pins/annotations and releasing them too often?

My thread trace shows: 0 obj_msgSend and 1 MKMapRectIntersectsRect which lets me know that adding a pin to the map is the problem.

I have a table view which leads to a detail view which contains the map. It seems that the error is only thrown when I quickly tap into and out of my detail view(from segues of different cells). I tried changing the way I released my annotation and removed it from the map view but to no avail.

Crash Log:

Thread 0 Crashed:
0   libobjc.A.dylib                 0x37ab5f78 objc_msgSend + 16
1   Shodan                          0x000aa954 0xa2000 + 35156
2   UIKit                           0x33181c84 -[UIViewController view] + 160
3   UIKit                           0x3318e1e2 -[UIViewController contentScrollView] + 18
4   UIKit                           0x3318e052 -[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:] + 30
5   UIKit                           0x3318df38 -[UINavigationController _layoutViewController:] + 28
6   UIKit                           0x3318d704 -[UINavigationController _startTransition:fromViewController:toViewController:] + 312
7   UIKit                           0x3318d4fc -[UINavigationController _startDeferredTransitionIfNeeded] + 244
8   UIKit                           0x33181af8 -[UINavigationController pushViewController:transition:forceImmediate:] + 800
9   UIKit                           0x331817ce -[UINavigationController pushViewController:animated:] + 30
10  UIKit                           0x331fa8fc -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 880
11  UIKit                           0x33274620 -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 152
12  Foundation                      0x3522e92c __NSFireDelayedPerform + 408
13  CoreFoundation                  0x356e8a2c __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 8
14  CoreFoundation                  0x356e8692 __CFRunLoopDoTimer + 358
15  CoreFoundation                  0x356e7268 __CFRunLoopRun + 1200
16  CoreFoundation                  0x3566a49e CFRunLoopRunSpecific + 294
17  CoreFoundation                  0x3566a366 CFRunLoopRunInMode + 98
18  GraphicsServices                0x37306432 GSEventRunModal + 130
19  UIKit                           0x33176cce UIApplicationMain + 1074
20  Shodan                          0x000a3a46 0xa2000 + 6726
21  Shodan                          0x000a39f0 0xa2000 + 6640

See Answers


source: http://stackoverflow.com/questions/10629343/mkmaprectintersectsrect-throws-exc-bad-access
Programming in objective-c: programming-in-objective-c



online applications demo