iOS 6 Maps occasional Crash - iphone

I'm getting occasionally crash with iOS 6 MapKit. Can't really reproduce it. What can cause this?
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000044
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 IMGSGX543GLDriver 0x38f231b4 sgxTextureGetImageRowBytes(GLDTextureRec*, unsigned int, unsigned int) + 8
1 IMGSGX543GLDriver 0x38f23160 CalculateChunkPlaneSizes(GLDTextureRec*, int, unsigned int*, unsigned int*, unsigned int*, unsigned int*) + 104
2 IMGSGX543GLDriver 0x38f25906 sgxConfigureTexturePrivate(GLDTextureRec*) + 82
3 IMGSGX543GLDriver 0x38f24584 glrUpdateTexture + 616
4 libGPUSupportMercury.dylib 0x342c76b6 gldLoadFramebuffer + 102
5 GLEngine 0x31b50e52 gleUpdateDrawFramebufferState + 178
6 GLEngine 0x31b52556 gleDoDrawDispatchCoreES2 + 126
7 GLEngine 0x31aedbc0 gleDrawArraysOrElements_Entries_Body + 140
8 GLEngine 0x31aea5ec glDrawArrays_ES2Exec + 160
9 VectorKit 0x3780dcd6 -[VKSkyModel drawScene:withContext:] + 326
10 VectorKit 0x377e76d6 -[VKModelObject recursiveDrawScene:whenReadyWithContext:] + 118
11 VectorKit 0x377621ea -[VKMapModel recursiveDrawScene:withContext:] + 278
12 VectorKit 0x37762096 -[VKModelObject recursiveDrawScene:withContext:] + 186
13 VectorKit 0x3775d4da -[VKScreenCanvas onTimerFired:] + 1014
14 VectorKit 0x3775b548 -[VKMapCanvas onTimerFired:] + 500
15 VectorKit 0x3775a3d2 -[VKMainLoop displayTimerFired:] + 610
16 QuartzCore 0x3095b06c CA::Display::DisplayLink::dispatch(unsigned long long, unsigned long long) + 156
17 QuartzCore 0x3095afc4 CA::Display::IOMFBDisplayLink::callback(__IOMobileFramebuffer*, unsigned long long, unsigned long long, unsigned long long, void*) + 60
18 IOMobileFramebuffer 0x331e4fd4 IOMobileFramebufferVsyncNotifyFunc + 152
19 IOKit 0x36fc4446 IODispatchCalloutFromCFMessage + 190
20 CoreFoundation 0x382a95d8 __CFMachPortPerform + 116
21 CoreFoundation 0x382b4170 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 32
22 CoreFoundation 0x382b4112 __CFRunLoopDoSource1 + 134
23 CoreFoundation 0x382b2f94 __CFRunLoopRun + 1380
24 CoreFoundation 0x38225eb8 CFRunLoopRunSpecific + 352
25 CoreFoundation 0x38225d44 CFRunLoopRunInMode + 100
26 GraphicsServices 0x3415f2e6 GSEventRunModal + 70
27 UIKit 0x351b72fc UIApplicationMain + 1116
28 MyApp 0x0005d78a main (main.m:14)
29 MyApp 0x0005d744 start + 36

I found this. It may help you fix your problem.
"Issue: An OpenGL ES-based application displays “flashing” or “stale” frames after a call to presentRenderBuffer.
This symptom can occur when an OpenGL ES application calls the EAGL presentRenderbuffer method without first drawing anything. What is seen on screen may contain uninitialized pixels or previously rendered frames. To correct this issue, you should always draw something to your framebuffer before calling presentRenderbuffer. Also note that unless you set the RetainedBackbuffer property on your CAEAGLLayer to enable retained backbuffer mode, the contents of your renderbuffer are not guaranteed to remain valid after a call to presentRenderbuffer".
-Lewis

I actually found the issue with the iOS version. The user was running on iPad 4, iOS 6.1.2, as soon as I upgraded to 6.1.3 the problem went away. Hope this helps someone.
Thanks, Tim

I had this exact issue and it turned out to be a memory pressure related crash. It was consistently crashing for me when the map appeared with a black background instead of any tiles or grid backgrounds like normal on the fourth or fifth time the map was shown. This occurred on iOS 6.0 and 6.1 and beta of 7.0.
My view controller with the map view wasn't being deallocated after it was removed from the Navigation stack and it had a strong reference to the map view which kept it in memory.
After fixing my leak, the problem disappeared.

I just experienced this testing an App on my iPad. It's always run with no problems in simulator and also on the device but just now it crashed at the same point with the same error.
Here's my method - very simple map showing user location and no annotations:
- (void)mapView:(MKMapView *)mapView regionDidChangeAnimated:(BOOL)animated {
MKCoordinateSpan span = self.mapView.region.span;
zoomLevel = span.latitudeDelta;
shouldAdjustZoom = NO;
}
Here's the crash log
Incident Identifier: 01AE9C88-1F56-44D4-92A1-C6B5938DEBD4
CrashReporter Key: f372f86613043286b74e70a8d1f9d7b1b5313cf5
Hardware Model: iPad3,4
Process: MyApp [1247]
Path: /var/mobile/Applications/C39AEC49-8DB1-45DE-B175-A6AEC19D533F/MyApp.app/MyApp
Identifier: MyApp
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2013-07-15 08:25:16.390 +0200
OS Version: iOS 6.1.3 (10B329)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000044
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 IMGSGX554GLDriver 0x32ea6be0 0x32e99000 + 56288
1 IMGSGX554GLDriver 0x32ea6b8e 0x32e99000 + 56206
2 IMGSGX554GLDriver 0x32ea92f2 0x32e99000 + 66290
3 IMGSGX554GLDriver 0x32ea7f44 0x32e99000 + 61252
I ended a whole bunch of apps (mostly kids games) running in the background on the device and relaunched it and it then ran fine. Maybe helps someone pinpoint the exact problem and whether any changes in our Apps can prevent the crash.

Related

iOS App crashes in Thread 0

One of our users confronted us with the problem, that the App crashes directly after the app start. Now we only got two Crash Reports, but couldn't reproduce the Crash on any of our devices. The Build is an Enterprise Distribution Build.
The Device is an iPhone 4, with iOS 6.
Any idea would be much appreciated.
Date/Time: 2012-10-30 17:41:11.762 +0100
OS Version: iOS 6.0 (10A403)
Report Version: 104
Exception Type: EXC_CRASH (SIGTRAP)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_c.dylib 0x38edad8e memmove$VARIANT$CortexA8 + 654
1 QuartzCore 0x3401c81c CA::Render::Encoder::encode_bytes(void const*, unsigned long) + 24
2 QuartzCore 0x3401d494 CA::Render::Layer::Ext::encode(CA::Render::Encoder*) const + 152
3 QuartzCore 0x3401c706 CA::Render::encode_set_object(CA::Render::Encoder*, unsigned long, unsigned int, CA::Render::Object*, unsigned int) + 42
4 QuartzCore 0x3401b3e2 CA::Context::commit_layer(CA::Layer*, unsigned int, unsigned int, void*) + 114
5 QuartzCore 0x34011076 CA::Layer::commit_if_needed(CA::Transaction*, void (*)(CA::Layer*, unsigned int, unsigned int, void*), void*) + 310
6 QuartzCore 0x3401101c CA::Layer::commit_if_needed(CA::Transaction*, void (*)(CA::Layer*, unsigned int, unsigned int, void*), void*) + 220
7 QuartzCore 0x3401101c CA::Layer::commit_if_needed(CA::Transaction*, void (*)(CA::Layer*, unsigned int, unsigned int, void*), void*) + 220
8 QuartzCore 0x3401052c CA::Context::commit_transaction(CA::Transaction*) + 1024
9 QuartzCore 0x34010024 CA::Transaction::commit() + 312
10 QuartzCore 0x3400fe84 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 56
11 CoreFoundation 0x34e326ca __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 18
12 CoreFoundation 0x34e309bc __CFRunLoopDoObservers + 272
13 CoreFoundation 0x34e30d12 __CFRunLoopRun + 738
14 CoreFoundation 0x34da3eb8 CFRunLoopRunSpecific + 352
15 CoreFoundation 0x34da3d44 CFRunLoopRunInMode + 100
16 GraphicsServices 0x35b0c2e6 GSEventRunModal + 70
17 UIKit 0x379e92fc UIApplicationMain + 1116
18 MyApp 0x000ceb90 main (main.m:16)
19 MyApp 0x000ceb2c start + 36
Here's the second one:
Date/Time: 2012-10-29 15:54:48.926 +0100
OS Version: iOS 6.0 (10A403)
Report Version: 104
Exception Type: EXC_CRASH (SIGTRAP)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x33b1beb4 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x33b1c048 mach_msg + 36
2 CoreFoundation 0x34e32040 __CFRunLoopServiceMachPort + 124
3 CoreFoundation 0x34e30d5a __CFRunLoopRun + 810
4 CoreFoundation 0x34da3eb8 CFRunLoopRunSpecific + 352
5 CoreFoundation 0x34da3d44 CFRunLoopRunInMode + 100
6 GraphicsServices 0x35b0c2e6 GSEventRunModal + 70
7 UIKit 0x379e92fc UIApplicationMain + 1116
8 MyApp 0x00024b90 main (main.m:16)
9 MyApp 0x00024b2c start + 36
The first one I would suspect that you're animating things while they're being put onto the screen (since it happens during launch). Perhaps something UI-related you're doing in your application delegate, or otherwise doing from a view controller that isn't on the screen yet. That said, the Core Animation calls may be a red herring (see below).
The second one is unlikely the actual crash point. iOS cannot always determine which thread actually crashed, and sometimes will blame the wrong one (and most often thread 0 will be incorrectly blamed). Crashing in a _trap function is really unlikely. The thread is generally suspended at this point. I would study the other threads and see if one of them was doing something suspicious. If you find it elsewhere, then this could also be the cause of the first crash.

