2014-05-08 170 views
0

當我在Xcode &中運行我的iOS應用程序(在提交之前)對其進行測試時,它不會返回任何錯誤並且工作完美無瑕。但是當我在應用商店更新後測試應用時,每當我在設備上打開應用時,它都會崩潰。我得到了我的崩潰日誌以下錯誤:應用程序SIGABRT崩潰

Exception Type: EXC_CRASH (SIGABRT) 
Exception Codes: 0x0000000000000000, 0x0000000000000000 
Triggered by Thread: 0 
Last Exception Backtrace: 
0 CoreFoundation     0x2f9ecf06 __exceptionPreprocess + 126 
1 libobjc.A.dylib     0x3a183ce2 objc_exception_throw + 34 
2 CoreData      0x2f72a694 -[NSPersistentStoreCoordinator initWithManagedObjectModel:] + 392 
3 TapNotes      0x00015d3c -[AppDelegate persistentStoreCoordinator] (AppDelegate.m:104) 
4 TapNotes      0x00015b48 -[AppDelegate managedObjectContext] (AppDelegate.m:73) 
5 TapNotes      0x00016904 -[DeviceViewController managedObjectContext] (HomeViewController.m:22) 
6 TapNotes      0x00016b04 -[DeviceViewController viewDidAppear:] (HomeViewController.m:51) 
7 UIKit       0x32236d1e -[UIViewController _setViewAppearState:isAnimating:] + 434 
8 UIKit       0x322e6052 -[UINavigationController viewDidAppear:] + 178 
9 UIKit       0x32236d1e -[UIViewController _setViewAppearState:isAnimating:] + 434 
10 UIKit       0x3229be7a -[UIViewController _executeAfterAppearanceBlock] + 50 
11 UIKit       0x3229be04 _applyBlockToCFArrayCopiedToStack + 312 
12 UIKit       0x32214b6e _afterCACommitHandler + 454 
13 CoreFoundation     0x2f9b8034 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 16 
14 CoreFoundation     0x2f9b59c2 __CFRunLoopDoObservers + 282 
15 CoreFoundation     0x2f9b5d0e __CFRunLoopRun + 734 
16 CoreFoundation     0x2f920764 CFRunLoopRunSpecific + 520 
17 CoreFoundation     0x2f920546 CFRunLoopRunInMode + 102 
18 GraphicsServices    0x3488d6ce GSEventRunModal + 134 
19 UIKit       0x3227f88c UIApplicationMain + 1132 
20 TapNotes      0x00016886 main (main.m:16) 
21 libdyld.dylib     0x3a681ab2 tlv_initializer + 2 


Thread 0 Crashed: 
0 libsystem_kernel.dylib   0x3a7381f0 __pthread_kill + 8 
1 libsystem_pthread.dylib   0x3a7a07b2 pthread_kill + 54 
2 libsystem_c.dylib    0x3a6e8ff4 abort + 72 
3 libc++abi.dylib     0x39b3798a abort_message + 70 
4 libc++abi.dylib     0x39b506e2 default_terminate_handler() + 250 
5 libobjc.A.dylib     0x3a183f7a _objc_terminate() + 190 
6 libc++abi.dylib     0x39b4e1b0 std::__terminate(void (*)()) + 76 
7 libc++abi.dylib     0x39b4dd12 __cxa_rethrow + 98 
8 libobjc.A.dylib     0x3a183e2a objc_exception_rethrow + 38 
9 CoreFoundation     0x2f9207da CFRunLoopRunSpecific + 638 
10 CoreFoundation     0x2f920546 CFRunLoopRunInMode + 102 
11 GraphicsServices    0x3488d6ce GSEventRunModal + 134 
12 UIKit       0x3227f88c UIApplicationMain + 1132 
13 TapNotes      0x00016886 main (main.m:16) 
14 libdyld.dylib     0x3a681ab4 start + 0 

Thread 1: 
0 libsystem_kernel.dylib   0x3a725804 kevent64 + 24 
1 libdispatch.dylib    0x3a674050 _dispatch_mgr_invoke + 228 
2 libdispatch.dylib    0x3a66e2de _dispatch_mgr_thread + 34 

Thread 2: 
0 libsystem_kernel.dylib   0x3a738c70 __workq_kernreturn + 8 
1 libsystem_pthread.dylib   0x3a79dc1e _pthread_wqthread + 306 
2 libsystem_pthread.dylib   0x3a79dad8 start_wqthread + 4 

Thread 3: 
0 libsystem_kernel.dylib   0x3a738c70 __workq_kernreturn + 8 
1 libsystem_pthread.dylib   0x3a79dc1e _pthread_wqthread + 306 
2 libsystem_pthread.dylib   0x3a79dad8 start_wqthread + 4 

Thread 0 crashed with ARM Thread State (32-bit): 
    r0: 0x00000000 r1: 0x00000000  r2: 0x00000000  r3: 0x00002060 
    r4: 0x00000006 r5: 0x3c69418c  r6: 0x00000000  r7: 0x27df2594 
    r8: 0x17e8d090 r9: 0x00000001  r10: 0x0000000c  r11: 0x00000002 
    ip: 0x00000148 sp: 0x27df2588  lr: 0x3a7a07b7  pc: 0x3a7381f0 
    cpsr: 0x00000010 

我曾嘗試在&同樣的事情會發生多個設備開放。我該怎麼做才能解決這個問題?

+0

看看你的設備上的崩潰日誌,看看你的應用程序崩潰的地方。 – rmaddy

+0

根據您發佈的內容,無法分辨。 *提交前測試*在您的案例中意味着什麼? Ad-Hoc構建,在插入XCode時運行快速構建? –

+0

@rmaddy它在崩潰日誌上說什麼?它只是有很多奇怪的字母和數字混雜在一起。 – user3364589

回答

0

從日誌的外觀來看,您的代碼中可能有默認的Core Data堆棧,並且在更新中修改了您的對象模型。然後,您在版本更新上遇到遷移問題。有在覈心數據模板存在於

- (NSPersistentStoreCoordinator *)persistentStoreCoordinator

方法一個很好的調用abort()。關於它如何不出現在生產代碼中以及關於遷移的一些想法有很長的評論。我會看看這種方法,並驗證abort()已經消失。

+0

非常感謝!我從AppDelgate.m中刪除了'abort()',我認爲我的問題會被修復。只有測試它的方法是提交更新! – user3364589

+0

@ user3364589提交之前,爲什麼不在自己的設備上測試?使用你的客戶作爲測試人員是一個壞主意。 – rmaddy

+0

@ user3364589只是刪除'abort()'不能解決問題。您需要遷移更改或刪除並重建商店。這些任何一方都有很多資源。但其中止的原因是因爲問題,只是刪除不能解決問題,只是後果。 – utahwithak