2016-01-21 281 views
-1

我不知道爲什麼應用程序崩潰。這種崩潰只有在生產時纔會發生。但是,當我使用XCode和測試設備進行測試時,它不會發生。有人可以幫忙嗎?應用程序崩潰 - iOS

異常類型:EXC_CRASH(SIGABRT)異常代碼: 0x0000000000000000,0x0000000000000000異常注: EXC_CORPSE_NOTIFY由線索觸發:5

過濾系統日誌:無發現

全球跟蹤緩衝區(逆時間秒): 2.263960 CFNetwork 0x0000000182bd184c TCP連接0x14edc1a00 SSL握手完成 7.705489 AppleJPEG 0x0000000183c5eb54 [0x1500b3400]正在釋放會話 7.705489 AppleJPEG 0x000 0000183c5eb54 [0x14f0b8000]釋放會話 7.732061 AppleJPEG 0x0000000183c5e338 [0x14f0b8000]創建的會話 7.778372 AppleJPEG 0x0000000183c5e338 [0x1500b3400]創建的會話 8.108716 CFNetwork的0x0000000182c73104 TCP康涅狄格州0x14ef91720完整。 fd:8,錯誤:0 8.109137 CFNetwork 0x0000000182bd175c TCP連接0x14edc1a00開始SSL協商 8.109635 CFNetwork 0x0000000182c73104 TCP連接0x14edc1a00完成。 FD:7,ERR:0 8.110071 CFNetwork的0x0000000182c74630 TCP康恩0x14ef91720事件1 ERR:0 8.110317 CFNetwork的0x0000000182c74630 TCP康恩0x14edc1a00事件1 ERR:0 8.998617 CFNetwork的0x0000000182c73104 TCP康恩0x14ef5d510完整。 fd:16,err:0 8.998781 CFNetwork 0x0000000182c74630 TCP Conn 0x14ef5d510 event 1. err:0 9.010626 CFNetwork 0x0000000182c73104 TCP Conn 0x14ef92330 complete。 FD:9,ERR:0 9.010834 CFNetwork的0x0000000182c74630 TCP康恩0x14ef92330事件1 ERR:0 9.109427 CFNetwork的0x0000000182c74708 TCP康恩0x14ef5d510開始 9.139106 CFNetwork的0x0000000182c74708 TCP康恩0x14ef92330開始 9.139106 CFNetwork的0x0000000182c74708 TCP康恩0x14ef91720開始 9.139106 CFNetwork的0x0000000182c74708 TCP康恩0x14edc1a00開始 9.149299 CFNetwork的0x0000000182cc98bc默認標識 9.149299 CFNetwork的0x0000000182cc9888斷裂作用在CFHTTPCookieStorage單身創建默認的cookie存儲 9.149299 CFNetwork的0x0000000182d1b558斷裂作用在NSHTTPCookieStorage單

線程0名:調度隊列:com.apple.main線程線程0:0
libsystem_kernel.dylib 0x00000001821814bc mach_msg_trap + 8 1 libsystem_kernel.dylib 0x0000000182181338 mach_msg + 72 2
的CoreFoundation 0x00000001825b0ac0 __CFRunLoopServiceMachPort + 196 3的CoreFoundation 0x00000001825ae7c4 __CFRunLoopRun + 1032 4的CoreFoundation
0x00000001824dd​​680 CFRunLoopRunSpecific + 384個5 GraphicsServices
0x00000001839ec088 GSEventRunModal + 180 6的UIKit
0x0000000187354d90 UIApplicationMain + 204 7 AppTest
0x0000000100091138主(AppDel egate.swift:16)8 libdyld.dylib
0x000000018207e8b8啓動+ 4

線程1名:調度隊列:com.apple.libdispatch管理器線程 1:0 libsystem_kernel.dylib 0x000000018219d4fc kevent_qos + 8 1 libdispatch。dylib 0x000000018206094c _dispatch_mgr_invoke + 232 2 libdispatch.dylib 0x000000018204f7bc _dispatch_source_invoke + 0

線程2:0 libsystem_kernel.dylib 0x000000018219cb6c __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x0000000182261530 _pthread_wqthread + 1284 2
libsystem_pthread.dylib 0x0000000182261020 start_wqthread + 4

線程3:0 libsystem_kernel.dylib 0x000000018219cb6c __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x0000000182261530 _pthread_wqthread + 1284 2
libsystem_pthread.dylib 0x0000000182261020 start_wqthread + 4

線程4:0 libsystem_kernel.dylib 0x000000018219cb6c __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x0000000182261530 _pthread_wqthread + 1284 2
libsystem_pthread.dylib 0x0000000182261020 start_wqthread + 4