Will #try #catch work for SIGSEGV / SEGV_ACCERR

I have a crash in a third party component. It is clear that there is an underlying cause for this which I have to research. But to make this more robust in the meantime I want to surround the crashing call with a #try #catchblock.
I could not reproduce the crash so far so I can't really tell if the #try #catch will work in this case. My question in what type of cases does #try and #catch generally work.
Hardware Model: iPhone3,1
Process: MyApp [2084]
Path: /var/mobile/Applications/8B400A7D-88E7-4319-9C5D-F7E72DE8D960/MyApp.app/MyApp
Identifier: com.company.MyApp-Snapshot
Version: 7.2
Code Type: ARM
Parent Process: launchd [1]
Date/Time: 2012-09-07 14:04:14 +0000
OS Version: iPhone OS 5.1.1 (9B206)
Report Version: 104
Exception Type: SIGSEGV
Exception Codes: SEGV_ACCERR at 0xe1088602
Crashed Thread: 0
Thread 0 Crashed:
0 libobjc.A.dylib 0x35260f78 objc_msgSend + 15
1 UIKit 0x312363d7 -[UIView(Hierarchy) superview] + 50
*************************************************************************** |<---- UIView *superview = self.superview;
2 MyApp 0x000238f9 -[MBProgressHUD deviceOrientationDidChange:] (MBProgressHUD.m:622)
***************************************************************************
3 Foundation 0x37dc64ff __57-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke_0 + 18
4 CoreFoundation 0x3752d547 ___CFXNotificationPost_block_invoke_0 + 70
5 CoreFoundation 0x374b9097 _CFXNotificationPost + 1406
6 Foundation 0x37d3a3eb -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
7 UIKit 0x3123adeb -[UIDevice setOrientation:animated:] + 214
8 UIKit 0x3123616f -[UIApplication handleEvent:withNewEvent:] + 2718
9 UIKit 0x31235567 -[UIApplication sendEvent:] + 54
10 UIKit 0x31234f3b _UIApplicationHandleEvent + 5826
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
19 MyApp 0x00003643 main (main.m:16)
Update: Apparently SIGSEGV is not an exception that you can catch but caused by accessing memory which is not valid. From my perspective it would still be convenient to be able to catch this sort of exception, although getting the root of the problem was obviously the better approach to fix the problem.
Unfortunately, a try-catch frame will be good when code throws an exception, but will not help with a "signal". (The "SIG" in "SIGSEGV" means it was a signal.)
For dealing with signals, you must specify a signal handler for your application which will be called by the system when a signal is fired.
In the case of any type of SIGSEGV where the stack ends in objc_msgSend, you very likely have code trying to call a method of a released object.
On a device you can run with "NSZombies" enabled to help. This will keep small bits of objects around to throw exceptions when you try send messages to them.
The stack can be modified strangely when it ends in objc_msgSend, so the actual problem point may be different than you see in the crash log stacks.
Have you investigated NSSetUncaughtExceptionHandler ?
You can also use the signal function to map a signal such as SIGSEGV to a handler function

