iOS 7 App Crash EXC_CRASH (SIGABRT) objc_exception_throw Works fine on iOS 6

2

Our app is crashing in iOS 7, its working fine in iOS 6. We are not sure what is causing the issue. We can see that there is some exception thrown but we are not sure where in code is causing that.

Here is the crash report:

Incident Identifier: 1F589930-15BD-49F7-80E6-831A95092FDF
CrashReporter Key:   aaa79870161ff1e371394b881a26e97f0066f464
Hardware Model:      iPhone5,2
Process:             myapp [1492]
Path:                /var/mobile/Applications/A121DF2F-A7B9-4DD9-9FBC-BB06CD7C5EF5/myapp.app/myapp
Identifier:          co.uk.myapp
Version:             1.0 (0.9)
Code Type:           ARM (Native)
Parent Process:      launchd [1]

Date/Time:           2013-10-01 14:59:17.555 +0530
OS Version:          iOS 7.0 (11A465)
Report Version:      104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread:  2

Last Exception Backtrace:
0   CoreFoundation                  0x2d4e4e86 __exceptionPreprocess + 126
1   libobjc.A.dylib                 0x377de6c2 objc_exception_throw + 34
2   CoreFoundation                  0x2d41e0c6 -[__NSPlaceholderArray initWithObjects:count:] + 414
3   CoreFoundation                  0x2d427a4c +[NSArray arrayWithObjects:count:] + 40
4   CoreFoundation                  0x2d45d9c0 -[NSDictionary allKeys] + 172
5   Foundation                      0x2df73336 -[NSISObjectiveLinearExpression description] + 122
6   Foundation                      0x2ddfc808 _NSDescriptionWithLocaleFunc + 84
7   CoreFoundation                  0x2d4babf2 __CFStringAppendFormatCore + 5618
8   CoreFoundation                  0x2d429d18 _CFStringCreateWithFormatAndArgumentsAux + 72
9   CoreFoundation                  0x2d4523c2 _CFLogvEx + 82
10  Foundation                      0x2de0b7ee NSLogv + 82
11  Foundation                      0x2de0b78e NSLog + 22
12  Foundation                      0x2de4a918 -[NSISEngine minimizeConstantInObjectiveRowWithHead:] + 180
13  Foundation                      0x2de4a46e -[NSISEngine optimize] + 170
14  Foundation                      0x2de461a8 -[NSISEngine withBehaviors:performModifications:] + 312
15  UIKit                           0x2fc69490 -[UIView(Hierarchy) _postMovedFromSuperview:] + 292
16  UIKit                           0x2feffb92 __UIViewWasRemovedFromSuperview + 214
17  UIKit                           0x2fc68342 -[UIView(Hierarchy) removeFromSuperview] + 266
18  UIKit                           0x2fd3cccc -[UIScrollView removeFromSuperview] + 60
19  UIKit                           0x2fd313e4 -[UINavigationController navigationTransitionView:didEndTransition:fromView:toView:] + 312
20  UIKit                           0x2fdfcb5c __49-[UINavigationController _startCustomTransition:]_block_invoke + 156
21  UIKit                           0x2fd81416 -[_UIViewControllerTransitionContext completeTransition:] + 70
22  UIKit                           0x2fe418dc __53-[_UINavigationParallaxTransition animateTransition:]_block_invoke105 + 448
23  UIKit                           0x2fca2618 -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] + 280
24  UIKit                           0x2fca226a -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 174
25  UIKit                           0x2fca2186 -[UIViewAnimationState animationDidStop:finished:] + 62
26  QuartzCore                      0x2f8f8a0e CA::Layer::run_animation_callbacks(void*) + 230
27  libdispatch.dylib               0x37cc30ea _dispatch_client_callout + 18
28  libdispatch.dylib               0x37cc59a4 _dispatch_main_queue_callback_4CF + 264
29  CoreFoundation                  0x2d4af5b4 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 4
30  CoreFoundation                  0x2d4ade80 __CFRunLoopRun + 1304
31  CoreFoundation                  0x2d41853c CFRunLoopRunSpecific + 520
32  CoreFoundation                  0x2d41831e CFRunLoopRunInMode + 102
33  GraphicsServices                0x3214f2e6 GSEventRunModal + 134
34  UIKit                           0x2fccf1e0 UIApplicationMain + 1132
35  myapp                           0x00020a16 main (main.mm:16)
36  libdyld.dylib                   0x37cd7ab2 tlv_initializer + 2


Thread 0:
0   libsystem_kernel.dylib          0x37d8e588 __semwait_signal_nocancel + 24
1   libsystem_c.dylib               0x37d09788 nanosleep$NOCANCEL + 160
2   libsystem_c.dylib               0x37d24f10 usleep$NOCANCEL + 48
3   libsystem_c.dylib               0x37d3f030 abort + 80
4   myapp                           0x001efaea uncaught_exception_handler + 22
5   CoreFoundation                  0x2d4e518a __handleUncaughtException + 578
6   libobjc.A.dylib                 0x377de924 _objc_terminate() + 172
7   libc++abi.dylib                 0x371a51b0 std::__terminate(void (*)()) + 76
8   libc++abi.dylib                 0x371a4a04 __cxa_throw + 112
9   libobjc.A.dylib                 0x377de796 objc_exception_throw + 246
10  CoreFoundation                  0x2d41e0c6 -[__NSPlaceholderArray initWithObjects:count:] + 414
11  CoreFoundation                  0x2d427a4c +[NSArray arrayWithObjects:count:] + 40
12  CoreFoundation                  0x2d45d9c0 -[NSDictionary allKeys] + 172
13  Foundation                      0x2df73336 -[NSISObjectiveLinearExpression description] + 122
14  Foundation                      0x2ddfc808 _NSDescriptionWithLocaleFunc + 84
15  CoreFoundation                  0x2d4babf4 __CFStringAppendFormatCore + 5620
16  CoreFoundation                  0x2d429d18 _CFStringCreateWithFormatAndArgumentsAux + 72
17  CoreFoundation                  0x2d4523c2 _CFLogvEx + 82
18  Foundation                      0x2de0b7ee NSLogv + 82
19  Foundation                      0x2de0b78e NSLog + 22
20  Foundation                      0x2de4a918 -[NSISEngine minimizeConstantInObjectiveRowWithHead:] + 180
21  Foundation                      0x2de4a46e -[NSISEngine optimize] + 170
22  Foundation                      0x2de461a8 -[NSISEngine withBehaviors:performModifications:] + 312
23  UIKit                           0x2fc69490 -[UIView(Hierarchy) _postMovedFromSuperview:] + 292
24  UIKit                           0x2feffb92 __UIViewWasRemovedFromSuperview + 214
25  UIKit                           0x2fc68342 -[UIView(Hierarchy) removeFromSuperview] + 266
26  UIKit                           0x2fd3cccc -[UIScrollView removeFromSuperview] + 60
27  UIKit                           0x2fd313e4 -[UINavigationController navigationTransitionView:didEndTransition:fromView:toView:] + 312
28  UIKit                           0x2fdfcb5c __49-[UINavigationController _startCustomTransition:]_block_invoke + 156
29  UIKit                           0x2fd81418 -[_UIViewControllerTransitionContext completeTransition:] + 72
30  UIKit                           0x2fe418dc __53-[_UINavigationParallaxTransition animateTransition:]_block_invoke105 + 448
31  UIKit                           0x2fca261a -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] + 282
32  UIKit                           0x2fca226a -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 174
33  UIKit                           0x2fca2186 -[UIViewAnimationState animationDidStop:finished:] + 62
34  QuartzCore                      0x2f8f8a0e CA::Layer::run_animation_callbacks(void*) + 230
35  libdispatch.dylib               0x37cc30ec _dispatch_client_callout + 20
36  libdispatch.dylib               0x37cc59a4 _dispatch_main_queue_callback_4CF + 264
37  CoreFoundation                  0x2d4af5b4 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 4
38  CoreFoundation                  0x2d4ade80 __CFRunLoopRun + 1304
39  CoreFoundation                  0x2d41853c CFRunLoopRunSpecific + 520
40  CoreFoundation                  0x2d41831e CFRunLoopRunInMode + 102
41  GraphicsServices                0x3214f2e6 GSEventRunModal + 134
42  UIKit                           0x2fccf1e0 UIApplicationMain + 1132
43  myapp                           0x00020a16 main (main.mm:16)
44  libdyld.dylib                   0x37cd7ab4 start + 0

Thread 1:
0   libsystem_kernel.dylib          0x37d7b838 kevent64 + 24
1   libdispatch.dylib               0x37cca0d0 _dispatch_mgr_invoke + 228
2   libdispatch.dylib               0x37cc463e _dispatch_mgr_thread + 34

Thread 2 Crashed:
0   libsystem_kernel.dylib          0x37d8ec7c __workq_kernreturn + 8
1   libsystem_pthread.dylib         0x37df2e06 _pthread_wqthread + 306
2   libsystem_pthread.dylib         0x37df2cc0 start_wqthread + 4

