MKMapRectIntersectsRect throws EXC_BAD_ACCESS - iphone

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 MyProject 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 MyProject 0x000a3a46 0xa2000 + 6726
21 MyProject 0x000a39f0 0xa2000 + 6640

Related

reading crash logs itunes after app update

I'v released an update to my app in AppStore, it got accepted pretty quick. Yet, it crashes right after an update. If installed on clean device it works, yet crashes if older version was present... I guess I messed up something and I'm trying to figure out what. I get crash reports from itunes connect, yet they do not tell me quite much. In other crash logs which I'v seen on stackoverflow questions there is Class name, method name and line of crash. While all my crash reports contain only bytes which give me zero information where and what is wrong.
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Crashed Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x3231b3e2 __exceptionPreprocess + 158
1 libobjc.A.dylib 0x3a01695e objc_exception_throw + 26
2 CoreFoundation 0x32266ef4 -[__NSArrayM objectAtIndex:] + 160
3 kodinisRaktas 0x000b939a 0x0009f000 + 107418
4 kodinisRaktas 0x000b9282 0x0009f000 + 107138
5 kodinisRaktas 0x000a2434 0x0009f000 + 13364
6 UIKit 0x34149574 -[UIViewController loadViewIfRequired] + 360
7 UIKit 0x3419e1f2 -[UIViewController contentScrollView] + 22
8 UIKit 0x3419e138 -[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:] + 24
9 UIKit 0x3419e01c -[UINavigationController _layoutViewController:] + 28
10 UIKit 0x3419df48 -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 268
11 UIKit 0x3419d694 -[UINavigationController _startTransition:fromViewController:toViewController:] + 60
12 UIKit 0x3419d57c -[UINavigationController _startDeferredTransitionIfNeeded:] + 320
13 UIKit 0x3416e55c -[UILayoutContainerView layoutSubviews] + 176
14 UIKit 0x3412d8c2 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 254
15 QuartzCore 0x33ed950e -[CALayer layoutSublayers] + 210
16 QuartzCore 0x33ed90b0 CA::Layer::layout_if_needed(CA::Transaction*) + 456
17 QuartzCore 0x33f07eca -[CALayer layoutIfNeeded] + 138
18 UIKit 0x341d70dc -[UIViewController window:setupWithInterfaceOrientation:] + 204
19 UIKit 0x341d62c6 -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:isRotating:] + 3598
20 UIKit 0x341d54aa -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:] + 42
21 UIKit 0x341d5434 -[UIWindow _setRotatableViewOrientation:duration:force:] + 64
22 UIKit 0x3430acb4 __57-[UIWindow _updateToInterfaceOrientation:duration:force:]_block_invoke_0 + 100
23 UIKit 0x3419367e -[UIWindow _updateToInterfaceOrientation:duration:force:] + 214
24 UIKit 0x341933c2 -[UIWindow setAutorotates:forceUpdateInterfaceOrientation:] + 690
25 UIKit 0x34192d2a -[UIViewController _tryBecomeRootViewControllerInWindow:] + 150
26 UIKit 0x34189e86 -[UIWindow addRootViewControllerViewIfPossible] + 366
27 UIKit 0x341d4ef2 -[UIWindow setRootViewController:] + 658
28 kodinisRaktas 0x000a1bd4 0x0009f000 + 11220
29 kodinisRaktas 0x000a18f6 0x0009f000 + 10486
30 UIKit 0x3418aa9c -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 248
31 UIKit 0x3418a620 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1164
32 UIKit 0x3418282e -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 694
33 UIKit 0x3412ad1a -[UIApplication handleEvent:withNewEvent:] + 1006
34 UIKit 0x3412a7a8 -[UIApplication sendEvent:] + 68
35 UIKit 0x3412a1ea _UIApplicationHandleEvent + 6194
36 GraphicsServices 0x35e425f2 _PurpleEventCallback + 586
37 GraphicsServices 0x35e42222 PurpleEventCallback + 30
38 CoreFoundation 0x322f03e2 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 30
39 CoreFoundation 0x322f0386 __CFRunLoopDoSource1 + 134
40 CoreFoundation 0x322ef20a __CFRunLoopRun + 1378
41 CoreFoundation 0x32262238 CFRunLoopRunSpecific + 352
42 CoreFoundation 0x322620c4 CFRunLoopRunInMode + 100
43 UIKit 0x34181468 -[UIApplication _run] + 664
44 UIKit 0x3417e2b4 UIApplicationMain + 1116
45 kodinisRaktas 0x000a0d96 0x0009f000 + 7574
46 kodinisRaktas 0x000a0d4c 0x0009f000 + 7500
I can't reproduce the crash on my own device, so this is all I got to determine the crash source. Any ideas ?
You should symbolicate the crash log by opening it in Xcode and clicking Re-symbolicate. If this doesn't work you can do something like this How to Manually Symbolicate iOS Crash to View Crash Logs