iPhone crash log - what is the reason?

I don't have much information when did it happened, because it didn't happened on my watch.
Anyone understand what was the reason?
Crash Log:
OS Version: iPhone OS 5.0 (9A334)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x80624913
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x37c38fbc objc_msgSend + 16
1 UIKit 0x32bc8cec -[UIScrollView(UIScrollViewInternal) _scrollViewAnimationEnded] + 128
2 UIKit 0x0061d7ee -[UIScrollViewAccessibility(SafeCategory) _scrollViewAnimationEnded] + 358
3 CoreFoundation 0x309f8224 -[NSObject performSelector:withObject:] + 36
4 UIKit 0x32b84c2a -[UIAnimator stopAnimation:] + 606
5 UIKit 0x32b845d4 -[UIAnimator(Static) _advance:withTimestamp:] + 260
6 UIKit 0x32b844c6 -[UIAnimator(Static) _LCDHeartbeatCallback:] + 46
7 QuartzCore 0x3219a41c CA::Display::DisplayLink::dispatch(unsigned long long, unsigned long long) + 160
8 QuartzCore 0x3219a372 CA::Display::IOMFBDisplayLink::callback(__IOMobileFramebuffer*, unsigned long long, unsigned long long, unsigned long long, void*) + 54
9 IOMobileFramebuffer 0x3577ff8c IOMobileFramebufferVsyncNotifyFunc + 76
10 IOKit 0x31d2d88a IODispatchCalloutFromCFMessage + 182
11 CoreFoundation 0x30a62f3c __CFMachPortPerform + 356
12 CoreFoundation 0x30a6d54c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 32
13 CoreFoundation 0x30a6d4ee __CFRunLoopDoSource1 + 134
14 CoreFoundation 0x30a6c33c __CFRunLoopRun + 1364
15 CoreFoundation 0x309ef4d6 CFRunLoopRunSpecific + 294
16 CoreFoundation 0x309ef39e CFRunLoopRunInMode + 98
17 GraphicsServices 0x3361dfe6 GSEventRunModal + 150
18 UIKit 0x32a6173c UIApplicationMain + 1084
19 MyApp 0x00002304 0x1000 + 4868
20 MyApp 0x00002298 0x1000 + 4760
Looks like a segmentation fault. It seems like (just by observing the trace) there's some memory issue going on when the UIScrollView finishes a scroll animation. Have you tried enabling NSZombies or putting a breakpoint that catches any kind of exception? I know you said it didn't happen on your watch, but if you could get a brief description of where it happened, maybe you can attempt to replicate it while debugging it in Xcode.

ABPeoplePicker Crash for Only One Person

