iPhone SIGSEGV crash with any level of Optimization using ARC+ASIHTTPRequest - optimization

I currently use ASIHTTPRequest for synchronous requests
I recently refactored my code to comply with ARC and omit the ASIHTTPRequest class using the compiler flag -fno-objc-arc
I have a _mh_execute_header SIGSEGV crash when I use any type of optimization
While turning off all optimization allows my app to run - I need to be able to optimize the app using the iOS default settings which use Fastest, Smallest [-Os]
Since this is a memory related issue and since the only manually managed memory resides within ASIHTTPRequest - is using ASI with ARC my problem?
Stack Trace:
Thread: Unknown Name (Crashed)
0 libobjc.A.dylib 0x37b9ef7e objc_msgSend + 21
1 Test 0x000dcda5 _mh_execute_header + 126373
2 Test 0x000dc4b9 _mh_execute_header + 124089
3 Test 0x000cd801 _mh_execute_header + 63489
4 Test 0x000ce39d _mh_execute_header + 66461
5 Test 0x000cf561 _mh_execute_header + 71009
6 Test 0x000d3e3d _mh_execute_header + 89661
7 UIKit 0x3334ccbd -[UITextField keyboardInput:shouldInsertText:isMarkedText:] + 148
8 UIKit 0x3334cc1f -[UIFieldEditor keyboardInput:shouldInsertText:isMarkedText:] + 94
9 UIKit 0x3334cbb9 -[UIKeyboardImpl callShouldInsertText:] + 108
10 UIKit 0x3334bb5b -[UIKeyboardImpl addInputString:fromVariantKey:] + 114
11 UIKit 0x3334bae1 -[UIKeyboardImpl handleStringInput:fromVariantKey:] + 164
12 UIKit 0x3334a775 -[UIKeyboardImpl handleKeyEvent:] + 1320
13 UIKit 0x334e48a3 -[UIKeyboardLayoutStar sendStringAction:forKey:isPopupVariant:] + 486
14 UIKit 0x33348dcd -[UIKeyboardLayoutStar touchUp:] + 3196
15 UIKit 0x333480fd -[UIKeyboardLayout touchesEnded:withEvent:] + 380
16 UIKit 0x3324b92b -[UIWindow _sendTouchesForEvent:] + 318
17 UIKit 0x3324b319 -[UIWindow sendEvent:] + 380
18 UIKit 0x33231695 -[UIApplication sendEvent:] + 356
19 UIKit 0x33230f3b _UIApplicationHandleEvent + 5826
20 GraphicsServices 0x373f022b PurpleEventCallback + 882
21 CoreFoundation 0x357d1523 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 38
22 CoreFoundation 0x357d14c5 __CFRunLoopDoSource1 + 140
23 CoreFoundation 0x357d0313 __CFRunLoopRun + 1370
24 CoreFoundation 0x357534a5 CFRunLoopRunSpecific + 300
25 CoreFoundation 0x3575336d CFRunLoopRunInMode + 104
26 GraphicsServices 0x373ef439 GSEventRunModal + 136
27 UIKit 0x3325fcd5 UIApplicationMain + 1080
28 Test 0x000bfc1b _mh_execute_header + 7195

Related

EXC_BAD_ACCESS KERN_INVALID_ADDRESS at SFApplication sendEvent

