I'm having an issue with an iPhone app that crashes on launch for a select few users. MOST users are just fine - the app is live on the app store, Apple didn't find any problems, I never found these problems when testing. However, they exist.
So. Here is what I know. I believe the crash happens with iPod touch users. From crash logs I've gotten from one user, I know the Exception codes:
Exception Codes: 0x00000000, 0x00000000
Which I believe indicate that my app is trying to write to a nil pointer in memory? (Mostly full crash log below). So, I have a few ideas of what could be happening, and I was hoping someone might be able to help... a few theories I have are below -- I'd love some more ideas. The trouble is, it's very difficult for me to debug, since I haven't encountered the problem on any of my test devices (iPhone4, iPhone3G, iPodTouch, iPad)...
Theory1) I define several integers in viewDidLoad, and then use them in viewWillAppear. Stupid, I know, but I had assumed the order of operations was viewDidLoad, viewWillAppear, and then viewDidAppear. Is this always the case? I'm loading this viewController from the appDelegate, if that helps...
Theory2) I create an array of UIViews in a viewController. These views are IBOutlets. Currently, I'm creating this array in the viewDidLoad delegate method. Is it possible these don't exist yet? If I wait until viewWill or viewDid appear, would that fix this problem?
Theory3) In the app, I have a custom delegate that declares itself in a nib file. Could it be sending messages to the view controller before it's ready for them?
Theory4) It has something to do with the version minimum iOs deployment target. Currently, I'm building against 4.1, but have my dev target set at 3.1. I don't believe I'm using methods that don't exist, but could this be the root?
Any credence to any of these? Anyone else face similar problems? Thanks so much for your help in advance. Here's the full, more or less, crash report:
Incident Identifier: 2B873C9A-8B07-43FC-A5E9-E83D53A42B35 CrashReporter Key: 5a39aac7c109610da9b8ed70df794d6feb519f19 Process: ## CENSORED FOR EMBARRASSMENT PROTECTION ## Path: /var/mobile/Applications/ Identifier: ## CENSORED FOR EMBARRASSMENT PROTECTION ## Version: ??? (???) Code Type: ARM (Native) Parent Process: launchd [1] Date/Time: 2010-11-12 18:59:04.099 +0000 OS Version: iPhone OS 3.1.3 (7E18) Report Version: 104 Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x00000000, 0x00000000 Crashed Thread: 0 Thread 0 Crashed: 0 libSystem.B.dylib 0x33994b2c 0x33904000 + 592684 1 libSystem.B.dylib 0x33994b1a 0x33904000 + 592666 2 libSystem.B.dylib 0x33994b0e 0x33904000 + 592654 3 libSystem.B.dylib 0x339abe34 0x33904000 + 687668 4 libstdc++.6.dylib 0x30800390 0x3079a000 + 418704 5 libobjc.A.dylib 0x3336e898 0x33366000 + 34968 6 libstdc++.6.dylib 0x307fda84 0x3079a000 + 408196 7 libstdc++.6.dylib 0x307fdafc 0x3079a000 + 408316 8 libstdc++.6.dylib 0x307fdc24 0x3079a000 + 408612 9 libobjc.A.dylib 0x3336ce54 0x33366000 + 28244 10 CoreFoundation 0x338ecbf6 0x33857000 + 613366 11 CoreFoundation 0x33871b12 0x33857000 + 109330 12 CoreFoundation 0x33868838 0x33857000 + 71736 13 UkeBank 0x00003cd2 0x1000 + 11474 14 UIKit 0x3207a8d0 0x31fff000 + 506064 15 UIKit 0x32077a40 0x31fff000 + 494144 16 UIKit 0x320773fc 0x31fff000 + 492540 17 UIKit 0x32076f44 0x31fff000 + 491332 18 UIKit 0x32079824 0x31fff000 + 501796 19 UIKit 0x32077a40 0x31fff000 + 494144 20 UIKit 0x32076f44 0x31fff000 + 491332 21 UIKit 0x32077c90 0x31fff000 + 494736 22 UIKit 0x32077a40 0x31fff000 + 494144 23 UIKit 0x320773fc 0x31fff000 + 492540 24 UIKit 0x32076f44 0x31fff000 + 491332 25 UIKit 0x32074954 0x31fff000 + 481620 26 UIKit 0x32074558 0x31fff000 + 480600 27 UIKit 0x32088304 0x31fff000 + 561924 28 UIKit 0x320880b8 0x31fff000 + 561336 29 UIKit 0x32068750 0x31fff000 + 431952 30 UIKit 0x32087fd8 0x31fff000 + 561112 31 UIKit 0x32087d90 0x31fff000 + 560528 32 UIKit 0x32087c3c 0x31fff000 + 560188 33 UIKit 0x3208763c 0x31fff000 + 558652 34 UIKit 0x320873a8 0x31fff000 + 557992 35 UIKit 0x32087298 0x31fff000 + 557720 36 UIKit 0x3206b86c 0x31fff000 + 444524 37 UIKit 0x320472d0 0x31fff000 + 295632 38 QuartzCore 0x31b651b8 0x31b59000 + 49592 39 QuartzCore 0x31b64ed4 0x31b59000 + 48852 40 QuartzCore 0x31b6483c 0x31b59000 + 47164 41 QuartzCore 0x31b6446c 0x31b59000 + 46188 42 QuartzCore 0x31b64318 0x31b59000 + 45848 43 UIKit 0x32051e94 0x31fff000 + 339604 44 UIKit 0x32003a80 0x31fff000 + 19072 45 UIKit 0x32054df8 0x31fff000 + 351736 46 UIKit 0x32054634 0x31fff000 + 349748 47 UIKit 0x3205408c 0x31fff000 + 348300 48 GraphicsServices 0x3434f7dc 0x3434a000 + 22492 49 CoreFoundation 0x338ae524 0x33857000 + 357668 50 CoreFoundation 0x338adc18 0x33857000 + 355352 51 UIKit 0x32002c00 0x31fff000 + 15360 52 UIKit 0x32001228 0x31fff000 + 8744 53 UkeBank 0x0000213c 0x1000 + 4412 54 UkeBank 0x0000210c 0x1000 + 4364 Thread 1: 0 libSystem.B.dylib 0x33905488 0x33904000 + 5256 1 libSystem.B.dylib 0x33908064 0x33904000 + 16484 2 CoreFoundation 0x338ae002 0x33857000 + 356354 3 CoreFoundation 0x338adc18 0x33857000 + 355352 4 WebCore 0x33ac61d4 0x33a42000 + 541140 5 libSystem.B.dylib 0x3392f780 0x33904000 + 178048 Thread 0 crashed with ARM Thread State: r0: 0x00000000 r1: 0x00000000 r2: 0x00000001 r3: 0x385333cc r4: 0x00000006 r5: 0x0012e6ac r6: 0x2fffccfc r7: 0x2fffcd0c r8: 0x385265c4 r9: 0x0000000a r10: 0x30cb8524 r11: 0x00000000 ip: 0x00000025 sp: 0x2fffcd0c lr: 0x33994b21 pc: 0x33994b2c cpsr: 0x00070010 Binary Images: 0x1000 - 0x9fff +UkeBank armv6 /var/mobile/Applications/6D5DFEC6-21DF-431C-B2B2-DEACE4366B61/UkeBank.app/UkeBank 0x6a000 - 0x6bfff dns.so armv6 /usr/lib/info/dns.so 0x2fe00000 - 0x2fe26fff dyld armv6 /usr/lib/dyld 0x30092000 - 0x300c6fff Security armv6 /System/Library/Frameworks/Security.framework/Security 0x300ca000 - 0x3021efff AudioToolbox armv6 /System/Library/Frameworks/AudioToolbox.framework/AudioToolbox 0x30343000 - 0x3034cfff SpringBoardServices armv6 /System/Library/PrivateFrameworks/SpringBoardServices.framework/SpringBoardServices 0x30490000 - 0x30591fff libicucore.A.dylib armv6 /usr/lib/libicucore.A.dylib 0x3079a000 - 0x30804fff libstdc++.6.dylib armv6 /usr/lib/libstdc++.6.dylib 0x30805000 - 0x30902fff JavaScriptCore armv6 /System/Library/PrivateFrameworks/JavaScriptCore.framework/JavaScriptCore 0x30f96000 - 0x30f97fff CoreSurface armv6 /System/Library/PrivateFrameworks/CoreSurface.framework/CoreSurface 0x30fba000 - 0x31067fff ImageIO armv6 /System/Library/PrivateFrameworks/ImageIO.framework/ImageIO 0x310b3000 - 0x310bdfff libkxld.dylib armv6 /usr/lib/system/libkxld.dylib 0x310be000 - 0x31278fff CoreGraphics armv6 /System/Library/Frameworks/CoreGraphics.framework/CoreGraphics 0x3138c000 - 0x313aafff AddressBook armv6 /System/Library/Frameworks/AddressBook.framework/AddressBook 0x313e2000 - 0x3143dfff CoreAudio armv6 /System/Library/Frameworks/CoreAudio.framework/CoreAudio 0x31465000 - 0x314a2fff libCGFreetype.A.dylib armv6 /System/Library/Frameworks/CoreGraphics.framework/Resources/libCGFreetype.A.dylib 0x31546000 - 0x315f3fff WebKit armv6 /System/Library/PrivateFrameworks/WebKit.framework/WebKit 0x31600000 - 0x3164dfff IOKit armv6 /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit 0x31767000 - 0x3176dfff liblockdown.dylib armv6 /usr/lib/liblockdown.dylib 0x318f1000 - 0x3195efff CFNetwork armv6 /System/Library/Frameworks/CFNetwork.framework/CFNetwork 0x319c4000 - 0x319fffff CoreTelephony armv6 /System/Library/PrivateFrameworks/CoreTelephony.framework/CoreTelephony 0x31a00000 - 0x31a0afff MobileCoreServices armv6 /System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices 0x31b59000 - 0x31c03fff QuartzCore armv6 /System/Library/Frameworks/QuartzCore.framework/QuartzCore 0x31c04000 - 0x31c38fff SystemConfiguration armv6 /System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration 0x31ca1000 - 0x31cdffff CoreText armv6 /System/Library/PrivateFrameworks/CoreText.framework/CoreText 0x31d09000 - 0x31dfffff libxml2.2.dylib armv6 /usr/lib/libxml2.2.dylib 0x31fd7000 - 0x31ffefff AppSupport armv6 /System/Library/PrivateFrameworks/AppSupport.framework/AppSupport 0x31fff000 - 0x32df0fff UIKit armv6 /System/Library/Frameworks/UIKit.framework/UIKit 0x32e05000 - 0x32e5ffff libsqlite3.dylib armv6 /usr/lib/libsqlite3.dylib 0x32e78000 - 0x32f70fff Foundation armv6 /System/Library/Frameworks/Foundation.framework/Foundation 0x32f71000 - 0x32f79fff libgcc_s.1.dylib armv6 /usr/lib/libgcc_s.1.dylib 0x32f7a000 - 0x32f91fff OpenGLES armv6 /System/Library/Frameworks/OpenGLES.framework/OpenGLES 0x33242000 - 0x3324efff CoreVideo armv6 /System/Library/PrivateFrameworks/CoreVideo.framework/CoreVideo 0x3324f000 - 0x3324ffff vecLib armv6 /System/Library/PrivateFrameworks/Accelerate.framework/Frameworks/vecLib.framework/vecLib 0x332b2000 - 0x332c2fff libbsm.0.dylib armv6 /usr/lib/libbsm.0.dylib 0x332e8000 - 0x332e9fff IOMobileFramebuffer armv6 /System/Library/PrivateFrameworks/IOMobileFramebuffer.framework/IOMobileFramebuffer 0x3335f000 - 0x33365fff MBX2D armv6 /System/Library/PrivateFrameworks/MBX2D.framework/MBX2D 0x33366000 - 0x33409fff libobjc.A.dylib armv6 /usr/lib/libobjc.A.dylib 0x3342f000 - 0x33437fff AVFoundation armv6 /System/Library/Frameworks/AVFoundation.framework/AVFoundation 0x33730000 - 0x3373efff libz.1.dylib armv6 /usr/lib/libz.1.dylib 0x337df000 - 0x337fdfff libresolv.9.dylib armv6 /usr/lib/libresolv.9.dylib 0x33856000 - 0x33856fff Accelerate armv6 /System/Library/PrivateFrameworks/Accelerate.framework/Accelerate 0x33857000 - 0x33903fff CoreFoundation armv6 /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation 0x33904000 - 0x33a2afff libSystem.B.dylib armv6 /usr/lib/libSystem.B.dylib 0x33a3d000 - 0x33a41fff IOSurface armv6 /System/Library/PrivateFrameworks/IOSurface.framework/IOSurface 0x33a42000 - 0x34195fff WebCore armv6 /System/Library/PrivateFrameworks/WebCore.framework/WebCore 0x3430f000 - 0x34349fff libvDSP.dylib armv6 /System/Library/PrivateFrameworks/Accelerate.framework/Frameworks/vecLib.framework/libvDSP.dylib 0x3434a000 - 0x34355fff GraphicsServices armv6 /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
I've had a similar problem before, and the solution for me was to weak link libSystem.B.dylib
1.) Open the target's properties (double click the target in the "Groups & Files" pane on the left).
2.) Go to the general tab.
3.) Find "libSystem.B.dylib" listed and change "Required" to "Weak".
If libSystem.B.dylib isn't listed then add it through "Existing Frameworks".
13 UkeBank 0x00003cd2 0x1000 + 11474
That's most likely where it is going wrong (assuming a bug in your application and not the framework). Figure out what your code is doing there (use debug symbols and/or a dissembler) and you'll be on the road to a theory that isn't just a guess.
User contributions licensed under CC BY-SA 3.0