Search code examples
iosxcodetestflight

IPhone App crashing if downloaded from app store or testflight


I am done with development process of the app, before releasing it to app store i had done several rounds of testing (Adhoc testing on IOS version 6.0.1). while doing Adhoc testing i didnt find any issues with the build. Everything was working fine. After submitting to app store i got the report from apple team saying that application is crashing on iphone 5 having IOS version 6.1.3. So i updated my iphone to 6.1.3 . After updating to latest version, i uploaded the build to testflight and downloaded the app from it. it was crashing. i uninstalled the app from phone and directly connected to system and installed directly through xcode with out any code changes. App started working fine. I am confused with reason behind crashing. I am certain it is not an issue with the code because same code is working fine if i directly install through xcode. whats the difference b/w installing app through testflight and directly from xcode ? What might be the problem ? i symbolicated the crash logs and found nothing wrong with code. does anyone has faced similar kind of problem ? if got fixed plz help me out. your help is highly admired. Thanks below is my crash log

Version:         ??? (???)
Code Type:       `enter code here`ARM (Native)
Parent Process:  launchd `enter code here`[1]
Date/Time:       2013-05-07 10:19:43.206 -0700
OS Version:      iOS 6.1.4 (10B350)
Report Version:  104
Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x43462d40
Crashed Thread:  0
Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libobjc.A.dylib                 0x3bc905d0 objc_msgSend + 16
1   Foundation                      0x348031dc _NSDescriptionWithLocaleFunc + 48
2   CoreFoundation                  0x33f7b42e __CFStringAppendFormatCore + 11158
3   CoreFoundation                  0x33ef289e _CFStringCreateWithFormatAndArgumentsAux +        

4   Foundation                      0x34802cf8 +[NSString stringWithFormat:] + 56
5   Nuedoo                          0x0002f8a2 -[VCache updateWithXML:] (VCache.m:122)
6   Nuedoo                          0x0003f00a -[VParser parseXMLFile:] (VParser.m:80)
7   Nuedoo                          0x0002ecda -[VBrowser open:] (VBrowser.m:23)
8   Nuedoo                          0x0002d6e8 -[Vaayoo_FrameworkAppDelegate:]   (Vaayoo_FrameworkAppDelegate.m:57)
9   UIKit                           0x35e09a9c -[UIApplication  _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 248
10  UIKit                           0x35e09620 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1164
11  UIKit                           0x35e0182e -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 694
12  UIKit                           0x35da9d1a -[UIApplication handleEvent:withNewEvent:]   + 1006
13  UIKit                           0x35da97a8 -[UIApplication sendEvent:] + 68
14  UIKit                           0x35da91ea _UIApplicationHandleEvent + 6194
15  GraphicsServices                0x37ac15f4 _PurpleEventCallback + 588
16  GraphicsServices                0x37ac1222 PurpleEventCallback + 30
17  CoreFoundation                  0x33f6f3e4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 32
18  CoreFoundation                  0x33f6f386 __CFRunLoopDoSource1 + 134
19  CoreFoundation                  0x33f6e20a __CFRunLoopRun + 1378
20  CoreFoundation                  0x33ee1238 CFRunLoopRunSpecific + 352
21  CoreFoundation                  0x33ee10c4 CFRunLoopRunInMode + 100
22  UIKit                           0x35e00468 -[UIApplication _run] + 664
23  UIKit                           0x35dfd2b4 UIApplicationMain + 1116
24  Nuedoo                          0x00056efa main (main.m:14)
25  Nuedoo                          0x0002ce84 start + 36
Thread 1:
0   libsystem_kernel.dylib          0x3c189d98 __workq_kernreturn + 8
1   libsystem_c.dylib               0x3c0d7ad6 _pthread_workq_return + 14
2   libsystem_c.dylib               0x3c0d77f2 _pthread_wqthread + 362
3   libsystem_c.dylib               0x3c0d7680 start_wqthread + 4

Thread 2 name:  Dispatch queue: com.apple.libdispatch-manager
Thread 2:
0   libsystem_kernel.dylib          0x3c1795d0 kevent64 + 24
1   libdispatch.dylib               0x3c0b4d22 _dispatch_mgr_invoke + 806
2   libdispatch.dylib               0x3c0b0374 _dispatch_mgr_thread + 32

Thread 3:
0   libsystem_kernel.dylib          0x3c189d98 __workq_kernreturn + 8
1   libsystem_c.dylib               0x3c0d7ad6 _pthread_workq_return + 14
2   libsystem_c.dylib               0x3c0d77f2 _pthread_wqthread + 362
3   libsystem_c.dylib               0x3c0d7680 start_wqthread + 4

Thread 4 name:  WebThread
Thread 4:
0   libsystem_kernel.dylib          0x3c178e30 mach_msg_trap + 20
1   libsystem_kernel.dylib          0x3c178fd0 mach_msg + 48
2   CoreFoundation                  0x33f6f2b6 __CFRunLoopServiceMachPort + 126
3   CoreFoundation                  0x33f6e02c __CFRunLoopRun + 900
4   CoreFoundation                  0x33ee1238 CFRunLoopRunSpecific + 352
5   CoreFoundation                  0x33ee10c4 CFRunLoopRunInMode + 100
6   WebCore                         0x39ee9390 RunWebThread(void*) + 440
7   libsystem_c.dylib               0x3c0e20de _pthread_start + 306
8   libsystem_c.dylib               0x3c0e1fa4 thread_start + 4

Thread 0 crashed with ARM Thread State (32-bit):
r0: 0x1f5c0ab0    r1: 0x39a512ae      r2: 0x34004b3a      r3: 0xffffffff
r4: 0x43462d38    r5: 0x00000000      r6: 0x34004b3a      r7: 0x2fdd3178
r8: 0x2fdd367c    r9: 0x0e6944ab     r10: 0x3c307c20     r11: 0x1f5c0ca0
ip: 0x3c3b8704    sp: 0x2fdd3164      lr: 0x348031e1      pc: 0x3bc905d0
  cpsr: 0x20000030
</string>
<key>displayName</key>
<string>Nuedoo</string>
<key>name</key>
<string>Nuedoo</string>
<key>os_version</key>
<string>iPhone OS 6.1.4 (10B350)</string>
<key>system_ID</key>
<string></string>
<key>version</key>
<string>??? (???)</string>
</dict>
</plist> 

Solution

  • Installing the app directly through XCode will use your 'Debug' configuration (depends also on how it's set in your build scheme). Archiving it first, will use your Adhoc/Release configuration.

    Edit schemes Edit scheme

    The configurations may differ in search paths, constants, preprocessor macros and other things used during compile/build time.

    Since it's working well when built directly from xcode, you may have a look at the differences between your Run build configuration ('Debug') and your 'Archive' build configuration ('Adhoc' in the image above).

    To view differences between your configurations, select your app target and search for the fields with <Multiple values> (inside Build Settings tab) enter image description here

    You may also be able to set your 'Run' step to use the 'Release' configuration (with a correct provisioning that accepts your device), in which case you should be able to catch the exception when connected to xcode (and maybe have a better look at what's causing it using breakpoints).