Getting this error intermittently in production. Fails on objMsgSend for isKindOfClass. Having difficulty reproducing in development, would like to be able to do so. Have tried showing and dismissing the UIAlertController with other view controllers on the screen, moving to and from background etc. EDIT: Have now been able to reproduce this. Occurs when the UIAlertController appears with (shows underneath) an existing popover in the app. EDIT2: Appears to be an issue on iOS8, but less frequent although still occurring in iOS9
Thread : Crashed: com.apple.main-thread 0 libobjc.A.dylib
0x0000000194d8bbd0 objc_msgSend + 16 1 UIKit
0x0000000188a2d384 -[UIWindow setDelegate:] + 132 2 UIKit
0x0000000188cb5cd4 -[UIPresentationController
runTransitionForCurrentState] + 592 3 UIKit
0x0000000188cd1cd8 -[UIViewController
_dismissViewControllerWithAnimationController:interactionController:completion:]
+ 672 4 UIKit 0x0000000188ae0258 -[UIViewController _dismissViewControllerWithTransition:from:completion:] + 852 5 UIKit 0x0000000188a8875c -[UIViewController
dismissViewControllerWithTransition:completion:] + 952 6 UIKit
0x0000000188a88344 -[UIViewController
dismissViewControllerAnimated:completion:] + 252 7 UIKit
0x0000000188d84d7c -[UIAlertController
_dismissAnimated:triggeringAction:triggeredByPopoverDimmingView:] + 420 8 UIKit 0x00000001889ac750
_UIGestureRecognizerUpdate + 8536 9 UIKit 0x00000001889e68dc -[UIWindow _sendGesturesForEvent:] + 1044 10 UIKit
0x00000001889e5f7c -[UIWindow sendEvent:] + 660 11 UIKit
0x00000001889b968c -[UIApplication sendEvent:] + 264 12 iPath
0x000000010023c3cc -[SFApplication sendEvent:] (SFApplication.m:72) 13
UIKit 0x0000000188c5860c
_UIApplicationHandleEventFromQueueEvent + 14992 14 UIKit 0x00000001889b7bf4 _UIApplicationHandleEventQueue + 1616 15
CoreFoundation 0x00000001841c29ec
CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 24 16 CoreFoundation 0x00000001841c1c90
__CFRunLoopDoSources0 + 264 17 CoreFoundation 0x00000001841bfd40 __CFRunLoopRun + 712 18 CoreFoundation
0x00000001840ed0a4 CFRunLoopRunSpecific + 396 19 GraphicsServices
0x000000018d25b5a4 GSEventRunModal + 168 20 UIKit
0x0000000188a1eaa4 UIApplicationMain + 1488 21 iPath
0x00000001000ca308 main (main.m:33) 22 libdyld.dylib
0x00000001953e6a08 start + 4

SIGSEGV SEGV_ACCERR in ios6

I have developed the ios App for a client . The application is crashing in regular interval in ios 6 . The application is GPS based and run background and foreground . Below is the crash report which I received:
libobjc.A.dylib 0x3a7c25b0 objc_msgSend + 16
Foundation 0x33306599 -[NSNotificationCenter
postNotificationName:object:userInfo:] + 73
Foundation 0x3330a05b -[NSNotificationCenter
postNotificationName:object:] + 31
UIKit 0x34a01307 -[UIApplication _performMemoryWarning] +
103
libdispatch.dylib 0x3abde4b7 _dispatch_client_callout + 23
libdispatch.dylib 0x3abe5139 _dispatch_source_invoke$VARIANT$mp + 253
libdispatch.dylib 0x3abe317f _dispatch_main_queue_callback_4CF$VARIANT$mp + 163
CoreFoundation 0x32a72f3b __CFRunLoopRun + 1291
CoreFoundation 0x329e5ebd CFRunLoopRunSpecific + 357
CoreFoundation 0x329e5d49 CFRunLoopRunInMode + 105
GraphicsServices 0x365be2eb GSEventRunModal + 75
UIKit 0x348fb301 UIApplicationMain + 1121
Can anybody let me know what is the above issue is about ?
Surjan

iOS App crash issue `[UIWindow warpPoint:]`

