我不知道应用程序崩溃的原因。这种崩溃只发生在生产中。但是,当我使用XCode和测试设备进行测试时,它不会发生。有人可以帮忙吗?
异常类型:EXC_CRASH(SIGABRT)异常代码: 0x0000000000000000,0x0000000000000000例外注意: EXC_CORPSE_NOTIFY由线程触发:5
已过滤的系统日志:未找到
全局跟踪缓冲区(反向时间秒): 2.263960 CFNetwork 0x0000000182bd184c TCP Conn 0x14edc1a00 SSL握手完成 7.705489 AppleJPEG 0x0000000183c5eb54 [0x1500b3400]发布会话 7.705489 AppleJPEG 0x0000000183c5eb54 [0x14f0b8000]发布会话 7.732061 AppleJPEG 0x0000000183c5e338 [0x14f0b8000]创建的会话 7.778372 AppleJPEG 0x0000000183c5e338 [0x1500b3400]创建会话 8.108716 CFNetwork 0x0000000182c73104 TCP Conn 0x14ef91720完成。 fd:8,错误:0 8.109137 CFNetwork 0x0000000182bd175c TCP Conn 0x14edc1a00开始SSL协商 8.109635 CFNetwork 0x0000000182c73104 TCP Conn 0x14edc1a00完成。 fd:7,错误:0 8.110071 CFNetwork 0x0000000182c74630 TCP Conn 0x14ef91720事件1.错误:0 8.110317 CFNetwork 0x0000000182c74630 TCP Conn 0x14edc1a00事件1.错误:0 8.998617 CFNetwork 0x0000000182c73104 TCP Conn 0x14ef5d510完成。 fd:16,错误:0 8.998781 CFNetwork 0x0000000182c74630 TCP Conn 0x14ef5d510事件1.错误:0 9.010626 CFNetwork 0x0000000182c73104 TCP Conn 0x14ef92330完成。 fd:9,错误:0 9.010834 CFNetwork 0x0000000182c74630 TCP Conn 0x14ef92330事件1.错误:0 9.109427 CFNetwork 0x0000000182c74708 TCP Conn 0x14ef5d510已启动 9.139106 CFNetwork 0x0000000182c74708 TCP Conn 0x14ef92330已启动 9.139106 CFNetwork 0x0000000182c74708 TCP Conn 0x14ef91720已启动 9.139106 CFNetwork 0x0000000182c74708 TCP Conn 0x14edc1a00已启动 9.149299 CFNetwork 0x0000000182cc98bc使用默认标识符创建默认cookie存储 9.149299 CFNetwork 0x0000000182cc9888 CFHTTPCookieStorage单例故障 9.149299 CFNetwork 0x0000000182d1b558 NSHTTPCookieStorage单例故障
线程0名称:调度队列:com.apple.main-thread线程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
0x00000001824dd680 CFRunLoopRunSpecific + 384 5图形服务
0x00000001839ec088 GSEventRunModal + 180 6 UIKit
0x0000000187354d90 UIApplicationMain + 204 7 AppTest
0x0000000100091138 main(AppDelegate.swift:16)8 libdyld.dylib
0x000000018207e8b8 start + 4线程1名称:Dispatch queue:com.apple.libdispatch-manager Thread 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 abort + 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 0x0000000182bdb344 __75 - [__ NSURLSessionLocal taskForClass:request:uploadFile:bodyData:completion:] _ block_invoke + 32 10 CFNetwork 0x0000000182bedcc4 __49 - [__ NSCFLocalSessionTask _task_onqueue_didFinish] _block_invoke + 296 11 Foundation 0x0000000182fa0334 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK + 16 12基金会0x0000000182ef3100 - [NSBlockOperation main] + 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
0x00000001824dd680 CFRunLoopRunSpecific + 384 5 CFNetwork
0x0000000182c4d434 + [NSURLConnection(Loader)_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:0x0000000000000020 x6: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:0x000000019fcfa570 x22:0x000000016e246308 x23:0x000000014ee05f40 x24:0x000000014ee05f40 x25: 0x000000014ef95880 x26:0x000000014ef85260 x27:0xa000000000000301
x28:0x000000014ef7f6e0 fp:0x000000016e246220 lr: 0x0000000182264ef8 sp:0x000000016e246200 pc:0x000000018219c140 cpsr:0x00000000
答案 0 :(得分:3)
CRASH(SIGABRT)暗示你崩溃是因为某些事情导致了中止。崩溃的线程跟踪似乎是由未处理的语言异常引起的异常。在线程5中,似乎此异常是由对Util.swift文件的调用引起的 Util.storePurchaseRecord(AnyObject!) - > ()(Util.swift:535)。来自AppViewController。(validateReceipt(AppViewController) - >(() - >()) - >())。(闭包#1)(AppViewController.swift:1069)。这种类型的崩溃的最常见原因是由于可选的是零,并且强制打开或不正确地处理。
我建议通过围绕第1069行的AppViewController代码和第535行附近的Util.swift查看。看看是否在任何情况下强制解包可选项,如果是,则使用保护语句将其解包。