螺紋5名:調度隊列:NSOperationQueue 0x14edadea0 :: 的NSOperation 0x14ed2be60(QOS:LEGACY)螺紋5毀損:0
libsystem_kernel.dylib 0x000000018219c140 pthread_kill + 8 1 libsystem_pthread.dylib 0x0000000182264ef8 pthread_kill + 112 2 libsystem_c.dylib 0x000000018210ddac中止+ 140 3
libswiftCore.dylib 0x00000001008117bc 0x100618000 + 2070460 4 libswiftCore.dylib 0x00000001007ece14 0x100618000 + 1920532 5 libswiftCore.dylib
0x00000001007ecea0 0x100618000 + 1920672 6 libswiftCore.dylib
0x0000000100813d00 0x100618000 + 2080000 7 AppTest
0x00000001000b83c0 Util.storePurchaseRecord(!AnyObject) - >() (Util.swift:535)。8 AppTest 0x000000010008a2f0 AppViewController(validateReceipt(AppViewController) - >(() - >()) - >())。 (閉包#1)(AppViewController.swift:1069)9 CFNetwork 0x0000000182bd b344 __75 - [__ NSURLSessionLocal taskForClass:請求:uploadFile:bodyData:完成:] _ block_invoke + CFNetwork的0x0000000182bedcc4 __49 - [__ NSCFLocalSessionTask _task_onqueue_didFinish] _block_invoke + 296 11基金會0x0000000182fa0334 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK
+ 16 12基金會0x0000000182ef3100 - [NSBlockOperation主] + 96 13基金會
0x0000000182ee3348 - [__ NSOperationInternal _start:] + 604 14 基金會0x0000000182fa2728 __NSOQSchedule_f + 224 15 libdispatch.dylib 0x000000018204d5f0 _dispatch_client_callout + 16 16 libdispatch.dylib 0x0000000182059634 _dispatch_queue_drain + 864 17 libdispatch.dylib 0x00000001820510f4 _dispatch_queue_invoke + 464 18 libdispatch.dylib 0x000000018205b504 _dispatch_root_queue_drain + 728 19 libdispatch.dylib 0x000000018205b224 _dispatch_worker_thread3 + 112 20 libsystem_pthread.dylib 0x0000000182261470 _pthread_wqthread + 1092 21 libsystem_pthread.dylib 0x0000000182261020 start_wqthread + 4

螺紋6名:COM .apple.NSURLConnectionLoader線程6:0
libsystem_kernel.dylib 0x00000001821814bc mach_msg_trap + 8 1 libsystem_kernel。dylib 0x0000000182181338 mach_msg + 72 2
的CoreFoundation 0x00000001825b0ac0 CFRunLoopServiceMachPort + 196 3的CoreFoundation 0x00000001825ae7c4 __CFRunLoopRun + 1032 4的CoreFoundation
0x00000001824dd​​680 CFRunLoopRunSpecific + 384 5 CFNetwork的
0x0000000182c4d434 + [NSURLConnection的(裝載機)_resourceLoadLoop:] + 412 6基金會0x0000000182fbbc40 __NSThread__start
+ 1000 7 libsystem_pthread.dylib 0x0000000182263b28 _pthread_body + 156 8 libsystem_pthread.dylib
0x0000000182263a8c _pthread_body + 0 9 libsystem_pthread.dylib
0x0000000182261028 thread_start + 4

螺紋7:0 libsystem_kernel.dylib 0x000000018219cb6c __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x0000000182261530 _pthread_wqthread + 1284 2
libsystem_pthread.dylib 0x0000000182261020 start_wqthread + 4

螺紋8:0 libsystem_kernel.dylib 0x000000018219cb6c __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x0000000182261530 _pthread_wqthread + 1284 2
libsystem_pthread.dylib 0x0000000182261020 start_wqthread + 4

螺紋9名:com.apple.CFSocket.private螺紋9:0
libsystem_kernel.dylib 0x000000018219c368 __select + 8 1
的CoreFoundation 0x00000001825b7028 __CFSocketManager + 648 2 libsystem_pthread.dylib 0x0000000182263b28 _pthread_body + 156 3 libsystem_pthread.dylib 0x0000000182263a8c _pthread_body + 0 4 libsystem_pthread.dylib
0x0000000182261028 thread_start + 4

螺紋5與墜毀ARM線程狀態(64位): X0:0x0000000000000000 X1:0x0000000000000000 X2:0x0000000000000000 X3:0x000000014ed98c3c X4:0x0000000000000000 X5:0x000的0000000000020 5233:0x0000000000000000 X7:0x0000000000000f80 X8:0x000000000c000000 X9:0x0000000004000000 X10:0x0000000000000000 X11:0x00000001a21903a9 X12:0x00000001a21903a9 X13:0x0000000000000018 X14:0x000000008000001f X15: 0x0000000080000023 X16:0x0000000000000148 X17:0x0000000100838088 X18:0x0000000000000000 X19:0x0000000000000006 X20: 0x000000016e247000 X21:X22 0x000000019fcfa570:0x000000016e246308 X23:X24 0x000000014ee05f40:0x000000014ee05f40 X25: 0x000000014ef95880 X26:X27 0x000000014ef85260:0xa000000000000301
X28:0x000000014ef7f6e0 FP:0x000000016e246220 LR: 0x0000000182264ef8 SP:0x000000016e246200 PC:0x000000018219 c140 cpsr:0x00000000

+0

同樣的問題。只在生產中發生。在開發中工作正常嗎?你有沒有找到解決方案? – Sebyddd

回答

2

一些事情是一個事件(SIGABRT)意味着你墜毀是因爲某些事情導致中止。崩潰的線程跟蹤似乎是由未處理的語言異常引起的異常。在線程5中,看起來這個異常是由調用Util.swift文件到 Util.storePurchaseRecord(AnyObject!) - >()(Util.swift:535)引起的。來自AppViewController。(validateReceipt(AppViewController) - >(() - >()) - >())。(closure#1)(AppViewController.swift:1069)。這種類型的崩潰最常見的原因是由於可選爲零,並且被迫解包或不正確處理。

我建議通過第1069行的AppViewController代碼和第535行左右的Util.swift來查看。看看是否在任何情況下可選的被強制解包,如果是的話用guard語句解開它。