I found a weird crash issue in my app, and I can't got enough message from the crash report.
Here is the crash report:
-[TileLayer _isChargeEnabled]: unrecognized selector sent to instance 0x14aeadb0
(null)
(
0 CoreFoundation 0x376298a7 __exceptionPreprocess + 186
1 libobjc.A.dylib 0x3169e259 objc_exception_throw + 32
2 CoreFoundation 0x3762ca9b -[NSObject doesNotRecognizeSelector:] + 174
3 CoreFoundation 0x3762b915 ___forwarding___ + 300
4 CoreFoundation 0x37586650 _CF_forwarding_prep_0 + 48
5 UIKit 0x30775e43 -[UIWindow warpPoint:] + 686
6 UIKit 0x3075c1ff _UIApplicationHandleEvent + 2438
7 GraphicsServices 0x3777922b PurpleEventCallback + 882
8 CoreFoundation 0x375fd523 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 38
9 CoreFoundation 0x375fd4c5 __CFRunLoopDoSource1 + 140
10 CoreFoundation 0x375fc313 __CFRunLoopRun + 1370
11 CoreFoundation 0x3757f4a5 CFRunLoopRunSpecific + 300
12 CoreFoundation 0x3757f36d CFRunLoopRunInMode + 104
13 GraphicsServices 0x37778439 GSEventRunModal + 136
14 UIKit 0x3078bcd5 UIApplicationMain + 1080
15 Movie 0x00022eb3 _mh_execute_header + 7859
16 Movie 0x00022e40 _mh_execute_header + 7744
)
Well, it means you tried passing a message (a.k.a calling a method) _isChargeEnabled to an object of class TileLayer, but it is non-existent.
UPDATE
I did a quick google search and turns out _isChargeEnabled is private API of Apple. You could check this and this for more information.

App Crashes without going through my code

While analyzing our crash logs I discovered that a fairly common crash is one that does not even occur in one of my own classes. These are external crash logs and I can't therefore not reproduce the problem.
Since I can't debug the Framework I am wondering, what a practicable approach could be to tackle this issue.
The only clue I have is that SIGSEGV might be a segmentation fault or an invalid pointer. But like I said since my Classes do not seem to be directly involved this does not help me much.
The Crash:
Exception Type: SIGSEGV
Exception Codes: SEGV_ACCERR at 0x6b636f6c
Crashed Thread: 0
Thread 0 Crashed:
0 libobjc.A.dylib 0x365c7f94 objc_msgSend + 43
1 CoreFoundation 0x31cd23fd -[NSObject performSelector:withObject:withObject:] + 52
2 UIKit 0x3291cfaf -[UIApplication sendAction:to:from:forEvent:] + 62
3 UIKit 0x3291cf6b -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 30
4 UIKit 0x3291cf49 -[UIControl sendAction:to:forEvent:] + 44
5 UIKit 0x3291ccb9 -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 492
6 UIKit 0x3291d5f1 -[UIControl touchesEnded:withEvent:] + 476
7 UIKit 0x3291bad3 -[UIWindow _sendTouchesForEvent:] + 318
8 UIKit 0x3291b4c1 -[UIWindow sendEvent:] + 380
9 UIKit 0x3290183d -[UIApplication sendEvent:] + 356
10 UIKit 0x329010e3 _UIApplicationHandleEvent + 5826
11 GraphicsServices 0x3572d22b PurpleEventCallback + 882
12 CoreFoundation 0x31d4c523 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 38
13 CoreFoundation 0x31d4c4c5 __CFRunLoopDoSource1 + 140
14 CoreFoundation 0x31d4b313 __CFRunLoopRun + 1370
15 CoreFoundation 0x31cce4a5 CFRunLoopRunSpecific + 300
16 CoreFoundation 0x31cce36d CFRunLoopRunInMode + 104
17 GraphicsServices 0x3572c439 GSEventRunModal + 136
18 UIKit 0x3292fe7d UIApplicationMain + 1080
19 MyApp 0x0000321f main (main.m:14)
This crash is likely a result of an error on your part. If you look at few of lines at the top of the stack trace it should give you a hint as to what is wrong.
1 CoreFoundation 0x31cd23fd -[NSObject performSelector:withObject:withObject:] + 52
2 UIKit 0x3291cfaf -[UIApplication sendAction:to:from:forEvent:] + 62
3 UIKit 0x3291cf6b -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 30
4 UIKit 0x3291cf49 -[UIControl sendAction:to:forEvent:] + 44
It looks like somewhere you have an object (possibly a view controller) that is registered for events but is deallocated too soon. The best thing to do is try to reproduce this while attached to the debugger. Start by checking code that handles UIControl callbacks such as UIButtons.

