iPhone app crashes on some devices upon startup, but runs on others

0

We migrated an iOS 6 app to iOS 7 without altering anything in particular beyond some minor adjustments. We tested the app on the 3, 4, 4S and 5S iPhones and reported no problem.

Now two users are reporting that the app crashes upon startup. I advised one of them to remove the app altogether and install again which resulted in the app running smoothly.

He forwarded the crash log to me but it's a little cryptic. Can anyone help me pinpoint the issue?

EDIT: Symbolicated crash log

Incident Identifier: 687B278C-313F-4533-81E8-0003428A3362
CrashReporter Key:   b25d61923c16e6a67af8ea7bf81643ba93f4d1ea
Hardware Model:      iPhone4,1

Process:             RunControl [3488]
Path:                /var/mobile/Applications/DB78DB79-2AB2-4ADD-89C8-BACDBB6BCCF3/RunControl.app/RunControl
Identifier:          com.gsddl.RunControl
Version:             1.5 (1.5)
Code Type:           ARM (Native)
Parent Process:      launchd [1]

Date/Time:           2014-03-10 09:49:34.065 +0100
OS Version:          iOS 7.0.6 (11B651)
Report Version:      104

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

Last Exception Backtrace:
0   CoreFoundation                  0x2dbbbf46 __exceptionPreprocess + 126
1   libobjc.A.dylib                 0x37f4b6aa objc_exception_throw + 34
2   CoreFoundation                  0x2dbbbe88 +[NSException raise:format:] + 100
3   Foundation                      0x2e4dd448 -[NSString stringByAppendingString:] + 84
4   RunControl                      0x000b2302 -[RunControlAppDelegate downloadData] (RunControlAppDelegate.m:297)
5   Foundation                      0x2e59fc82 __NSThread__main__ + 1058
6   libsystem_pthread.dylib         0x38572c18 _pthread_body + 136
7   libsystem_pthread.dylib         0x38572b8a _pthread_start + 98
8   libsystem_pthread.dylib         0x38570c8c thread_start + 4



Thread 0:
0   libsystem_kernel.dylib        0x38509014 0x384f7000 + 73748
1   libsystem_pthread.dylib       0x38572a74 pthread_create + 156
2   Foundation                    0x2e50fb00 -[NSThread start] + 284
3   RunControl                    0x000b20c4 -[RunControlAppDelegate initData] (RunControlAppDelegate.m:274)
4   RunControl                    0x000b0f58 -[RunControlAppDelegate application:didFinishLaunchingWithOptions:] (RunControlAppDelegate.m:32)
5   UIKit                         0x3039f2fa -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 270
6   UIKit                         0x3039ed4a -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1386
7   UIKit                         0x3039934e -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 710
8   UIKit                         0x3033441a -[UIApplication handleEvent:withNewEvent:] + 3126
9   UIKit                         0x3033371c -[UIApplication sendEvent:] + 68
10  UIKit                         0x30398b38 _UIApplicationHandleEvent + 660
11  GraphicsServices              0x327cf70a _PurpleEventCallback + 606
12  GraphicsServices              0x327cf2f2 PurpleEventCallback + 30
13  CoreFoundation                0x2db869dc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 32
14  CoreFoundation                0x2db86976 __CFRunLoopDoSource1 + 342
15  CoreFoundation                0x2db8514a __CFRunLoopRun + 1394
16  CoreFoundation                0x2daefc22 CFRunLoopRunSpecific + 518
17  CoreFoundation                0x2daefa06 CFRunLoopRunInMode + 102
18  UIKit                         0x30397dd4 -[UIApplication _run] + 756
19  UIKit                         0x30393044 UIApplicationMain + 1132
20  RunControl                    0x000b0f1a main (main.m:16)
21  RunControl                    0x000b0edc start + 36

Thread 1:
0   libsystem_kernel.dylib        0x384f783c 0x384f7000 + 2108
1   libdispatch.dylib             0x38442e08 _dispatch_mgr_invoke + 228
2   libdispatch.dylib             0x3843239e _dispatch_mgr_thread$VARIANT$up + 34

Thread 2:
0   libsystem_kernel.dylib        0x3850ac7c 0x384f7000 + 81020
1   libsystem_pthread.dylib       0x38570dc6 _pthread_wqthread + 306
2   libsystem_pthread.dylib       0x38570c80 start_wqthread + 4

Thread 3 Crashed:
0   libsystem_kernel.dylib        0x3850a1fc 0x384f7000 + 78332
1   libsystem_pthread.dylib       0x38573a2e pthread_kill + 54
2   libsystem_c.dylib             0x384baff8 abort + 72
3   libc++abi.dylib               0x377e9cd2 abort_message + 70
4   libc++abi.dylib               0x378026e0 default_terminate_handler() + 248
5   libobjc.A.dylib               0x37f4b91e _objc_terminate() + 190
6   libc++abi.dylib               0x378001c4 std::__terminate(void (*)()) + 76
7   libc++abi.dylib               0x377ffa18 __cxa_throw + 112
8   libobjc.A.dylib               0x37f4b77e objc_exception_throw + 246
9   CoreFoundation                0x2dbbbe88 +[NSException raise:format:] + 100
10  Foundation                    0x2e4dd448 -[NSString stringByAppendingString:] + 84
11  RunControl                    0x000b2302 -[RunControlAppDelegate downloadData] (RunControlAppDelegate.m:297)
12  Foundation                    0x2e59fc82 __NSThread__main__ + 1058
13  libsystem_pthread.dylib       0x38572c1a _pthread_body + 138
14  libsystem_pthread.dylib       0x38572b8a _pthread_start + 98
15  libsystem_pthread.dylib       0x38570c8c thread_start + 4

Thread 3 crashed with ARM Thread State (32-bit):
    r0: 0x00000000    r1: 0x00000000      r2: 0x00000000      r3: 0x00002060
    r4: 0x00000006    r5: 0x026f1000      r6: 0x00000000      r7: 0x026effb4
    r8: 0x16dbd9d0    r9: 0x00000001     r10: 0x16d52ce0     r11: 0x00000000
    ip: 0x00000148    sp: 0x026effa8      lr: 0x38573a33      pc: 0x3850a1fc
  cpsr: 0x00000010

And RunControlAppDelegate.m (around 297):

[295] - (void) downloadData {
[296]     NSString *stringURL = [config valueForKey:@"Users"];
[297]     NSURL  *url = [NSURL URLWithString:[self.URL stringByAppendingString:stringURL]];
[298]     NSData *urlData = [NSData dataWithContentsOfURL:url];
 ...
ios
iphone
crash
sigabrt
asked on Stack Overflow Mar 10, 2014 by VH-NZZ • edited Mar 10, 2014 by VH-NZZ

2 Answers

0

I would venture to guess your update included 64 bit update iOS7 + iPhone5 and your data might be formatted with incorrect formatter:

ie: [NSString stringWithFormat:@"Some foo %d"];

This might work with 32 bit int but it will fail on a 64 bit platform.

Are there any warnings when you compile your binary?

answered on Stack Overflow Mar 11, 2014 by Gregory Furmanek
0

The reference to stringURL was indeed nil which resulted in the crash. This was due to a silly race condition.

answered on Stack Overflow Mar 18, 2014 by VH-NZZ

User contributions licensed under CC BY-SA 3.0