1

I am a relatively new developer and would like some assistance. My app does not crash when I have it hooked up via Xcode. However, when I try to run it again the next day (launching from my phone), it crashes when trying to open it. I am currently debugging the situation and am unsure how to proceed.

I'm having troubles with understanding how a device log crashes work. I was able to get to my device's crashes in Xcode via Window>Device and Simulators>View Device Logs>All Logs. I am able to understand that having an Exception type of "EXC_BREAKPOINT (SIGTRAP)" means that I force unwrap a nil value. I am unsure how through looking at the log (or any other method) that I can locate in my code where this is happening. How can I locate in all my files where this is causing a crash?

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
rmaddy
  • 314,917
  • 42
  • 532
  • 579
mbro12
  • 101
  • 2
  • 3
  • 2
    You need to symbolicate the crash log so you can see the exact line of your code causing the crash. Until then, no one can really help with the issue. – rmaddy Apr 05 '18 at 23:40
  • I symbolicated the crash log using this [link](https://stackoverflow.com/a/30431450/9330847) and now have a bunch of binary images listed with the same device log crash as above. Any ideas? – mbro12 Apr 06 '18 at 00:55

1 Answers1

0

To understand the crash log you can go through the following apple documentation. This is the best explanation I found so far.

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

Abhishek
  • 3,304
  • 4
  • 30
  • 44