This class is not key value coding-compliant for the key featured

I suspect some code is trying to use my FooterArchiveView similar to a NSDictionary so I tried using breakpoints to find the bottleneck but my breakpoints are sending me on a wild goose chase into system files like UINibDecoderDecodeObjectForValue. What should I do?
2012-03-08 08:35:55.417 JOM App[44161:207] Uncaught exception: [<FooterArchiveView 0x9b27770> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key featured.
2012-03-08 08:35:55.420 JOM App[44161:207] Stack trace: (
0 CoreFoundation 0x0169c06e __exceptionPreprocess + 206
1 libobjc.A.dylib 0x01c50d0a objc_exception_throw + 44
2 CoreFoundation 0x0169bf11 -[NSException raise] + 17
3 Foundation 0x00f89032 -[NSObject(NSKeyValueCoding) setValue:forUndefinedKey:] + 282
4 Foundation 0x00efaf7b _NSSetUsingKeyValueSetter + 136
5 Foundation 0x00efaeeb -[NSObject(NSKeyValueCoding) setValue:forKey:] + 287
6 UIKit 0x00628268 -[UIView(CALayerDelegate) setValue:forKey:] + 168
7 Foundation 0x00f15d60 -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 393
8 UIKit 0x0080891a -[UIRuntimeOutletConnection connect] + 106
9 CoreFoundation 0x0169de1a -[NSObject performSelector:] + 58
10 CoreFoundation 0x01607821 -[NSArray makeObjectsPerformSelector:] + 273
11 UIKit 0x0080746e -[UINib instantiateWithOwner:options:] + 1178
12 UIKit 0x00809010 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 157
13 JOM App 0x0000e9ca -[ContentView setContent:] + 1258
14 JOM App 0x0000c906 -[NavigationView devotionsTUI:] + 390
15 CoreFoundation 0x0169dec9 -[NSObject performSelector:withObject:withObject:] + 73
16 UIKit 0x005ec5c2 -[UIApplication sendAction:to:from:forEvent:] + 96
17 UIKit 0x005ec55a -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61
18 UIKit 0x00691b76 -[UIControl sendAction:to:forEvent:] + 66
19 UIKit 0x0069203f -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 503
20 UIKit 0x006912fe -[UIControl touchesEnded:withEvent:] + 549
21 UIKit 0x00611a30 -[UIWindow _sendTouchesForEvent:] + 513
22 UIKit 0x00611c56 -[UIWindow sendEvent:] + 273
23 UIKit 0x005f8384 -[UIApplication sendEvent:] + 464
24 UIKit 0x005ebaa9 _UIApplicationHandleEvent + 8196
25 GraphicsServices 0x02589fa9 PurpleEventCallback + 1274
26 CoreFoundation 0x016701c5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
27 CoreFoundation 0x015d5022 __CFRunLoopDoSource1 + 146
28 CoreFoundation 0x015d390a __CFRunLoopRun + 2218
29 CoreFoundation 0x015d2db4 CFRunLoopRunSpecific + 212
30 CoreFoundation 0x015d2ccb CFRunLoopRunInMode + 123
31 GraphicsServices 0x02588879 GSEventRunModal + 207
32 GraphicsServices 0x0258893e GSEventRun + 114
33 UIKit 0x005e9a9b UIApplicationMain + 1175
34 JOM App 0x000027d2 main + 178
35 JOM App 0x00002715 start + 53
36 ??? 0x00000001 0x0 + 1
)
"This class is not key value coding-compliant for the key featured." means that a class is trying to set a property on an object through key-value coding, only to find that it cannot. This most often occurs when you've defined an outlet, connected it in a nib, then removed the outlet from your code, leaving a dangling connection in the nib. When the nib is deserialised, it tries to connect up the outlet using key-value coding and you see the error above.