简体   繁体   English

由于负载崩溃,Apple拒绝了我的应用程序,我无法重现它。 我该怎么办?

[英]Apple rejected my app due to crash on load and I can't reproduce it. What should I do?

My app was rejected to a crash on launch. 我的应用程序因发布时崩溃而被拒绝。 But tried to run it on a device by installing the app via itunes and testflight, I also implemented crashlytics in my app, but still I can't find the source of crash. 但是试图通过itunes和testflight安装应用程序在设备上运行它,我也在我的应用程序中实现了crashlytics,但我仍然无法找到崩溃的来源。 What should I do? 我该怎么办?

We found your app crashed on launch so we were unable to review it. 我们发现您的应用在发布时崩溃,因此我们无法对其进行审核。

Please revise your app and test it on a device to ensure it will launch without crashing, and that it runs as expected, before resubmitting. 请修改您的应用并在设备上进行测试,以确保它能够在不重新启动的情况下启动,并且在重新提交之前按预期运行。

Please see the attached crash logs. 请参阅随附的崩溃日志。

For discrete code-level questions, you may wish to consult with Apple Developer Technical Support. 对于离散的代码级问题,您可以咨询Apple Developer技术支持。 If you have crash logs, symbolicate the crash logs before contacting Apple Developer Technical Support. 如果您有崩溃日志,请在联系Apple Developer技术支持之前表示崩溃日志。

If you have difficulty reproducing this issue, please try testing the workflow as described in Testing Workflow with Xcode's Archive feature. 如果您在复制此问题时遇到困难,请尝试按照使用Xcode存档功能测试工作流程中所述测试工作流程。

EDIT: I tried to symbolicate the crash log and I saw that it crashes on thread 0 index 0 which is the getAllContacts function. 编辑:我试图象征崩溃日志,我看到它在线程0索引0崩溃,这是getAllContacts函数。 I'm not sure what's the problem. 我不确定是什么问题。 here's the code: 这是代码:

- (NSMutableArray *)getAllContacts{
    ABAddressBookRef addressBook = ABAddressBookCreate( );
    CFArrayRef allPeople = ABAddressBookCopyArrayOfAllPeople( addressBook );
    CFIndex nPeople = ABAddressBookGetPersonCount( addressBook );
    NSMutableArray *contact = [[NSMutableArray alloc] init];

    for ( int i = 0; i < nPeople; i++ )
    {
        ABRecordRef ref = CFArrayGetValueAtIndex( allPeople, i );
        NSString *firstName = CFBridgingRelease(ABRecordCopyValue(ref, kABPersonFirstNameProperty));
        NSString *lastName = CFBridgingRelease(ABRecordCopyValue(ref, kABPersonLastNameProperty));

        if(lastName == nil && firstName != nil){
            [contact addObject:[NSString stringWithFormat:@"%@", firstName]];
        }
        else if(lastName != nil && firstName == nil){
            [contact addObject:[NSString stringWithFormat:@"%@", lastName]];
        }
        else{
            [contact addObject:[NSString stringWithFormat:@"%@ %@", firstName, lastName]];
        }
    }
    CFRelease(addressBook);
    CFRelease(allPeople);
    NSLog(@"All Contacts: %@", contact);
    return contact;
}

Here is the crash log after symbolication: 以下是符号化后的崩溃日志:

{"bundleID":"com.axon.undotext","app_name":"Undo Text","bug_type":"109","name":"Undo Text","os_version":"iPhone OS 7.1.1 (11D201)","version":"1.5 (1.0)"}
Incident Identifier: CDEE9887-DE46-4C7B-93D9-6F5B64C30448
CrashReporter Key:   814350e202fe6bd49117983388396d3d1b870da1
Hardware Model:      xxx
Process:             Undo Text [3268]
Path:                /var/mobile/Applications/1F7938ED-7911-4838-8F79-26039EF3E386/Undo Text.app/Undo Text
Identifier:          com.axon.undotext
Version:             1.5 (1.0)
Code Type:           ARM (Native)
Parent Process:      launchd [1]