Thread 3 name:  com.apple.NSURLConnectionLoader
Thread 3:
0   libsystem_kernel.dylib          0x37d7ba84 mach_msg_trap + 20
1   libsystem_kernel.dylib          0x37d7b87c mach_msg + 36
2   CoreFoundation                  0x2d4af55c __CFRunLoopServiceMachPort + 152
3   CoreFoundation                  0x2d4adc7c __CFRunLoopRun + 788
4   CoreFoundation                  0x2d41853c CFRunLoopRunSpecific + 520
5   CoreFoundation                  0x2d41831e CFRunLoopRunInMode + 102
6   Foundation                      0x2de5364c +[NSURLConnection(Loader) _resourceLoadLoop:] + 316
7   Foundation                      0x2dec8dc2 __NSThread__main__ + 1058
8   libsystem_pthread.dylib         0x37df4c5a _pthread_body + 138
9   libsystem_pthread.dylib         0x37df4bca _pthread_start + 98
10  libsystem_pthread.dylib         0x37df2ccc thread_start + 4

Thread 4:
0   libsystem_kernel.dylib          0x37d7ba84 mach_msg_trap + 20
1   libsystem_kernel.dylib          0x37d7b87c mach_msg + 36
2   CoreFoundation                  0x2d4af55c __CFRunLoopServiceMachPort + 152
3   CoreFoundation                  0x2d4adc7c __CFRunLoopRun + 788
4   CoreFoundation                  0x2d41853c CFRunLoopRunSpecific + 520
5   CoreFoundation                  0x2d41831e CFRunLoopRunInMode + 102
6   Foundation                      0x2de06822 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
7   Foundation                      0x2de57664 -[NSRunLoop(NSRunLoop) run] + 76
8   myapp                           0x001c1ffa +[AFURLConnectionOperation networkRequestThreadEntryPoint:] (AFURLConnectionOperation.m:160)
9   Foundation                      0x2dec8dc2 __NSThread__main__ + 1058
10  libsystem_pthread.dylib         0x37df4c5a _pthread_body + 138
11  libsystem_pthread.dylib         0x37df4bca _pthread_start + 98
12  libsystem_pthread.dylib         0x37df2ccc thread_start + 4

Thread 5 name:  com.apple.CFSocket.private
Thread 5:
0   libsystem_kernel.dylib          0x37d8e440 select$DARWIN_EXTSN + 20
1   CoreFoundation                  0x2d4b345e __CFSocketManager + 482
2   libsystem_pthread.dylib         0x37df4c5a _pthread_body + 138
3   libsystem_pthread.dylib         0x37df4bca _pthread_start + 98
4   libsystem_pthread.dylib         0x37df2ccc thread_start + 4

Thread 6:
0   libsystem_kernel.dylib          0x37d8ec7c __workq_kernreturn + 8
1   libsystem_pthread.dylib         0x37df2e06 _pthread_wqthread + 306
2   libsystem_pthread.dylib         0x37df2cc0 start_wqthread + 4

Thread 2 crashed with ARM Thread State (32-bit):
    r0: 0x00000004    r1: 0x00000000      r2: 0x00000000      r3: 0x00000000
    r4: 0x02bcc000    r5: 0x00060001      r6: 0x00004007      r7: 0x02bcbfe0
    r8: 0x00000000    r9: 0x00000001     r10: 0x00000000     r11: 0x00000000
    ip: 0x00000170    sp: 0x02bcbfc8      lr: 0x37df2e0b      pc: 0x37d8ec7c
  cpsr: 0x40000010
ios
ios6
crash
ios7
crash-reports
asked on Stack Overflow Oct 1, 2013 by user2834385

1 Answer

7

This crash looks like a problem with a constraints you set in your app (in a background thread ?).

In addition this looks similar (not identical) to your other reported crash: https://stackoverflow.com/questions/19114389/app-hang-and-then-crash-ios-7

So in short: your constraints setup (presumably in code) causes this problem. Most likely because your constraints reference a view that is not existing any more.

In Long:

  1. From thread 2 some code is dispatched into the main thread:

    28 libdispatch.dylib 0x37cc59a4 _dispatch_main_queue_callback_4CF + 264

  2. A transition to another View Controller via a navigation controller did finish:

    21 UIKit 0x2fd81416 -[_UIViewControllerTransitionContext completeTransition:] + 70

  3. A scrollview is being removed from its superview:

    18 UIKit 0x2fd3cccc -[UIScrollView removeFromSuperview] + 60

  4. Constraints are being evaluated:

    12 Foundation 0x2de4a918 -[NSISEngine minimizeConstantInObjectiveRowWithHead:] + 180

  5. The constraints engine wants to log some error into the console:

    11 Foundation 0x2de0b78e NSLog + 22

  6. The constraints engine tries to generate a string:

    5 Foundation 0x2df73336 -[NSISObjectiveLinearExpression description] + 122

  7. An exception occurs because it tries to add a nil object to an NSArray.

This could happen if your constraint rules (done in code) reference another view that does not exist any more. You should check your constraint rules and set breakpoints to find out which one is causing the crash.

answered on Stack Overflow Oct 1, 2013 by Kerni • edited May 23, 2017 by Community

User contributions licensed under CC BY-SA 3.0