简体   繁体   中英

App crashes at launch on iPhone6, runs fine on iPhone4s and iPad Retina and iPhone6 simulator

The iPhone6 has been working fine during app development; it stopped working when I added the iPhone4s (which works fine with the app, as does iPad Retina). When I delete the app from iPhone6 and download again, I get the "Trust" question on the iPhone6, but saying yes doesn't help. The iPhone6 is still recognized in iTunes on Mavericks. This happened once before, but fooling around, trying various Mac and iPhone restarts, it started working again, and I didn't know what I did. This time I can't clear it; I get the splash screen and then it crashes. So frustrating.

Do you know the magic to get the Mac and iPhone6 talking again?

Thank you!!!

The iPhone crash:

 Incident Identifier: 3C33B554-EBF3-4AE3-B060-6E4EBAE4A1F2
   CrashReporter Key:   1ea3487f41d2b6e8c654694d1aeb4eda4ac9cf1f
   Hardware Model:      iPhone7,2
   Process:             XxxxXxxx [261]
   Path:                /private/var/mobile/Containers/Bundle/Application/C243C18C-D322-40E6-8803-B801EFB219DD/XxxxXxxx.app/XxxxXxxx
   Identifier:          com.xxxxxxx. XxxxXxxx
   Version:             1.0 (1.0)
   Code Type:           ARM-64 (Native)
   Parent Process:      launchd [1]

   Date/Time:           2015-01-04 15:47:21.425 -0800
   Launch Time:         2015-01-04 15:47:21.283 -0800
   OS Version:          iOS 8.1.2 (12B440)
   Report Version:      105

   Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
   Exception Subtype: KERN_INVALID_ADDRESS at 0x000000016fbd9950
   Triggered by Thread:  0

   Thread 0 name:  Dispatch queue: com.apple.main-thread
   Thread 0 Crashed:
   0   XxxxXxxx                         0x0000000100d3a3dc 0x1000ac000 + 13165532
   1   UIKit                            0x0000000188938a9c -[UIViewController loadViewIfRequired] + 688
   2   UIKit                            0x00000001889387ac -[UIViewController view] + 28
   3   UIKit                            0x000000018893ee74 -[UIWindow addRootViewControllerViewIfPossible] + 68

The Xcode 6 side:

#import <UIKit/UIKit.h>

#import "XXXAppDelegate.h"

int main(int argc, char * argv[])
{
    @autoreleasepool {
        return UIApplicationMain(argc, argv, nil, NSStringFromClass([RIVAppDelegate class]));  Thread 1:EXC_BAD_ACCESS (code=1, address=0x16fc41830)
    }
}

I'm submitting a compiler/linker/loader bug (can't tell which it is) to Apple (a valid re-ordering of valid code gets it to work on iPhone6. I'll update with Apple's response.

Edit: Continuing saga: This code causes a crash on iPhone6 (in viewDidLoad):

switch (ind) {  
0: str = "a"; break;
1: str = "b"; break;  
otherwise: str = "c";  
}  

This code works:

if (ind == 0) str = "a";  
else if (ind == 1) str = "b";  
else str = "c";  

Any ideas? Does switch do anything more than if/else (like a hidden setup call to a library exception catcher)?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM