Crash: CFDictionaryGetValue

Getting more counts on below crash.. Not able to find the exact code which causing this issue. Please share if any idea on this

Exception Type: EXCBADACCESS (SIGSEGV)
Exception Subtype: KERNINVALIDADDRESS at 0x0000603700000000
VM Region Info: 0x603700000000 is not in any region. Bytes after previous region: 105308303130625
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
commpage (reserved) 1000000000-7000000000 [384.0G] ---/--- SM=NUL ...(unallocated)
  • -->

UNUSED SPACE AT END

Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [475]
Triggered by Thread: 0


Thread 0 name:
Thread 0 Crashed:
0 CoreFoundation 0x00000001b265c844 CFDictionaryGetValue + 80 (CFInternal.h:897)
1 Foundation 0x00000001b3986314 NSSetLongLongValueAndNotify + 88 (NSKeyValueObserverNotifying.m:64)
2 Foundation 0x00000001b3986314
NSSetLongLongValueAndNotify + 88 (NSKeyValueObserverNotifying.m:64)
3 CFNetwork 0x00000001b2ea9074 _51-[NSURLSession delegatetask:didCompleteWithError:]blockinvoke.194 + 60 (Session.mm:778)
4 libdispatch.dylib 0x00000001b2349298 dispatchcallblockandrelease + 24 (init.c:1454)
5 libdispatch.dylib 0x00000001b234a280
dispatchclientcallout + 16 (object.m:559)
6 libdispatch.dylib 0x00000001b232c5b8 dispatchmainqueuecallback4CF$VARIANT$armv81 + 856 (inlineinternal.h:2548)
7 CoreFoundation 0x00000001b2690c30 CFRUNLOOPISSERVICINGTHEMAINDISPATCHQUEUE + 12 (CFRunLoop.c:1790)
8 CoreFoundation 0x00000001b268b0e8 _CFRunLoopRun + 2480 (CFRunLoop.c:3118)
9 CoreFoundation 0x00000001b268a200 CFRunLoopRunSpecific + 572 (CFRunLoop.c:3242)
10 GraphicsServices 0x00000001c8785598 GSEventRunModal + 160 (GSEvent.c:2259)
11 UIKitCore 0x00000001b4f50004 -[UIApplication
run] + 1052 (UIApplication.m:3270)
12 UIKitCore 0x00000001b4f555d8 UIApplicationMain + 164 (UIApplication.m:4739)
13 REVEL 0x0000000102d7b8f0 main + 68 (AppDelegate.swift:29)
14 libdyld.dylib 0x00000001b2369598 start + 4

Thread 1 name:
Thread 1:
0 libsystemkernel.dylib 0x00000001dcfef8c4 machmsgtrap + 8
1 libsystem
kernel.dylib 0x00000001dcfeecc8 machmsg + 72 (machmsg.c:103)
2 CoreFoundation 0x00000001b269074c _CFRunLoopServiceMachPort + 376 (CFRunLoop.c:2641)
3 CoreFoundation 0x00000001b268abd0
CFRunLoopRun + 1176 (CFRunLoop.c:2974)
4 CoreFoundation 0x00000001b268a200 CFRunLoopRunSpecific + 572 (CFRunLoop.c:3242)
5 Foundation 0x00000001b3894278 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 228 (NSRunLoop.m:374)
6 Foundation 0x00000001b3894158 -[NSRunLoop(NSRunLoop) runUntilDate:] + 88 (NSRunLoop.m:421)
7 UIKitCore 0x00000001b4ffb9fc -[UIEventFetcher threadMain] + 504 (UIEventFetcher.m:834)
8 Foundation 0x00000001b39f0c48 NSThreadstart
+ 848 (NSThread.m:724)
9 libsystem
pthread.dylib 0x00000001f7f62b70 pthreadstart + 288 (pthread.c:880)
10 libsystempthread.dylib 0x00000001f7f67880 threadstart + 8

Thread 2 name:
Thread 2:
0 libsystemkernel.dylib 0x00000001dd0156fc write + 8
1 FirebaseCrashlytics 0x0000000104c6f18c FIRCLSSDKFileLog + 320 (FIRCLSInternalLogging.c:0)
2 FirebaseCrashlytics 0x0000000104c70d24 0x104c58000 + 101668
3 libsystem
pthread.dylib 0x00000001f7f62b70 pthreadstart + 288 (pthread.c:880)
4 libsystempthread.dylib 0x00000001f7f67880 threadstart + 8


Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x0000603700000000 x1: 0x00000001fa0bee35 x2: 0x00000001fa0bee35 x3: 0x00000001c100aef4
x4: 0x00000001b6003e74 x5: 0x0000000000000006 x6: 0x0000000000000000 x7: 0x0000000283c34270
x8: 0xe27660a7a97600ea x9: 0x000000004d555458 x10: 0x000000011282a600 x11: 0x00ff00011282a600
x12: 0x00000000000000e9 x13: 0x000000011282b480 x14: 0x00000000eda41000 x15: 0x000000028352b450
x16: 0x00000001f7f61100 x17: 0x00000001b39862bc x18: 0x0000000000000000 x19: 0x0000000112594390
x20: 0x0000000000000003 x21: 0x00000001fa0bee35 x22: 0x0000000000000000 x23: 0x00000002080d8b58
x24: 0x00000002080d8b78 x25: 0x0000000281c12e00 x26: 0x0000000103f2f960 x27: 0x00000000000020ff
x28: 0x0000000000000114 fp: 0x000000016d08e980 lr: 0x00000001b3986314
sp: 0x000000016d08e950 pc: 0x00000001b265c844 cpsr: 0x20000000
esr: 0x92000004 (Data Abort) byte read Translation fault
Accepted Answer
It’s hard to be sure because your code listing is so badly munged (1) but this looks very similar to the problem discussed on this thread. Note that frames 3 and 2 in your crash report match frames 6 and 5 in the snippet in my latest post on that thread.

Share and Enjoy

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

(1) In future you can make your posts more readable by using a code block (the <> button) for code snippets and the text attachment feature (the paperclip icon) for full crash reports.
Accepted Answer
If you have Firebase/Performance in your pods, that's the problem.
Removing it you will fix the issue.
Thanks @Eskimo.. You saved the day. Was debugging who is observing the state. Got to know GoogleTagmanager and Firebase Performance SDK is reason of crash behind the frame 3 and 2.. I removed Performance SDK, The Crash is not replicable now. Also, I reverted GoogleTagManager (7.2.0) to GoogleTagManager (7.1.4) This case also the crash is not happened.

Moved to production with these changes which resolved this crash.

Thanks for ur reply @esikmo & iijjj 
Crash: CFDictionaryGetValue
 
 
Q