I have an app that only crashes for one of my tester’s - no one else’s. But it crashes consistently for her. It’s very odd.
Details:
She has in iPhone 4 and an iPhone 3Gs
The app crashes on all OSes on BOTH phones
The app crashes with all contacts no matter how they were created
When she sends me her contacts they work fine on both my iPHone 4 and my 3G (not s)
She is the ONLY one that ever gets a crash and it is consistent across both phones and all OSes
She has uninstalled and reinstalled the app and the provisioning profile
She is syncing her iPhone with a windows machine version of iTunes
The crash happens when we use ABPeoplePicker.
From her perspective it looks like the minute she selects a phone number the app crashes.
Of course she is not in our app at that moment. She is in the ABPeoplePicker navigation view provided by Apple.
From the resymbolicated crash log it looks to me like it’s actually crashing when it is trying to return to our app. In other words I can’t find any mention of our app actually being responsible for the crash in the crash log (see below).
It looks like it’s not able to get the index of the selected phone number and then fails when trying to pop back into our app but that’s a guess at best.
I have read the Apple docs and tried to do due diligence in learning about how to read crash logs but I am still stumped.
Here are my questions:
1. Does anyone know what Exception Codes: 0x00000000, 0x00000000 means?
2. Am I correct in assuming that line 9 is where the actual issues is referred to? And if so how do I understand what objc_exception_throw + 64 means?
3. Can anyone shed some light on what this crash log says the problem is?
Incident Identifier:
CrashReporter Key:
Hardware Model: iPhone3,1
Process: My App [471]
Path:
Identifier: My App
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2010-12-06 16:32:44.088 -0600
OS Version: iPhone OS 4.0.2 (8A400)
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000, 0x00000000
Crashed Thread: 0
Thread 0 Crashed:
0 libSystem.B.dylib 0x000791d0 __kill + 8
1 libSystem.B.dylib 0x000791c0 kill + 4
2 libSystem.B.dylib 0x000791b2 raise + 10
3 libSystem.B.dylib 0x0008d6fa abort + 50
4 libstdc++.6.dylib 0x00044a20 __gnu_cxx::__verbose_terminate_handler() + 376
5 libobjc.A.dylib 0x000059ec _objc_terminate + 104
6 libstdc++.6.dylib 0x00042df2 __cxxabiv1::__terminate(void (*)()) + 46
7 libstdc++.6.dylib 0x00042e46 std::terminate() + 10
8 libstdc++.6.dylib 0x00042f16 __cxa_throw + 78
9 libobjc.A.dylib 0x000048cc objc_exception_throw + 64
10 CoreFoundation 0x0001fb72 -[__NSArrayI objectAtIndex:] + 154
11 My App 0x00005a68 0x1000 + 19048
12 My App 0x00005dec 0x1000 + 19948
13 UIKit 0x000668f4 -[UIViewController view] + 104
14 UIKit 0x000784e4 -[UIViewController contentScrollView] + 16
15 UIKit 0x00078354 -[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:] + 24
16 UIKit 0x00078252 -[UINavigationController _layoutViewController:] + 18
17 UIKit 0x00077d58 -[UINavigationController _startTransition:fromViewController:toViewController:] + 372
18 UIKit 0x00077b68 -[UINavigationController _startDeferredTransitionIfNeeded] + 176
19 UIKit 0x00066fa8 -[UINavigationController pushViewController:transition:forceImmediate:] + 600
20 UIKit 0x00066d40 -[UINavigationController pushViewController:animated:] + 28
21 My App 0x0000a29a 0x1000 + 37530
22 My App 0x0000bcba 0x1000 + 44218
23 AddressBookUI 0x00032cfc -[ABPeoplePickerNavigationController personViewController:shouldPerformDefaultActionForPerson:property:identifier:withMemberCell:] + 152
24 AddressBookUI 0x0003b8ce -[ABPersonViewControllerHelper personTableViewDataSource:selectedPropertyAtIndex:inPropertyGroup:withMemberCell:forEditing:] + 222
25 AddressBookUI 0x0004a17c -[ABPersonTableViewDataSource valueAtIndex:selectedForPropertyGroup:withMemberCell:forEditing:] + 40
26 AddressBookUI 0x00048c00 -[ABPersonTableViewDataSource tableView:didSelectRowAtIndexPath:] + 316
27 UIKit 0x00091f40 -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 656
28 UIKit 0x0009db40 -[UITableView _userSelectRowAtIndexPath:] + 124
29 Foundation 0x00086c86 __NSFireDelayedPerform + 362
30 CoreFoundation 0x00071a54 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 8
31 CoreFoundation 0x00073ede __CFRunLoopDoTimer + 854
32 CoreFoundation 0x0007485e __CFRunLoopRun + 1082
33 CoreFoundation 0x0001d8e4 CFRunLoopRunSpecific + 224
34 CoreFoundation 0x0001d7ec CFRunLoopRunInMode + 52
35 GraphicsServices 0x000036e8 GSEventRunModal + 108
36 GraphicsServices 0x00003794 GSEventRun + 56
37 UIKit 0x000062a0 -[UIApplication _run] + 396
38 UIKit 0x00004e10 UIApplicationMain + 664
39 My App 0x0000d694 0x1000 + 50836
40 My App 0x00002d00 0x1000 + 7424
Here is my ABPeoplePicker code.
#pragma mark ABPeoplePickerNavigationControllerDelegate methods
// Displays the information of a selected person
- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person
{
return YES;
}
// Does not allow users to perform default actions such as dialing a phone number, when they select a person property.
- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker
shouldContinueAfterSelectingPerson:(ABRecordRef)person
property:(ABPropertyID)property
identifier:(ABMultiValueIdentifier)identifier {
CFStringRef cfName = ABRecordCopyCompositeName(person);
self.selectedName = [NSString stringWithString:(NSString *)cfName];
CFRelease(cfName);
ABMultiValueRef allThePhoneNums = ABRecordCopyValue(person, kABPersonPhoneProperty);
// ABMultiValueGetIndexForIdentifier the exact value of the "identifier" passed to us.
NSString *number = (NSString *)ABMultiValueCopyValueAtIndex(allThePhoneNums, ABMultiValueGetIndexForIdentifier(allThePhoneNums, identifier));
self.selectedNumber = number;
[number release];
CFRelease(allThePhoneNums);
[self showDialOutToPartViewControllerWithName:self.selectedName andNumber:self.selectedNumber];
[peoplePicker dismissModalViewControllerAnimated:YES];
return NO;
}
// Dismisses the people picker and shows the application when users tap Cancel.
- (void)peoplePickerNavigationControllerDidCancel:(ABPeoplePickerNavigationController *)peoplePicker; {
[self dismissModalViewControllerAnimated:YES];
}
Foremost, it helps to symbolicate your crash logs using the symbolicatecrash tool and the DSYM file that was generated when you compiled it. I won't discuss how to do that here -- you can search Google to find more details; try "symbolicate crash log DSYM" as keywords.
Once you do that, instead of:
My App 0x0232032+433
It will show something like this:
My App [className callSomeMethod:argument]
Much easier to find the line of code that is spawning the problem.
However - note in the stack trace that the last line of code is [array objectAtIndex:] in Foundation. This method will throw an NSRangeException when you pass an index outside of the bounds of the receiver (e.g. array). From the NSArray docs:
If index is beyond the end of the
array (that is, if index is greater
than or equal to the value returned by
count), an NSRangeException is raised.
So, I'd put my money on that being your crash.
Then the question is - after you symbolicate your crash log - what line of your code is calling an array with an out-of-bounds index?

