簡體   English   中英

由於發布崩潰,Apple拒絕了app

[英]Apple rejected app due to launch crash

Apple表示他們無法測試應用程序,因為它在發布時崩潰了。 我無法重現崩潰並向我發送此報告崩潰。 我如何知道崩潰發生的地方?

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

Filtered syslog:
None found

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libobjc.A.dylib                 0x0000000182ae1b90 0x182ac8000 + 105360
1   MyApp                           0x0000000100064b28 0x100034000 + 199464
2   MyApp                           0x0000000100064a0c 0x100034000 + 199180
3   MyApp                           0x000000010004434c 0x100034000 + 66380
4   UIKit                           0x00000001885c8c40 0x1885b4000 + 85056
5   UIKit                           0x00000001885c8844 0x1885b4000 + 84036
6   UIKit                           0x000000018870daf4 0x1885b4000 + 1415924
7   UIKit                           0x000000018870d8f8 0x1885b4000 + 1415416
8   UIKit                           0x000000018870d730 0x1885b4000 + 1414960
9   UIKit                           0x0000000188710698 0x1885b4000 + 1427096
10  UIKit                           0x00000001885d75b4 0x1885b4000 + 144820
11  UIKit                           0x000000018871246c 0x1885b4000 + 1434732
12  UIKit                           0x0000000188710f70 0x1885b4000 + 1429360
13  UIKit                           0x00000001885e1374 0x1885b4000 + 185204
14  UIKit                           0x00000001885e10e8 0x1885b4000 + 184552
15  UIKit                           0x00000001885d0f14 0x1885b4000 + 118548
16  UIKit                           0x00000001885d013c 0x1885b4000 + 115004
17  UIKit                           0x00000001885cf7e8 0x1885b4000 + 112616
18  UIKit                           0x000000018864149c 0x1885b4000 + 578716
19  MyApp                           0x0000000100050048 0x100034000 + 114760
20  UIKit                           0x000000018863e9c0 0x1885b4000 + 567744
21  UIKit                           0x000000018886e184 0x1885b4000 + 2859396
22  UIKit                           0x00000001888725f0 0x1885b4000 + 2876912
23  UIKit                           0x000000018886f764 0x1885b4000 + 2864996
24  FrontBoardServices              0x0000000184e0b7ac 0x184de4000 + 161708
25  FrontBoardServices              0x0000000184e0b618 0x184de4000 + 161304
26  FrontBoardServices              0x0000000184e0b9c8 0x184de4000 + 162248
27  CoreFoundation                  0x000000018342109c 0x183340000 + 921756
28  CoreFoundation                  0x0000000183420b30 0x183340000 + 920368
29  CoreFoundation                  0x000000018341e830 0x183340000 + 911408
30  CoreFoundation                  0x0000000183348c50 0x183340000 + 35920
31  UIKit                           0x000000018863794c 0x1885b4000 + 538956
32  UIKit                           0x0000000188632088 0x1885b4000 + 516232
33  MyApp                           0x000000010004820c 0x100034000 + 82444
34  libdyld.dylib                   0x0000000182ee68b8 0x182ee4000 + 10424

我不知道從哪里開始,因為在我的情況下我的應用程序工作正常。 我真的需要幫助。