Rare not reproducible crash related to UIKit

I have a random-looking crash related to UIKit and I can't seem to figure out what is wrong.
Does anyone see a familiar pattern here or do you think this might be a random OS-related crash? Is there a way to find out which Buttons or UI-elements were involved here?
Thread 0 Crashed:
0 libobjc.A.dylib 0x35260f78 objc_msgSend + 15
1 UIKit 0x312363d7 -[UIView(Hierarchy) superview] + 50
2 UIKit 0x31239abb -[UIView nextResponder] + 82
3 UIKit 0x31354011 forwardTouchMethod + 36
4 UIKit 0x3124f97d -[UIWindow _sendTouchesForEvent:] + 400
5 UIKit 0x3124f319 -[UIWindow sendEvent:] + 380
6 UIKit 0x31235695 -[UIApplication sendEvent:] + 356
7 UIKit 0x313e762f __42-[UIApplication _cancelTouches:withEvent:]_block_invoke_0 + 54
8 UIKit 0x312a5d0d -[UIApplication _cancelTouches:withEvent:includingGestures:notificationBlock:] + 544
9 UIKit 0x312a5ae9 -[UIApplication _cancelTouches:withEvent:] + 84
10 UIKit 0x31234eb1 _UIApplicationHandleEvent + 5688
11 GraphicsServices 0x33c7722b PurpleEventCallback + 882
12 CoreFoundation 0x37535523 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 38
13 CoreFoundation 0x375354c5 __CFRunLoopDoSource1 + 140
14 CoreFoundation 0x37534313 __CFRunLoopRun + 1370
15 CoreFoundation 0x374b74a5 CFRunLoopRunSpecific + 300
16 CoreFoundation 0x374b736d CFRunLoopRunInMode + 104
17 GraphicsServices 0x33c76439 GSEventRunModal + 136
18 UIKit 0x31263cd5 UIApplicationMain + 1080

NSUnknownKeyException Causing Crash on Button Click [duplicate]

