Why does my app crash on launch?

I have had an App rejected by App Connect with the reason that it crashed on launch when using an iPad. They have sent me a crash report that I think suggests I have a run-time issue although I have no idea what could be causing it. I have run the app on an actual iPad and it launches perfectly.

I understand that the problem occurs in Thread 0, but I was also hoping for a Swift line number.

I would really appreciate help with what the issue might be.

Here is a link to the crash report

Consider this:

Exception Type:  EXC_BREAKPOINT (SIGTRAP)

A SIGTRAP means your app trapped, that is, it crashed itself because it detected some sort of consistency problem. The next step is to look at the backtrace of the crashing thread:

Thread 0 name:   Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libswiftCore.dylib … _assertionFailure(_:_:file:line:flags:) + 312
1   libswiftCore.dylib … _assertionFailure(_:_:file:line:flags:) + 312
2   DailyGravy         … 0x104080000 + 127616
3   DailyGravy         … 0x104080000 + 126292
4   libdispatch.dylib  … _dispatch_client_callout + 20
5   libdispatch.dylib  … _dispatch_once_callout + 32
6   DailyGravy         … 0x104080000 + 177632
7   DailyGravy         … 0x104080000 + 172632
8   DailyGravy         … 0x104080000 + 168216
9   DailyGravy         … 0x104080000 + 214596
10  SwiftUI            … 0x1c55df000 + 953904
11  SwiftUI            … 0x1c55df000 + 249840
12  SwiftUI            … 0x1c55df000 + 953904
13  SwiftUI            … 0x1c55df000 + 116060
14  SwiftUI            … 0x1c55df000 + 789488
15  SwiftUI            … 0x1c55df000 + 194724
16  SwiftUI            … 0x1c55df000 + 210728
17  UIKitCore          … -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1980

Frames 1 through 0 confirm that you tripped some sort of Swift assert. Frame 2 shows that this was in your code. Frames 5 through 4 show that this was the result of a dispatch_once call. And frame 17 shows that your code was running in response to a UIKit layout request.

The next step here is to symbolicate your log. For advice on that, see Adding Identifiable Symbol Names to a Crash Report.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Thanks Quinn for pointing me in the right direction.

I have managed to reproduce the results you posted above by dragging my crash report into Devices & Simulators.

However it still doesn't fully symbolicate.

I have looked at the Organiser in Xcode to try and access the appropriate dSYMs and get the message: 'No dSYMs were found for Version 1.0 Build 1'.

I would appreciate any suggestions as to how to fully symbolicate the crash report so I know where to focus my attention.

Thanks, Phil

I would appreciate any suggestions as to how to fully symbolicate the crash report so I know where to focus my attention.

I don’t have much to add per the discussion in Adding Identifiable Symbol Names to a Crash Report. That is:

  1. Look in the crash report to get the UUID of the problematic Mach-O image.

  2. Confirm that you have a .dSYM that matches that UUID.

  3. Confirm that mdfind can find it.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Why does my app crash on launch?
 
 
Q