My new version of iOS app crash on loading only when loaded from the app store

2

My app crash only on after I loaded it to the app store.

Some background, I have tested the app with test flight on multiple physical devices. The app doesn't crash on all devices, first install on a device works fine ( a device that never had the app). Install on a device that had the app before cause the crash on most devices I tested with. That happens even if I first removed the app from the device, and then installed it from the app store.

One more thing is that on the devices the crash happened, when installing from the app store it first installed the old version and then allowed me to update to the new version. On the devices it didn't crash it loaded the new version directly (without installing first the old version).

Any idea how to resolve this would be highly appreciated, and also ideas how to replicate the issue in my development / test environment.

Below is the crash log from one of the devices:

Incident Identifier: 2F05957D-D4B0-49A0-9DEC-9F93AC008ED7
CrashReporter Key:   0dcfb6f747b264afdb9bc565deb821964c811b36
Hardware Model:      iPhone5,1
Process:         SlimNavigator [10283]
Path:            /var/mobile/Applications/C4110616-BE4C-4433-9FB9-C43F042D4CCA/SlimNavigator.app/SlimNavigator
Identifier:      SlimNavigator
Version:         ??? (???)
Code Type:       ARM (Native)
Parent Process:  launchd [1]

Date/Time:       2013-07-14 20:17:22.268 -0700
OS Version:      iOS 6.1.4 (10B350)
Report Version:  104

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000001
Crashed Thread:  0

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   SlimNavigator   0x0010ad46 +[NSHTTPCookieStorage(DeleteForURL) deleteCookiesForURL:] (NSHTTPCookieStorage+DeleteForURL.m:20)
1   dyld            0x2ff076c0 ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) + 16
2   dyld            0x2ff04a36 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&) + 382
3   dyld            0x2ff04870 ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) + 36
4   dyld            0x2fefbd0e dyld::initializeMainExecutable() + 174
5   dyld            0x2fefe85e dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 1802
6   dyld            0x2fefb32c dyldbootstrap::start(macho_header const*, int, char const**, long, macho_header const*, unsigned long*) + 604
7   dyld            0x2fefb064 _dyld_start + 60

Thread 0 crashed with ARM Thread State (32-bit):
r0: 0x00000001    r1: 0x2fd8fd3c      r2: 0x00000000      r3: 0x2fd8fd68
r4: 0x000000a5    r5: 0x00000000      r6: 0x0010ad55      r7: 0x2fd8eb18
r8: 0x2ff1d674    r9: 0x0000a100     r10: 0x00000000     r11: 0x00000001
ip: 0x0000a100    sp: 0x2fd8eae0      lr: 0x2ff075b5      pc: 0x0010ad46
cpsr: 0x40000030

Binary Images:
0x71000 -   0x20bfff +SlimNavigator armv7  <65ab2d7c06c932f6b3925448d72d95bf> /var/mobile/Applications/C4110616-BE4C-4433-9FB9-C43F042D4CCA/SlimNavigator.app/SlimNavigator
0x2fefa000 - 0x2ff1afff  dyld armv7s  <67efe80b9d863d6bb30fe51e6e17b070> /usr/lib/dyld
0x304d9000 - 0x305bffff  AVFoundation armv7s  <56f22385ccb73e31863f1fa9e0b621dd> /System/Library/Frameworks/AVFoundation.framework/AVFoundation
iphone
ios
ipad
app-store
asked on Stack Overflow Jul 15, 2013 by Zeev Vax • edited Jul 15, 2013 by WrightsCS

1 Answer

4

Thank you everyone for your answers. Problem solved, with two changes I added 1. -all_load flag to linker to load the problematic library where the crash happened, 2. Remove the possible call to the library method that crashed. I'm still not sure why it the issue don't manifest it self when running a release build on a device and only happen with the build from the app store.

The most relevant advice I can give based on the answers and my experience with this, is compare your debug and release "build setting" and try to change them to match the release setting ("optimization level" is the first one to try).

answered on Stack Overflow Jul 16, 2013 by Zeev Vax

User contributions licensed under CC BY-SA 3.0