This question already has answers here:
Xcode - How to fix 'NSUnknownKeyException', reason: … this class is not key value coding-compliant for the key X" error?
(79 answers)
Closed 7 years ago.
So I'm not sure what is going on. I haven't really changed much. Nothing having to do with this class anyways. It was working fine just a bit before and now I'm getting this crash.
-(IBAction)mphButton:(id)sender{
if(self.mphVC == nil){
MphViewController *mph = [[MphViewController alloc] initWithNibName:#"MphView" bundle:[NSBundle mainBundle]];
self.mphVC = mph;
[mph release];
}
[self.navigationController pushViewController:self.mphVC animated:YES];
}
The thread is stopping saying "Thread 1: Program received signal "SIGABRT" on the [self.navigationController pushViewController:self.mphVC animated:YES];
This is what the message:
2011-09-29 10:59:03.557 SpeedClock[2973:b303] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<MphViewController 0x4b42ad0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key count.'
*** Call stack at first throw:
(
0 CoreFoundation 0x00dc25a9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x00f16313 objc_exception_throw + 44
2 CoreFoundation 0x00dc24e1 -[NSException raise] + 17
3 Foundation 0x00794677 _NSSetUsingKeyValueSetter + 135
4 Foundation 0x007945e5 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 285
5 UIKit 0x0021030c -[UIRuntimeOutletConnection connect] + 112
6 CoreFoundation 0x00d388cf -[NSArray makeObjectsPerformSelector:] + 239
7 UIKit 0x0020ed23 -[UINib instantiateWithOwner:options:] + 1041
8 UIKit 0x00210ab7 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 168
9 UIKit 0x000c6628 -[UIViewController _loadViewFromNibNamed:bundle:] + 70
10 UIKit 0x000c4134 -[UIViewController loadView] + 120
11 UIKit 0x000c400e -[UIViewController view] + 56
12 UIKit 0x000c2482 -[UIViewController contentScrollView] + 42
13 UIKit 0x000d2f25 -[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:] + 48
14 UIKit 0x000d1555 -[UINavigationController _layoutViewController:] + 43
15 UIKit 0x000d2870 -[UINavigationController _startTransition:fromViewController:toViewController:] + 524
16 UIKit 0x000cd32a -[UINavigationController _startDeferredTransitionIfNeeded] + 266
17 UIKit 0x000d4562 -[UINavigationController pushViewController:transition:forceImmediate:] + 932
18 UIKit 0x000cd1c4 -[UINavigationController pushViewController:animated:] + 62
19 SpeedClock 0x00002621 -[RootViewController mphButton:] + 353
20 UIKit 0x000144fd -[UIApplication sendAction:to:from:forEvent:] + 119
21 UIKit 0x000a4799 -[UIControl sendAction:to:forEvent:] + 67
22 UIKit 0x000a6c2b -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 527
23 UIKit 0x000a57d8 -[UIControl touchesEnded:withEvent:] + 458
24 UIKit 0x00038ded -[UIWindow _sendTouchesForEvent:] + 567
25 UIKit 0x00019c37 -[UIApplication sendEvent:] + 447
26 UIKit 0x0001ef2e _UIApplicationHandleEvent + 7576
27 GraphicsServices 0x00ffb992 PurpleEventCallback + 1550
28 CoreFoundation 0x00da3944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
29 CoreFoundation 0x00d03cf7 __CFRunLoopDoSource1 + 215
30 CoreFoundation 0x00d00f83 __CFRunLoopRun + 979
31 CoreFoundation 0x00d00840 CFRunLoopRunSpecific + 208
32 CoreFoundation 0x00d00761 CFRunLoopRunInMode + 97
33 GraphicsServices 0x00ffa1c4 GSEventRunModal + 217
34 GraphicsServices 0x00ffa289 GSEventRun + 115
35 UIKit 0x00022c93 UIApplicationMain + 1160
36 SpeedClock 0x00001f59 main + 121
37 SpeedClock 0x00001ed5 start + 53
38 ??? 0x00000001 0x0 + 1
)
terminate called throwing an exceptionCurrent language: auto; currently objective-c
(gdb)
I can read these pretty well on Logcat on android. Just not use to reading this one. I saw another post saying that their class might not have been connected to their view. Mine is. It was working just fine prior to me putting in some stuff (which I recommented out and it still isnt working) on the MPHViewController.m
Any and all help is appreciated... Thanks :)
You most likely have something in your "MphView" XIB file called "count" that you no longer have in MphViewController. Maybe a delegate set for an object that's no longer there, or an action, or something like that. Check all your connections in Interface Builder and remove any broken ones.

Error when testing application on iPhone, but no error in simulator

