EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x0000000170cd246c

My app went to review and apple rejected my app with crash logs as attached below. When i check the same, the app was running fine on my system. Couldn't figure it out the actual reason for crash.

Your app crashed due to a memory access exception:

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x000000016dfb28cc

The crashing thread backtrace looks like this:

Thread 0 Crashed:
0   nanopb               … pb_enc_bool + 0
1   nanopb               … encode_field + 436
2   nanopb               … pb_encode + 172
3   FirebaseSessions     … FIRSESEncodeProto + 64
4   FirebaseSessions     … SessionStartEvent.transportBytes() + 232
5   FirebaseSessions     … @objc SessionStartEvent.transportBytes() + 28
6   GoogleDataTransport  … -[GDTCOREvent setDataObject:] + 68
7   GoogleDataTransport  … -[GDTCOREvent copy] + 72
8   GoogleDataTransport  … -[GDTCORTransport sendEvent:onComplete:] + 44
9   FirebaseSessions     … protocol witness for GoogleDataTransportProtocol.logGDTEvent(event:completion:) in c…
10  FirebaseSessions     … EventGDTLogger.logEvent(event:completion:) + 224
11  FirebaseSessions     … protocol witness for EventGDTLoggerProtocol.logEvent(event:completion:) in conforman…
12  FirebaseSessions     … closure #1 in SessionCoordinator.attemptLoggingSessionStart(event:callback:) + 176
13  FirebaseSessions     … closure #1 in SessionCoordinator.fillInFIID(event:callback:) + 180
14  FirebaseSessions     … partial apply for closure #1 in FIRInstallations.installationID(completion:) + 48
15  FirebaseSessions     … thunk for @escaping @callee_guaranteed (@guaranteed String?, @guaranteed Error?) -> …
16  FirebaseInstallations… __49-[FIRInstallations installationIDWithCompletion:]_block_invoke + 56
17  FBLPromises          … __56-[FBLPromise chainOnQueue:chainedFulfill:chainedReject:]_block_invoke.18 + 52
18  libdispatch.dylib    … _dispatch_call_block_and_release + 32
19  libdispatch.dylib    … _dispatch_client_callout + 20
20  libdispatch.dylib    … _dispatch_main_queue_drain + 1060
21  libdispatch.dylib    … _dispatch_main_queue_callback_4CF + 44
22  CoreFoundation       … __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
23  CoreFoundation       … __CFRunLoopRun + 1996
24  CoreFoundation       … CFRunLoopRunSpecific + 608
25  GraphicsServices     … GSEventRunModal + 164
26  UIKitCore            … -[UIApplication _run] + 888
27  UIKitCore            … UIApplicationMain + 340
28  UIKitCore            … 0x1a89a2000 + 4601652
29  AED-Driver           … 0x102c5c000 + 288492
30  dyld                 … start + 2240

Frame 18 shows that Dispatch is handling a block that’s be enqueued on the main queue. Frames 17 through 0 are all code from your third-party runtime. I can’t help you with that.

Share and Enjoy

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

The crash will be fixed by updating Firebase or Crashlytics.

You can find full solution from here: https://stackoverflow.com/a/78122992/3275012

EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x0000000170cd246c
 
 
Q