0

iOS app crashes when resuming, no direct references to my app code

Recently, I started getting a rare crash on my iPad app when the app returns from the background after being suspended. The only viable information in the crashed thread refers to system-level calls and I can’t seem to pinpoint root cause especially considering it can take 50+ tries to reproduce. Here’s one hint: I know it only occurs on iOS 6.

Date/Time: 2014-08-14 09:37:03 +0000 OS Version: iPhone OS 6.1.2 (10B146) Report Version: 104

Exception Type: SIGABRT Exception Codes: #0 at 0x39827350 Crashed Thread: 0

Application Specific Information: * Terminating app due to uncaught exception 'NSRangeException', reason: '* -[NSMutableArray removeObjectsInRange:]: range {1, 1} extends beyond bounds [0 .. 0]'

Last Exception Backtrace:

    0   CoreFoundation                      0x316423e7 __exceptionPreprocess + 163
    1   libobjc.A.dylib                     0x39333963 objc_exception_throw + 28
    2   CoreFoundation                      0x315d97cd -[NSMutableArray removeObjectsInRange:] + 250
    3   UIKit                               0x334de2df -[UINavigationController popToViewController:transition:] + 592
    4   UIKit                               0x3358a789 -[UITabBarController _tabBarItemClicked:] + 230
    5   UIKit                               0x3353c087 -[UIApplication sendAction:to:from:forEvent:] + 68
    6   UIKit                               0x3353c03b -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 28
    7   UIKit                               0x3358a679 -[UITabBar _sendAction:withEvent:] + 382
    8   UIKit                               0x3353c087 -[UIApplication sendAction:to:from:forEvent:] + 68
    9   UIKit                               0x3353c03b -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 28
    10  UIKit                               0x3353c015 -[UIControl sendAction:to:forEvent:] + 42
    11  UIKit                               0x3353b8cb -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 500
    12  UIKit                               0x3353c087 -[UIApplication sendAction:to:from:forEvent:] + 68
    13  UIKit                               0x3353c03b -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 28
    14  UIKit                               0x3353c015 -[UIControl sendAction:to:forEvent:] + 42
    15  UIKit                               0x3353b8cb -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 500
    16  UIKit                               0x3353bdb9 -[UIControl touchesEnded:withEvent:] + 486
    17  UIKit                               0x334645f9 -[UIWindow _sendTouchesForEvent:] + 522
    18  UIKit                               0x334518e1 -[UIApplication sendEvent:] + 378
    19  UIKit                               0x334511ef _UIApplicationHandleEvent + 6196
    20  GraphicsServices                    0x351685f7 _PurpleEventCallback + 588
    21  GraphicsServices                    0x35168227 PurpleEventCallback + 32
    22  CoreFoundation                      0x316173e7 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 32
    23  CoreFoundation                      0x3161738b __CFRunLoopDoSource1 + 136
    24  CoreFoundation                      0x3161620f __CFRunLoopRun + 1380
    25  CoreFoundation                      0x3158923d CFRunLoopRunSpecific + 354
    26  CoreFoundation                      0x315890c9 CFRunLoopRunInMode + 102
    27  GraphicsServices                    0x3516733b GSEventRunModal + 72
    28  UIKit                               0x334a52b9 UIApplicationMain + 1118
    29  [my app name]                       0x001e0917 main (main.m:14)
    30  libdyld.dylib                       0x39760b20 start + 2
  • It may not be referencing your code, but it's certainly related to a `UIEvent` that you're probably sending by tapping on a `UITabBarController` in your app. Also, why iOS 6? You should drop support for that version soon. – Hyperbole Aug 25 '14 at 13:21
  • [http://stackoverflow.com/questions/9879589/nsrangeexception-from-removeobjectsinrange-but-passed-range-is-within-bounds][1] [1]: http://stackoverflow.com/questions/9879589/nsrangeexception-from-removeobjectsinrange-but-passed-range-is-within-bounds check this – madhu Aug 25 '14 at 13:26
  • Hi guys. thanks for the input. I'm definitely going to have to do more digging. I'll post back when I solve this. – iOS_Kiddie Aug 25 '14 at 14:33

0 Answers0