Date/Time:           2014-06-12 13:43:03.567 -0700
OS Version:          iOS 7.1.1 (11D201)
Report Version:      104

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x000000000000defe
Triggered by Thread:  0

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   CoreFoundation                  0x2eb0b3c5 CFRelease + 1137
1   Undo Text                       0x00035897 -[ContactsManager getAllContacts] (ContactsManager.m:58)
2   Undo Text                       0x00028d59 -[ViewController setupView] (ViewController.m:123)
3   Undo Text                       0x00028901 -[ViewController viewDidLoad] (ViewController.m:65)
4   UIKit                           0x3140ea4f -[UIViewController loadViewIfRequired] + 515
5   UIKit                           0x3140e80d -[UIViewController view] + 21
6   UIKit                           0x31485c39 -[UIClientRotationContext initWithClient:toOrientation:duration:andWindow:] + 385
7   UIKit                           0x3148459d -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:isRotating:] + 1197
8   UIKit                           0x314840e3 -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:] + 43
9   UIKit                           0x3148406b -[UIWindow _setRotatableViewOrientation:updateStatusBar:duration:force:] + 91
10  UIKit                           0x31484003 -[UIWindow _setRotatableViewOrientation:duration:force:] + 39
11  UIKit                           0x3147c67d __57-[UIWindow _updateToInterfaceOrientation:duration:force:]_block_invoke + 105
12  UIKit                           0x31410695 -[UIWindow _updateToInterfaceOrientation:duration:force:] + 381
13  UIKit                           0x31483d55 -[UIWindow setAutorotates:forceUpdateInterfaceOrientation:] + 693
14  UIKit                           0x31483825 -[UIViewController _tryBecomeRootViewControllerInWindow:] + 157
15  UIKit                           0x31415611 -[UIWindow addRootViewControllerViewIfPossible] + 457
16  UIKit                           0x31412dd5 -[UIWindow _setHidden:forced:] + 301
17  UIKit                           0x3147ca4d -[UIWindow makeKeyAndVisible] + 57
18  UIKit                           0x314796e1 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1817
19  UIKit                           0x31473cc5 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 717
20  UIKit                           0x3140fc93 -[UIApplication handleEvent:withNewEvent:] + 3547
21  UIKit                           0x3140edf5 -[UIApplication sendEvent:] + 69
22  UIKit                           0x31473401 _UIApplicationHandleEvent + 613
23  GraphicsServices                0x33a46b53 _PurpleEventCallback + 607
24  GraphicsServices                0x33a4673b PurpleEventCallback + 31
25  CoreFoundation                  0x2eba5845 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 33
26  CoreFoundation                  0x2eba57df __CFRunLoopDoSource1 + 343
27  CoreFoundation                  0x2eba3fab __CFRunLoopRun + 1403
28  CoreFoundation                  0x2eb0e765 CFRunLoopRunSpecific + 521
29  CoreFoundation                  0x2eb0e547 CFRunLoopRunInMode + 103
30  UIKit                           0x31472627 -[UIApplication _run] + 759
31  UIKit                           0x3146d88d UIApplicationMain + 1133
32  Undo Text                       0x0004deff main (main.m:16)
33  Undo Text                       0x00027764 start + 36

Thread 1 name:  Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0   libsystem_kernel.dylib          0x39d52804 kevent64 + 24
1   libdispatch.dylib               0x39ca1051 _dispatch_mgr_invoke + 229
2   libdispatch.dylib               0x39c9b2df _dispatch_mgr_thread + 35

Thread 2:
0   libsystem_kernel.dylib          0x39d65c70 __workq_kernreturn + 8
1   libsystem_pthread.dylib         0x39dcac1f _pthread_wqthread + 307
2   libsystem_pthread.dylib         0x39dcaad8 start_wqthread + 4

Thread 3:
0   libsystem_kernel.dylib          0x39d65c70 __workq_kernreturn + 8
1   libsystem_pthread.dylib         0x39dcac1f _pthread_wqthread + 307
2   libsystem_pthread.dylib         0x39dcaad8 start_wqthread + 4

Thread 0 crashed with ARM Thread State (32-bit):
    r0: 0x00000000    r1: 0x39f720f8      r2: 0x00000003      r3: 0x00000002
    r4: 0x00000000    r5: 0x16e85070      r6: 0x00000000      r7: 0x00177300
    r8: 0x00000144    r9: 0x3ba52e30     r10: 0x16e69890     r11: 0x31a3841a
    ip: 0x2eb0af55    sp: 0x001772c0      lr: 0x0003589b      pc: 0x2eb0b3c4
  cpsr: 0x60000030

Looks like your app is crashing while rotating, are you sure you properly tested this? 看起来您的应用在旋转时会崩溃,您确定已经对此进行了正确测试吗? Especially starting your app while device is in landscape vs portrait. 特别是当设备处于横向与纵向时启动您的应用。

Also something that can induce weird behaviors is starting an app with device rotated BUT with orientation locked. 此外,可能会导致奇怪的行为的东西是启动一个设备旋转BUT与方向锁定的应用程序。

And test on an actual device, not simulator, in rare cases you have different behaviors. 并且在实际设备上测试,而不是模拟器,在极少数情况下,您有不同的行为。

Also as others stated, learn to symbolicate , that would give you exact line where your code is crashing. 另外,正如其他人所说的,学习符号化 ,这将为您提供代码崩溃的确切行。

From CFRelease docs: 来自CFRelease docs:

If cf is NULL, this will cause a runtime error and your application will crash. 如果cf为NULL,这将导致运行时错误,您的应用程序将崩溃。

You need to check addressBook and allPeople to make sure they're not coming back as NULL. 您需要检查addressBook和allPeople以确保它们不会返回NULL。 Apple is probably testing your app on a device with an empty address book, which is returning NULL, and is then getting passed to CFRelease, making your app crash. Apple可能正在使用空地址簿的设备上测试您的应用程序,该地址簿返回NULL,然后传递给CFRelease,使您的应用程序崩溃。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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