2016-08-25 110 views
1

蘋果表示,他們無法測試該應用程序,因爲它啓動時崩潰。我無法重現崩潰並向我發送此報告崩潰。我怎麼知道墜毀事件發生的地方?蘋果拒絕應用程序,由於發射崩潰

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 

我不知道從哪裏開始,因爲在我的情況下,我的應用程序工作得很好。我真的需要幫助。

UPDATE: 所以我試圖重新Symbolicate日誌,這是我得到

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 

UPDATE: 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]);

+0

以符號化崩潰日誌開頭,以便您可以看到應用程序崩潰的位置。 – rmaddy

+0

@rmaddy是我的象徵權利嗎?這是我第一次這樣做,所以這對我來說都是新事物,對不起。 – theFool

+0

您確定您正在複製的目錄是否存在? –

回答

0

你能檢查一番,請更新錯誤的初始化:

NSError *error = nil; 

我懷疑,居然沒有任何錯誤,但它指出,垃圾數據的一些地址。所以條件error != nil將返回true,但不能識別選擇器localizedDescription

+0

希望如此,讓我更新;) –

+0

我會接受答案,如果它會被接受:) – theFool

+0

哈哈哈交易:),但不拒絕投票,如果它被拒絕:D –

相關問題