I get the below error when I test my application on my iPhone, yet the error doesnt occur in the Simulator. Its when I load up my rootViewController which is a UITableView. I am relatively new to iOS programming, and I was just wondering if anybody could shed any light on it!
Regards,
Michael.
Use this code to go to my RootView.
- (IBAction)goToRootView {
RootViewController *rootViewController = [[RootViewController alloc] initWithStyle:UITableViewStyleGrouped];
[self.navigationController pushViewController:rootViewController animated:YES];
[rootViewController release];
}
2011-09-12 14:39:55.951 LeagueProject[773:707] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[NSMutableArray objectAtIndex:]: index 0 beyond bounds for empty array'
*** Call stack at first throw:
(
0 CoreFoundation 0x3684b64f __exceptionPreprocess + 114
1 libobjc.A.dylib 0x33aa4c5d objc_exception_throw + 24
2 CoreFoundation 0x367b6069 -[__NSArrayM objectAtIndex:] + 184
3 LeagueProject 0x0000302f -[RootViewController tableView:numberOfRowsInSection:] + 58
4 UIKit 0x356827c7 -[UISectionRowData refreshWithSection:tableView:tableViewRowData:] + 1338
5 UIKit 0x356836bb -[UITableViewRowData rectForFooterInSection:] + 66
6 UIKit 0x356835f5 -[UITableViewRowData heightForTable] + 40
7 UIKit 0x35683453 -[UITableView(_UITableViewPrivate) _updateContentSize] + 206
8 UIKit 0x3567ebc9 -[UITableView _rectChangedWithNewSize:oldSize:] + 384
9 UIKit 0x3567d833 -[UITableView setFrame:] + 158
10 UIKit 0x35684e0f -[UIView(Geometry) resizeWithOldSuperviewSize:] + 274
11 UIKit 0x356510bd -[UIView(Geometry) resizeSubviewsWithOldSize:] + 120
12 UIKit 0x356364e9 -[UIView(Geometry) setFrame:] + 336
13 UIKit 0x35688193 -[UIViewControllerWrapperView setFrame:] + 62
14 UIKit 0x35676079 -[UINavigationController _startTransition:fromViewController:toViewController:] + 960
15 UIKit 0x35675c43 -[UINavigationController _startDeferredTransitionIfNeeded] + 182
16 UIKit 0x35667d5d -[UINavigationController pushViewController:transition:forceImmediate:] + 640
17 UIKit 0x35667ad3 -[UINavigationController pushViewController:animated:] + 34
18 LeagueProject 0x0000917d -[splashView goToRootView] + 116
19 CoreFoundation 0x367bb571 -[NSObject(NSObject) performSelector:withObject:withObject:] + 24
20 UIKit 0x3564dec9 -[UIApplication sendAction:to:from:forEvent:] + 84
21 UIKit 0x3564de69 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 32
22 UIKit 0x3564de3b -[UIControl sendAction:to:forEvent:] + 38
23 UIKit 0x3564db8d -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 356
24 UIKit 0x3564e423 -[UIControl touchesEnded:withEvent:] + 342
25 UIKit 0x3564cbf5 -[UIWindow _sendTouchesForEvent:] + 368
26 UIKit 0x3564c56f -[UIWindow sendEvent:] + 262
27 UIKit 0x35635313 -[UIApplication sendEvent:] + 298
28 UIKit 0x35634c53 _UIApplicationHandleEvent + 5090
29 GraphicsServices 0x35f6fe77 PurpleEventCallback + 666
30 CoreFoundation 0x36822a97 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 26
31 CoreFoundation 0x3682483f __CFRunLoopDoSource1 + 166
32 CoreFoundation 0x3682560d __CFRunLoopRun + 520
33 CoreFoundation 0x367b5ec3 CFRunLoopRunSpecific + 230
34 CoreFoundation 0x367b5dcb CFRunLoopRunInMode + 58
35 GraphicsServices 0x35f6f41f GSEventRunModal + 114
36 GraphicsServices 0x35f6f4cb GSEventRun + 62
37 UIKit 0x3565fd69 -[UIApplication _run] + 404
38 UIKit 0x3565d807 UIApplicationMain + 670
39 LeagueProject 0x000025a7 main + 82
40 LeagueProject 0x00002550 start + 40
)
terminate called after throwing an instance of 'NSException'
Your error is an index 0 beyond bounds for empty array error. Put breakpoints on the lines where you access arrays. When you find out which array is causing the problem, either the solution will be trivial, or you can add a bit more to your question and ask for further help.
It looks like the problem is in your implementation of [RootViewController tableView:numberOfRowsInSection:]. You are trying to access a member of a NSMutableArray that is empty - hence the error 'index 0 beyond bounds for empty array'.