更新 :所以我嘗試重新符號化日志,這就是我得到的

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libobjc.A.dylib                 0x0000000182ae1b90 objc_msgSend + 16
1   MyApp                           0x0000000100064b28 -[DBManager copyDatabaseIntoDocumentsDirectory] (DBManager.m:56)
2   MyApp                           0x0000000100064a0c -[DBManager initWithDatabaseFilename:] (DBManager.m:43)
3   MyApp                           0x000000010004434c -[DoorTalkViewController viewDidLoad] (DoorTalkViewController.mm:133)
4   UIKit                           0x00000001885c8c40 -[UIViewController loadViewIfRequired] + 996
5   UIKit                           0x00000001885c8844 -[UIViewController view] + 28
6   UIKit                           0x000000018870daf4 -[UITabBarController transitionFromViewController:toViewController:transition:shouldSetSelected:] + 488
7   UIKit                           0x000000018870d8f8 -[UITabBarController transitionFromViewController:toViewController:] + 68
8   UIKit                           0x000000018870d730 -[UITabBarController _setSelectedViewController:] + 404
9   UIKit                           0x0000000188710698 -[UITabBarController setSelectedViewController:] + 252
10  UIKit                           0x00000001885d75b4 +[UIView(Animation) performWithoutAnimation:] + 80
11  UIKit                           0x000000018871246c -[UITabBarController _selectDefaultViewControllerIfNecessaryWithAppearanceTransitions:] + 332
12  UIKit                           0x0000000188710f70 -[UITabBarController viewWillAppear:] + 200
13  UIKit                           0x00000001885e1374 -[UIViewController _setViewAppearState:isAnimating:] + 628
14  UIKit                           0x00000001885e10e8 -[UIViewController __viewWillAppear:] + 156
15  UIKit                           0x00000001885d0f14 -[UIView(Hierarchy) _willMoveToWindow:withAncestorView:] + 596
16  UIKit                           0x00000001885d013c -[UIView(Internal) _addSubview:positioned:relativeTo:] + 444
17  UIKit                           0x00000001885cf7e8 -[UIWindow addRootViewControllerViewIfPossible] + 664
18  UIKit                           0x000000018864149c -[UIWindow setRootViewController:] + 1076
19  MyApp                           0x0000000100050048 -[idoubs2AppDelegate application:didFinishLaunchingWithOptions:] (idoubs2AppDelegate.mm:374)
20  UIKit                           0x000000018863e9c0 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 400
21  UIKit                           0x000000018886e184 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 2904
22  UIKit                           0x00000001888725f0 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1684
23  UIKit                           0x000000018886f764 -[UIApplication workspaceDidEndTransaction:] + 168
24  FrontBoardServices              0x0000000184e0b7ac __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 36
25  FrontBoardServices              0x0000000184e0b618 -[FBSSerialQueue _performNext] + 168
26  FrontBoardServices              0x0000000184e0b9c8 -[FBSSerialQueue _performNextFromRunLoopSource] + 56
27  CoreFoundation                  0x000000018342109c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
28  CoreFoundation                  0x0000000183420b30 __CFRunLoopDoSources0 + 540
29  CoreFoundation                  0x000000018341e830 __CFRunLoopRun + 724
30  CoreFoundation                  0x0000000183348c50 CFRunLoopRunSpecific + 384
31  UIKit                           0x000000018863794c -[UIApplication _run] + 460
32  UIKit                           0x0000000188632088 UIApplicationMain + 204
33  MyApp                           0x000000010004820c main (main.m:25)
34  libdyld.dylib                   0x0000000182ee68b8 start + 4

更新:我從教程中獲得的CopyDatabaseIntoDocumentsDirectory方法

-(void)copyDatabaseIntoDocumentsDirectory{
    // Check if the database file exists in the documents directory.
    NSString *destinationPath = [self.documentsDirectory stringByAppendingPathComponent:self.databaseFilename];
    if (![[NSFileManager defaultManager] fileExistsAtPath:destinationPath]) {
        // The database file does not exist in the documents directory, so copy it from the main bundle now.
        NSString *sourcePath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:self.databaseFilename];
        NSError *error;
        [[NSFileManager defaultManager] copyItemAtPath:sourcePath toPath:destinationPath error:&error];

        // Check if any error occurred during copying and display it.
        if (error != nil) {
            NSLog(@"%@", [error localizedDescription]); 
        }
    }
}

第56行是NSLog(@"%@", [error localizedDescription]);

你可以檢查一下,請將錯誤的初始化更新為:

NSError *error = nil;

我懷疑實際上沒有錯誤,但它指向垃圾數據的某個地址。 因此條件error != nil將返回true但無法識別選擇器localizedDescription

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM