App Store product Crash on iPhone XS Max and below, unable to find the cause of crash

Hi everyone. I have a difficult problem, my application is crashing, can't open the application. When clicking on the app icon, the app crashes immediately (can't open splash screen).

It is happening on some of the devices iPhone XSMax and below (iPhone 6, 7,8,...), and running any iOS version.

I don't know what's wrong with launching the app. Please help me. Thank you so much.

This is a log crash on firebase

Crashed: org.alamofire.session.rootQueue
0  libswiftCore.dylib             0x2ada68 swift_getExistentialTypeMetadata + 740
1  libswiftCore.dylib             0x2bd564 swift_disableDynamicReplacementScope + 6544
2  libswiftCore.dylib             0x2bd564 swift_disableDynamicReplacementScope + 6544
3  libswiftCore.dylib             0x2bc888 swift_disableDynamicReplacementScope + 3252
4  libswiftCore.dylib             0x2bcc8c swift_disableDynamicReplacementScope + 4280
5  libswiftCore.dylib             0x2bc888 swift_disableDynamicReplacementScope + 3252
6  libswiftCore.dylib             0x2bc0e8 swift_disableDynamicReplacementScope + 1300
7  libswiftCore.dylib             0x2bbea8 swift_disableDynamicReplacementScope + 724
8  libswiftCore.dylib             0x2bc55c swift_disableDynamicReplacementScope + 2440
9  libswiftCore.dylib             0x2ba8a8 swift_getTypeByMangledNameInEnvironment + 832
10 libswiftCore.dylib             0x2ba9ec swift_getTypeByMangledNameInContext + 208
11 Alamofire                      0x8020 <name omitted> + 4318232608 (<compiler-generated>:4318232608)
12 Alamofire                      0xcdc60 outlined destroy of EventMonitor? + 4319042656
13 Alamofire                      0xca4d0 attemptServerTrustAuthentication + 131 (SessionDelegate.swift:131)
14 Alamofire                      0xcd024 urlSession + 99 (<compiler-generated>:99)
15 Alamofire                      0xcbd3c @objc SessionDelegate.urlSession(_:task:didReceive:completionHandler:) + 4319034684
16 Foundation                     0xf5e88 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 16
17 Foundation                     0x378d0 -[NSBlockOperation main] + 72
18 Foundation                     0x36cac -[__NSOperationInternal _start:] + 848
19 libdispatch.dylib              0x1a60 _dispatch_client_callout + 16
20 libdispatch.dylib              0x9170 _dispatch_block_invoke_direct$VARIANT$mp + 224
21 libdispatch.dylib              0x1a60 _dispatch_client_callout + 16
22 libdispatch.dylib              0x9170 _dispatch_block_invoke_direct$VARIANT$mp + 224
23 libdispatch.dylib              0x905c dispatch_block_perform$VARIANT$mp + 104
24 Foundation                     0xf7750 __NSOQSchedule_f + 376
25 libdispatch.dylib              0x1a60 _dispatch_client_callout + 16
26 libdispatch.dylib              0xb9b4 _dispatch_queue_serial_drain$VARIANT$mp + 608
27 libdispatch.dylib              0xc2fc _dispatch_queue_invoke$VARIANT$mp + 336
28 libdispatch.dylib              0xb86c _dispatch_queue_serial_drain$VARIANT$mp + 280
29 libdispatch.dylib              0xc2fc _dispatch_queue_invoke$VARIANT$mp + 336
30 libdispatch.dylib              0xccc8 _dispatch_root_queue_drain_deferred_wlh$VARIANT$mp + 340
31 libdispatch.dylib              0x15098 _dispatch_workloop_worker_thread$VARIANT$mp + 668
32 libsystem_pthread.dylib        0xe70 _pthread_wqthread + 860
33 libsystem_pthread.dylib        0xb08 start_wqthread + 4
Post not yet marked as solved Up vote post of TomVsJerry Down vote post of TomVsJerry
2k views

Replies

This is a log crash on firebase

Do you have an Apple crash report for this? If so, please post it here, using the steps outlined in Posting a Crash Report.

Share and Enjoy

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

@eskimo I found two Apple crash report for this.

Number 1:

0   AppNotification          	0x0000000100dc9ac4 Swift runtime failure: Unexpectedly found nil while unwrapping an Optional value + 0 (NotificationService.swift:0)
1   AppNotification          	0x0000000100dc9ac4 specialized NotificationService.didReceive(_:withContentHandler:) + 2800 (<compiler-generated>:47)
2   AppNotification          	0x0000000100dc73e0 didReceive + 16 (<compiler-generated>:0)
3   AppNotification          	0x0000000100dc73e0 @objc NotificationService.didReceive(_:withContentHandler:) + 84
4   UserNotifications             	0x00000001b2394790 -[_UNNotificationServiceExtensionRemoteContext didReceiveNotificationRequest:withCompletionHandler:] + 428 (_UNNotificationServiceExtensionRemoteContext.m:53)
5   Foundation                    	0x00000001a4cc1304 __NSXPCCONNECTION_IS_CALLING_OUT_TO_EXPORTED_OBJECT_S2__ + 12 (NSXPCConnection.m:272)
6   Foundation                    	0x00000001a4afe5f8 -[NSXPCConnection _decodeAndInvokeMessageWithEvent:flags:] + 1736 (NSXPCConnection.m:787)
7   Foundation                    	0x00000001a4cc141c message_handler + 224 (NSXPCConnection.m:866)
8   libxpc.dylib                  	0x00000001ebe460b0 _xpc_connection_call_event_handler + 68 (connection.c:0)
9   libxpc.dylib                  	0x00000001ebe4642c _xpc_connection_mach_event + 880 (connection.c:1227)
10  libdispatch.dylib             	0x00000001a351c358 _dispatch_client_callout4 + 16 (object.m:599)
11  libdispatch.dylib             	0x00000001a34f03dc _dispatch_mach_msg_invoke$VARIANT$armv81 + 376 (mach.c:2443)
12  libdispatch.dylib             	0x00000001a34f8210 _dispatch_lane_serial_drain$VARIANT$armv81 + 260 (inline_internal.h:2598)
13  libdispatch.dylib             	0x00000001a34f0f9c _dispatch_mach_invoke$VARIANT$armv81 + 460 (mach.c:2765)
14  libdispatch.dylib             	0x00000001a34f8210 _dispatch_lane_serial_drain$VARIANT$armv81 + 260 (inline_internal.h:2598)
15  libdispatch.dylib             	0x00000001a34f8e60 _dispatch_lane_invoke$VARIANT$armv81 + 452 (queue.c:3862)
16  libdispatch.dylib             	0x00000001a350266c _dispatch_workloop_worker_thread + 692 (queue.c:6589)
17  libsystem_pthread.dylib       	0x00000001ebe255bc _pthread_wqthread + 272 (pthread.c:2437)
18  libsystem_pthread.dylib       	0x00000001ebe2886c start_wqthread + 8 (:-1)

And line code in NotificationService file

   
  var contentHandler: ((UNNotificationContent) -> Void)?
  var bestAttemptContent: UNMutableNotificationContent?
   
  override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) {
    self.contentHandler = contentHandler
    bestAttemptContent = (request.content.mutableCopy() as? UNMutableNotificationContent)
     
    func failEarly() {
      contentHandler(request.content)
    }

Number 2: NO_CRASH_STACK +0

Launch Time:         2022-09-21 09:43:28.4871 +0700
OS Version:          iPhone OS 11.4.1 (15G77)
Baseband Version:    2.03.12
Report Version:      104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Termination Description: DYLD, Library not loaded: /usr/lib/swift/libswiftCoreData.dylib | Referenced from: /var/containers/Bundle/Application/BB60EB28-5A2D-4808-A844-7CEDBDB74825/enetviet.app/enetviet | Reason: image not found
Triggered by Thread:  0

Thread 0 Crashed:
0   dyld                          	0x00000001044962f8 __abort_with_payload + 8
1   dyld                          	0x0000000104495ad0 abort_with_payload_wrapper_internal + 100 (terminate_with_reason.c:71)
2   dyld                          	0x0000000104495afc abort_with_payload + 12 (terminate_with_reason.c:93)
3   dyld                          	0x000000010446c314 dyld::halt(char const*) + 312 (dyld.cpp:3831)
4   dyld                          	0x000000010446f4cc dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, un... + 7152 (dyld.cpp:6212)
5   dyld                          	0x000000010446921c _dyld_start + 68

Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000006   x1: 0x0000000000000001   x2: 0x000000016d17e930   x3: 0x0000000000000098
    x4: 0x000000016d17e530   x5: 0x0000000000000000   x6: 0x0000000000000000   x7: 0x0000000000000650
    x8: 0x0000000000000020   x9: 0x0000000000000009  x10: 0x697674656e652f70  x11: 0x61655220200a7465
   x12: 0x20200a7465697674  x13: 0x203a6e6f73616552  x14: 0x6f6e206567616d69  x15: 0x00646e756f662074
   x16: 0x0000000000000209  x17: 0x0000000000000001  x18: 0x0000000000000000  x19: 0x0000000000000000
   x20: 0x000000016d17e530  x21: 0x0000000000000098  x22: 0x000000016d17e930  x23: 0x0000000000000001
   x24: 0x0000000000000006  x25: 0x0000000102c80000  x26: 0x00000001044a6000  x27: 0x00000001044a6458
   x28: 0x0000000102c80020   fp: 0x000000016d17e500   lr: 0x0000000104495ad0
    sp: 0x000000016d17e4c0   pc: 0x00000001044962f8 cpsr: 0x00000000

Number 2: NO_CRASH_STACK +0

I believe that this is the problem discussed on this thread.

Number 1:

This looks different. To offer advice on it I need to see a full Apple crash report, not just a snippet. Please post that, per the instructions in Posting a Crash Report.

Share and Enjoy

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

@eskimo This is a full Apple Crash Report, i attached it in the file below

That’s a crash report for your “Number 2” issue. For that issue, see this thread.

I was expecting to get a crash report for your “Number 1” issue.

Share and Enjoy

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

HI @eskimo, I'm sorry, this is my mistake.

I attached a crash log report for "Number 1" issue. Please check it.

Thanks.

Let’s start here:

Exception Type:  EXC_BREAKPOINT (SIGTRAP)

This indicates that your app hit a trap, that is, some code detected a problem and deliberately crashed the process. Here’s the crashed thread’s backtrace:

Thread 2 name:
Thread 2 Crashed:
0 EnetvietNotification … Swift runtime failure: Unexpectedly found nil 
                         while unwrapping an Optional value + 0 
                         (NotificationService.swift:0)
1 EnetvietNotification … specialized NotificationService.didReceive(
                         _:withContentHandler:) + 2800 (:47)
2 EnetvietNotification … didReceive + 16 (:0)
3 EnetvietNotification … @objc NotificationService.didReceive(
                         _:withContentHandler:) + 84
4 UserNotifications    … -[_UNNotificationServiceExtensionRemoteContext 
                         didReceiveNotificationRequest:withCompletionHandler:] + 456 
                         (_UNNotificationServiceExtensionRemoteContext.m:53)
5 Foundation           … __NSXPCCONNECTION_IS_CALLING_OUT_TO_EXPORTED_OBJECT_S2__ …

Frame 0 is a clear explanation of the problem. Some code tried to unwrap an optional value that was nil, and so trapped. Which brings us to frame 1. That looks like code you wrote. Does it contain any force unwraps? the :47 suggests that it might be on line 47 of whatever file contains that method.

Share and Enjoy

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

We have similar issue. This just started happening in an app that has been released and live for quite a while. Attached is the apple crash log. Any help is appreciated. Thank you.

That’s similar but it’s definitely not the same. TomVsJerry’s crash is caused by a Swift trap. In contrast, your crash is caused by an unhandled language exception:

Last Exception Backtrace:
0  CoreFoundation  … __exceptionPreprocess + 220 …
1  libobjc.A.dylib … objc_exception_throw + 60 …
2  CoreFoundation  … -[NSObject(NSObject) doesNotRecognizeSelector:] + 144 …
3  UIKitCore       … -[UIResponder doesNotRecognizeSelector:] + 296 …
4  CoreFoundation  … ___forwarding___ + 1764 …
5  CoreFoundation  … _CF_forwarding_prep_0 + 96
6  CoreFoundation  … __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 28 …
7  CoreFoundation  … ___CFXRegistrationPost_block_invoke + 52 …
8  CoreFoundation  … _CFXRegistrationPost + 456 …
9  CoreFoundation  … _CFXNotificationPost + 728 …
10 Foundation      … -[NSNotificationCenter postNotificationName:object:userInfo:] + 96 …
11 UIKitCore       … -[UIScene _invalidate] + 668 …

In frame 11 UIKit is posting a notification (probably UISceneDidDisconnectNotification). Frames 10 through 6 are from the notification infrastructure. Frames 5 through 0 are caused by the receiving object not understanding the method it’s being sent.

Someone, it might even have been you, opened a DTS tech support incident about this recently. We responding by point them at this post.

Share and Enjoy

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

@eskimo Thank you for your support.

I had resolved the issue for NotificationService, but the issue was about the swift trap(NO_CRASH_STACK). I followed the issue you suggested this thread, but it doesn't work for me. I tried the following ways:

  • set Enable Bitcode -> NO
  • set Strip swift symbol -> NO
  • add "-Wl" , "-weak-lswiftCoreData" , "-weak-lswiftCoreGraphics" to Other Linker Flags.

Do you have any other ideas about this? Thank you!

P/s: I'm using Xcode 14.0

Do you have any other ideas about this?

No, sorry, one of my colleagues is tracking that issue for DTS.

Share and Enjoy

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

  • @eskimo long time no see. Today, I released a new version on the store and I have this problem again.

    I'm using xCode v14.3. when i use xCode 13.4 I don't have this problem but after 4/25 I can't use xCode 13.4 anymore

    Thanks.

Add a Comment

@eskimo long time no see. Today, I released a new version on the store and I have this problem again. I'm using xCode v14.3. when i use xCode 13.4 I don't have this problem but after 4/25 I can't use xCode 13.4 anymore Thanks.