MKMapView crash - iphone

I could not figure out when exactly crash, because sometimes it happens and most time not. It crash when added new annotation and the pin has dropped down, or when the pin location has changed(drag).
My ios version is 4.3.1
Crash:
Thread 0 Crashed:
0 libobjc.A.dylib 0x3489dc98 objc_msgSend + 16
1 MapKit 0x336699a4 -[MKMapView mapTileViewDidStartLoading:] + 40
2 CoreFoundation 0x33589efc -[NSObject(NSObject) performSelector:withObject:] + 16
3 Foundation 0x327657a2 __NSThreadPerformPerform + 262
4 CoreFoundation 0x335f3a72 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 6
5 CoreFoundation 0x335f5758 __CFRunLoopDoSources0 + 376
6 CoreFoundation 0x335f64e4 __CFRunLoopRun + 224
7 CoreFoundation 0x33586ebc CFRunLoopRunSpecific + 224
8 CoreFoundation 0x33586dc4 CFRunLoopRunInMode + 52
9 GraphicsServices 0x33187418 GSEventRunModal + 108
10 GraphicsServices 0x331874c4 GSEventRun + 56
Sorry for my English, thanks in advence

mapTileViewDidStartLoading change this to mapViewDidStartLoading

Related

Need help in finding crash cause

Below are the crash logs from an iPad. I'm getting this crash randomly while I'm pushing and popping out a UIViewController from Navigation controller. Any help/pointer is appreciated.
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000000
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x31430386 _ZL12realizeClassP7class_t + 34
1 libobjc.A.dylib 0x314303e6 _ZL12realizeClassP7class_t + 130
2 libobjc.A.dylib 0x3142a836 prepareForMethodLookup + 74
3 libobjc.A.dylib 0x3142a740 lookUpMethod + 40
4 libobjc.A.dylib 0x3142a70c _class_lookupMethodAndLoadCache3 + 12
5 libobjc.A.dylib 0x31429fc4 objc_msgSend_uncached + 20
6 UIKit 0x3186553e -[UINavigationItem _accumulateViewsFromItems:isLeft:refreshViews:] + 270
7 UIKit 0x31851244 -[UINavigationItem _updateViewsForBarSizeChangeAndApply:] + 124
8 UIKit 0x319e023a __33-[UINavigationBar layoutSubviews]_block_invoke_0 + 250
9 UIKit 0x31838b46 +[UIView(Animation) _performWithoutAnimation:] + 62
10 UIKit 0x3184d2e2 -[UINavigationBar layoutSubviews] + 382
11 UIKit 0x31814f30 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 176
12 CoreFoundation 0x315431f4 -[NSObject performSelector:withObject:] + 36
13 QuartzCore 0x35459a9e -[CALayer layoutSublayers] + 210
14 QuartzCore 0x354596b6 CA::Layer::layout_if_needed(CA::Transaction*) + 210
15 QuartzCore 0x3545d83c CA::Context::commit_transaction(CA::Transaction*) + 220
16 QuartzCore 0x3545d578 CA::Transaction::commit() + 308
17 QuartzCore 0x354554b2 CA:::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 50
18 CoreFoundation 0x315b8b14 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 12
19 CoreFoundation 0x315b6d50 __CFRunLoopDoObservers + 252
20 CoreFoundation 0x315b70aa __CFRunLoopRun + 754
21 CoreFoundation 0x3153a49e CFRunLoopRunSpecific + 294
22 CoreFoundation 0x3153a366 CFRunLoopRunInMode + 98
23 GraphicsServices 0x32a13432 GSEventRunModal + 130
24 UIKit 0x3183fcce UIApplicationMain + 1074
25 SmartClassTPS 0x000b551a main (main.m:16)
26 SmartClassTPS 0x000b5170 start + 32
Was able to figure out long back but forgot to update here. KVO observer not removed! Silly me :-|. BTW thanks for the support. SO rocks.
Most probably you forgot to clear some delegates before releasing an object.

EXEC_BAD_ACCESS Error [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How do I set up NSZombieEnabled in Xcode 4?
I am debugging an application and it throws an exec-bad-access error when performing a certain navigation function but only when i run it on a device.
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0xf0000008
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x3421bf78 objc_msgSend + 16
1 UIKit 0x31d9a28c -[UIWebView webView:decidePolicyForNavigationAction:request:frame:decisionListener:] + 68
2 CoreFoundation 0x321ce7dc __invoking___ + 60
3 CoreFoundation 0x321297aa -[NSInvocation invoke] + 154
4 CoreFoundation 0x321293c8 -[NSInvocation invokeWithTarget:] + 44
5 WebKit 0x365f6e06 -[_WebSafeForwarder forwardInvocation:] + 246
6 CoreFoundation 0x321cda7c ___forwarding___ + 660
7 CoreFoundation 0x32128648 _CF_forwarding_prep_0 + 40
8 CoreFoundation 0x321ce7dc __invoking___ + 60
9 CoreFoundation 0x321297aa -[NSInvocation invoke] + 154
10 WebCore 0x358fa1ee _ZL11SendMessageP12NSInvocation + 18
11 WebCore 0x3590d6ea _ZL20HandleDelegateSourcePv + 74
12 CoreFoundation 0x3219facc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 8
13 CoreFoundation 0x3219f298 __CFRunLoopDoSources0 + 208
14 CoreFoundation 0x3219e03e __CFRunLoopRun + 646
15 CoreFoundation 0x3212149e CFRunLoopRunSpecific + 294
16 CoreFoundation 0x32121366 CFRunLoopRunInMode + 98
17 GraphicsServices 0x31278432 GSEventRunModal + 130
18 UIKit 0x31c20cce UIApplicationMain + 1074
19 Parliament 0x0007396a main (main.m:14)
20 Parliament 0x00073928 start + 32
This is the error log. Would anyone know why this is or how i could debug errors such as this since running thruogh an instrument doesnt hep
You possibly have released an object and subsequently try to access that object in your webView:decidePolicyForNavigationAction delegate method.
Enable "Zombie" detection in your debug build settings:
How do I set up NSZombieEnabled in Xcode 4?
This will help you identify if an object is not being properly retained.

Getting to the bottom of crash

I have the following crash that I can't replicate on demand but does happen enough to get noticed by the users.
This crash report has been symbolicated as well. How would you find out the cause!!! This only seems to happen on 4.1
Exception Type: SIGSEGV
Exception Codes: SEGV_ACCERR at 0x9f069184
Crashed Thread: 0
Thread 0 Crashed:
0 libobjc.A.dylib 0x000027d8 objc_msgSend + 16
1 CoreFoundation 0x0007d749 ____CFXNotificationPost_old_block_invoke_1 + 45
2 libSystem.B.dylib 0x000d5984 _dispatch_call_block_and_release + 20
3 libSystem.B.dylib 0x000d66b0 _dispatch_continuation_pop + 72
4 libSystem.B.dylib 0x000d69fc _dispatch_main_queue_callback_4CF + 220
5 CoreFoundation 0x0002789b __CFRunLoopRun + 1335
6 CoreFoundation 0x00027277 CFRunLoopRunSpecific + 231
7 CoreFoundation 0x0002717f CFRunLoopRunInMode + 59
8 GraphicsServices 0x000045f3 GSEventRunModal + 115
9 GraphicsServices 0x0000469f GSEventRun + 63
10 UIKit 0x00004123 -[UIApplication _run] + 403
11 UIKit 0x0000212f UIApplicationMain + 671
12 MyApp 0x000024e3 main (main.m:17)
I have since managed to get a little more info, but not much.
2012-02-12 18:03:04.556 MyApp[462:307] (null): unrecognized selector sent to class 0x3e0a360c
2012-02-12 18:03:04.618 MyApp[462:307] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '(null): unrecognized selector sent to class 0x3e0a360c'
*** Call stack at first throw:
(
0 CoreFoundation 0x33506ed3 __exceptionPreprocess + 114
1 libobjc.A.dylib 0x30412811 objc_exception_throw + 24
2 CoreFoundation 0x335086ff +[NSObject(NSObject) doesNotRecognizeSelector:] + 102
3 CoreFoundation 0x334b01d9 ___forwarding___ + 508
4 CoreFoundation 0x334aff90 _CF_forwarding_prep_0 + 48
5 Foundation 0x302a86b3 _nsnote_callback + 142
6 CoreFoundation 0x334e4749 ____CFXNotificationPost_old_block_invoke_1 + 44
7 libSystem.B.dylib 0x31d05984 _dispatch_call_block_and_release + 20
8 libSystem.B.dylib 0x31d066b0 _dispatch_continuation_pop + 72
9 libSystem.B.dylib 0x31d069fc _dispatch_main_queue_callback_4CF + 220
10 CoreFoundation 0x3348e89b __CFRunLoopRun + 1334
11 CoreFoundation 0x3348e277 CFRunLoopRunSpecific + 230
12 CoreFoundation 0x3348e17f CFRunLoopRunInMode + 58
13 GraphicsServices 0x31b5e5f3 GSEventRunModal + 114
14 GraphicsServices 0x31b5e69f GSEventRun + 62
15 UIKit 0x341bd123 -[UIApplication _run] + 402
16 UIKit 0x341bb12f UIApplicationMain + 670
Now all of my addObservers are block based so I can't see why it would lead to an unrecognised selector.
This way won't help us much while Debugging crash. I found one of the best way to Debug the code for Crash. Follow the link for debugging technique:
https://cocoadev.com/DebuggingAutorelease.html
You need to analyze your Console very carefully to see actually why the Crash occurs. This helped me in almost all of the Code that are without ARC enabled.

titanium-mobile reading an iPhone stack trace

I have no idea how to interpret a stack trace console output for my iPhone app. Can anyone point me to a primer or other source that would help me decipher it? Here's the output in case you can explain the error. I'm interested also in learning how to read them on my own.
[ERROR] The application has crashed with an unhandled exception. Stack trace:
0 CoreFoundation 0x023a158c __exceptionPreprocess + 156
1 libobjc.A.dylib 0x024f5313 objc_exception_throw + 44
2 CoreFoundation 0x02359ef8 +[NSException raise:format:arguments:] + 136
3 Foundation 0x007063bb -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 116
4 UIKit 0x00989e8b -[UITableView(_UITableViewPrivate) _endCellAnimationsWithContext:] + 8420
5 UIKit 0x00978d36 -[UITableView insertRowsAtIndexPaths:withRowAnimation:] + 56
6 mobiletributes-app 0x0009ef7e -[TiUITableView dispatchAction:] + 7774
7 Foundation 0x0068a94e __NSThreadPerformPerform + 251
8 CoreFoundation 0x023828ff __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
9 CoreFoundation 0x022e088b __CFRunLoopDoSources0 + 571
10 CoreFoundation 0x022dfd86 __CFRunLoopRun + 470
11 CoreFoundation 0x022df840 CFRunLoopRunSpecific + 208
12 CoreFoundation 0x022df761 CFRunLoopRunInMode + 97
13 GraphicsServices 0x041a71c4 GSEventRunModal + 217
14 GraphicsServices 0x041a7289 GSEventRun + 115
15 UIKit 0x00919c93 UIApplicationMain + 1160
16 mobiletributes-app 0x0000473a main + 410
17 mobiletributes-app 0x00003005 start + 53
the code execution is from bottom to top (wikipedia). without seeing any code it's difficult. you're adding a tableViewRow at a specific index and it fails:
[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:]
[UITableView(_UITableViewPrivate) _endCellAnimationsWithContext:]
[UITableView insertRowsAtIndexPaths:withRowAnimation:]
maybe you're adding a row at an invalid index or to a section that doesn't exist.

SIGABRT crash on __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__

I have a SIGABRT crash log that is unfamiliar to me. Looks like it's throwing an exception, but I can't see where the exception is listed or the root cause of it.
This is running on a customer's iPad 2 / iOS 4.3.
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x33ed3a1c __pthread_kill + 8
1 libsystem_c.dylib 0x354d83b4 pthread_kill + 52
2 libsystem_c.dylib 0x354d0bf8 abort + 72
3 libstdc++.6.dylib 0x33671a64 __gnu_cxx::__verbose_terminate_handler() + 376
4 libobjc.A.dylib 0x3636906c _objc_terminate + 104
5 libstdc++.6.dylib 0x3366fe36 __cxxabiv1::__terminate(void (*)()) + 46
6 libstdc++.6.dylib 0x3366fe8a std::terminate() + 10
7 libstdc++.6.dylib 0x3366ff5a __cxa_throw + 78
8 libobjc.A.dylib 0x36367c84 objc_exception_throw + 64
9 Foundation 0x33f69924 __NSThreadPerformPerform + 648
10 CoreFoundation 0x33e4ba72 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 6
11 CoreFoundation 0x33e4d758 __CFRunLoopDoSources0 + 376
12 CoreFoundation 0x33e4e4e4 __CFRunLoopRun + 224
13 CoreFoundation 0x33ddeebc CFRunLoopRunSpecific + 224
14 CoreFoundation 0x33ddedc4 CFRunLoopRunInMode + 52
15 GraphicsServices 0x33544418 GSEventRunModal + 108
16 GraphicsServices 0x335444c4 GSEventRun + 56
17 UIKit 0x34416d62 -[UIApplication _run] + 398
18 UIKit 0x34414800 UIApplicationMain + 664
19 MyApp 0x000190c4 main (main.m:14)
20 MyApp 0x0001907c 0x18000 + 4220
Where would I start looking to diagnose this?
The program should print information about the exception to the device console (viewable in the Xcode organizer when the device is connected). It would be very, very helpful to see this information.
_NSThreadPerformPerform is used by the performSelector... family of methods. So look at your use of those methods. In particular, figure out if it's possible that you're asking an object to perform a selector that it doesn't support. That would throw an exception.