iPhone: App crash in MapView after 20 min

I am working on an app that tracks a users location. After about 20 minutes it seems that the app always crashes, and I am not sure why. Device logs show:
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x069f6000
Crashed Thread: 0
Thread 0 Crashed:
0 Ride 0x00012e00 -[Route addCoordinate:] (Route.m:92)
1 Ride 0x0000877a -[MyRidesMapViewController locationManager:didUpdateToLocation:fromLocation:] (MyRidesMapViewController.m:528)
2 CoreLocation 0x0000931c -[CLLocationManager onClientEventLocation:] + 584
3 CoreLocation 0x00007552 -[CLLocationManager onClientEvent:supportInfo:] + 98
4 CoreLocation 0x000076a0 OnClientEvent + 16
5 CoreLocation 0x00002ade CLClientInvokeCallback(__CLClient*, CLClientEvent, __CFDictionary const*) + 42
6 CoreLocation 0x0000512c CLClientHandleDaemonDataLocation(__CLClient*, CLClientLocation const*, __CFDictionary const*) + 204
7 CoreLocation 0x0000528a CLClientHandleDaemonData(__CFMessagePort*, long, __CFData const*, void*) + 298
8 CoreFoundation 0x0006936a __CFMessagePortPerform + 242
9 CoreFoundation 0x00071aa4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 20
10 CoreFoundation 0x00073848 __CFRunLoopDoSource1 + 160
11 CoreFoundation 0x00074626 __CFRunLoopRun + 514
12 CoreFoundation 0x0001d8e4 CFRunLoopRunSpecific + 224
13 CoreFoundation 0x0001d7ec CFRunLoopRunInMode + 52
14 GraphicsServices 0x000036e8 GSEventRunModal + 108
15 GraphicsServices 0x00003794 GSEventRun + 56
16 UIKit 0x000062a0 -[UIApplication _run] + 396
17 UIKit 0x00004e10 UIApplicationMain + 664
18 Ride 0x00002a20 main (main.m:14)
19 Ride 0x000029d4 start + 32
Looks like I am trying to release something that has already been released, but what?! I have NSZombie enabled, and it does not seem to help.
It used to work, and I recently updated my class to use self. for anything that I synthesized, could this be the issue?
EDIT: I updated the error. It seems to be listing the line numbers for each line, but they do not seem to be helping to find the issue.
Do you have NSZombie enabled while you're running on the device? If so chances are you are running out of memory. As you know, NSZombie keeps released objects around so you can detect a double release.
Chances are you do have some memory issues though. Does the static analyzer show you anything? (shift-command-A).
Setting the location manager delegate to nil AND THEN releasing it fixed the crash for me.