1

我是一个相对较新的开发人员,需要一些帮助。当我通过 Xcode 连接我的应用程序时,它不会崩溃。但是,当我第二天尝试再次运行它(从我的手机启动)时,它在尝试打开它时崩溃。我目前正在调试情况,不确定如何进行。

我无法理解设备日志崩溃的工作原理。我能够通过 Window>Device and Simulators>View Device Logs>All Logs 在 Xcode 中找到我的设备崩溃。我能够理解具有“EXC_BREAKPOINT(SIGTRAP)”的异常类型意味着我强制解开一个零值。我不确定如何通过查看日志(或任何其他方法)在我的代码中找到发生这种情况的位置。如何在我的所有文件中找到导致崩溃的位置?

Date/Time:           2018-04-05 14:33:48.7121 -0500
Launch Time:         2018-04-05 14:33:47.8058 -0500
OS Version:          iPhone OS 11.3 (15E216)
Baseband Version:    1.04.16
Report Version:      104

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x0000000104177ff8
Termination Signal: Trace/BPT trap: 5
Termination Reason: Namespace SIGNAL, Code 0x5
Terminating Process: exc handler [0]
Triggered by Thread:  1

Filtered syslog:
None found

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0:
0   libsystem_kernel.dylib          0x0000000180d07e08 mach_msg_trap + 8
1   libsystem_kernel.dylib          0x0000000180d07c80 mach_msg + 72
2   CoreFoundation                  0x000000018124ae40 __CFRunLoopServiceMachPort + 196
3   CoreFoundation                  0x0000000181248908 __CFRunLoopRun + 1568
4   CoreFoundation                  0x0000000181168da8 CFRunLoopRunSpecific + 552
5   GraphicsServices                0x000000018314b020 GSEventRunModal + 100
6   UIKit                           0x000000018b14978c UIApplicationMain + 236
7   &me                             0x0000000102cd00e4 0x102bac000 + 1196260
8   libdyld.dylib                   0x0000000180bf9fc0 start + 4

Thread 1 name:  Dispatch queue: NSOperationQueue 0x1d4224f80 (QOS: UNSPECIFIED)
Thread 1 Crashed:
0   libswiftCore.dylib              0x0000000104177ff8 0x103fd0000 + 1736696
1   libswiftCore.dylib              0x0000000104177ff8 0x103fd0000 + 1736696
2   libswiftCore.dylib              0x00000001040182b8 0x103fd0000 + 295608
3   &me                             0x0000000102c9576c 0x102bac000 + 956268
4   &me                             0x0000000102c95cbc 0x102bac000 + 957628
5   CFNetwork                       0x0000000181831c1c __75-[__NSURLSessionLocal taskForClass:request:uploadFile:bodyData:completion:]_block_invoke + 32
6   CFNetwork                       0x000000018184a93c __49-[__NSCFLocalSessionTask _task_onqueue_didFinish]_block_invoke + 152
7   Foundation                      0x0000000181ccae88 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 16
8   Foundation                      0x0000000181c0c8d0 -[NSBlockOperation main] + 72
9   Foundation                      0x0000000181c0bcac -[__NSOperationInternal _start:] + 848
10  libdispatch.dylib               0x0000000180b94ae4 _dispatch_client_callout + 16
11  libdispatch.dylib               0x0000000180bd0b0c _dispatch_block_invoke_direct$VARIANT$armv81 + 216
12  libdispatch.dylib               0x0000000180b94ae4 _dispatch_client_callout + 16
13  libdispatch.dylib               0x0000000180bd0b0c _dispatch_block_invoke_direct$VARIANT$armv81 + 216
14  libdispatch.dylib               0x0000000180bd0a00 dispatch_block_perform$VARIANT$armv81 + 104
15  Foundation                      0x0000000181ccc750 __NSOQSchedule_f + 376
16  libdispatch.dylib               0x0000000180b94ae4 _dispatch_client_callout + 16
17  libdispatch.dylib               0x0000000180bd17a8 _dispatch_continuation_pop$VARIANT$armv81 + 416
18  libdispatch.dylib               0x0000000180bd0180 _dispatch_async_redirect_invoke$VARIANT$armv81 + 596
19  libdispatch.dylib               0x0000000180bd63a4 _dispatch_root_queue_drain + 592
20  libdispatch.dylib               0x0000000180bd60f0 _dispatch_worker_thread3 + 112
21  libsystem_pthread.dylib         0x0000000180ec7fac _pthread_wqthread + 1176
22  libsystem_pthread.dylib         0x0000000180ec7b08 start_wqthread + 4
4

1 回答 1

0

要了解崩溃日志,您可以查看以下苹果文档。这是迄今为止我找到的最好的解释。

https://developer.apple.com/library/content/technotes/tn2151/_index.html

于 2018-04-06T08:08:56.927 回答