Using the Tab bar results in an iPhone crash

I seem to be having an issue with loading a game on a tab in a tab bar application. When I run the app and click on the tab that the game is supposed to go on, it crashes giving me this in console:
2011-03-20 08:36:29.311 ComputerClan[21592:207] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIViewController 0x6948f30> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key racquet_green.'
*** Call stack at first throw:
(
0 CoreFoundation 0x017ea5a9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x0193e313 objc_exception_throw + 44
2 CoreFoundation 0x017ea4e1 -[NSException raise] + 17
3 Foundation 0x001a7677 _NSSetUsingKeyValueSetter + 135
4 Foundation 0x001a75e5 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 285
5 UIKit 0x0062b30c -[UIRuntimeOutletConnection connect] + 112
6 CoreFoundation 0x017608cf -[NSArray makeObjectsPerformSelector:] + 239
7 UIKit 0x00629d23 -[UINib instantiateWithOwner:options:] + 1041
8 UIKit 0x0062bab7 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 168
9 UIKit 0x004e1628 -[UIViewController _loadViewFromNibNamed:bundle:] + 70
10 UIKit 0x004df134 -[UIViewController loadView] + 120
11 UIKit 0x004df00e -[UIViewController view] + 56
12 UIKit 0x004dd482 -[UIViewController contentScrollView] + 42
13 UIKit 0x004edf25 -[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:] + 48
14 UIKit 0x004ec555 -[UINavigationController _layoutViewController:] + 43
15 UIKit 0x004ed7aa -[UINavigationController _startTransition:fromViewController:toViewController:] + 326
16 UIKit 0x004e832a -[UINavigationController _startDeferredTransitionIfNeeded] + 266
17 UIKit 0x004ef562 -[UINavigationController pushViewController:transition:forceImmediate:] + 932
18 UIKit 0x004e81c4 -[UINavigationController pushViewController:animated:] + 62
19 UIKit 0x004f469a -[UIMoreNavigationController pushViewController:animated:] + 105
20 UIKit 0x004a6b68 -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 1140
21 UIKit 0x0049cb05 -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 219
22 Foundation 0x001ae79e __NSFireDelayedPerform + 441
23 CoreFoundation 0x017cb8c3 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 19
24 CoreFoundation 0x017cce74 __CFRunLoopDoTimer + 1220
25 CoreFoundation 0x017292c9 __CFRunLoopRun + 1817
26 CoreFoundation 0x01728840 CFRunLoopRunSpecific + 208
27 CoreFoundation 0x01728761 CFRunLoopRunInMode + 97
28 GraphicsServices 0x01dda1c4 GSEventRunModal + 217
29 GraphicsServices 0x01dda289 GSEventRun + 115
30 UIKit 0x0043dc93 UIApplicationMain + 1160
31 ComputerClan 0x00002b02 main + 84
32 ComputerClan 0x00002aa5 start + 53
)
terminate called after throwing an instance of 'NSException'
It seems as if you have a problem in the XIB you are trying to load. Make sure there are no invalid connections, i.e. connections to non-existent IBOutlets or IBActions. Also make sure you haven't defined any objects to be non-existent classes.