Crash: CoreFoundation _NSArrayRaiseInsertNilException

[REQUIRED] Step 1: Describe your environment

  • Xcode version: 11.5
  • Firebase SDK version: 6.24.0
  • Firebase Component: Crashlytics (Auth, Core, Database, Firestore, Messaging, Storage, etc)
  • Component version: 4.1.0
  • Installation method: CocoaPods

[REQUIRED] Step 2: Describe the problem

Fatal Exception: NSInvalidArgumentException
-[__NSCFArray objectAtIndex:]: index (1) beyond bounds (1) _NSArrayRaiseInsertNilException

Stack Trace 1

Fatal Exception: NSInvalidArgumentException
0  CoreFoundation                 0x196c88164 __exceptionPreprocess
1  libobjc.A.dylib                0x19699cc1c objc_exception_throw
2  CoreFoundation                 0x196ce13a8 -[__NSCFString characterAtIndex:].cold.1
3  CoreFoundation                 0x196cece2c _NSArrayRaiseInsertNilException
4  CoreFoundation                 0x196b5ad5c -[__NSArrayI dealloc]
5  CoreFoundation                 0x196b9c804 CFArrayApplyFunction
6  CoreFoundation                 0x196c02b84 __CFRunLoopDeallocateTimers
7  CoreFoundation                 0x196c0b794 __CFSetApplyFunction_block_invoke
8  CoreFoundation                 0x196caa320 CFBasicHashApply
9  CoreFoundation                 0x196c0b730 CFSetApplyFunction
10 CoreFoundation                 0x196bfc020 __CFRunLoopDeallocate
11 CoreFoundation                 0x196c04fe0 _CFRelease
12 CoreFoundation                 0x196be9b94 __CFTSDFinalize
13 libsystem_pthread.dylib        0x1969950e4 _pthread_tsd_cleanup
14 libsystem_pthread.dylib        0x19698d95c _pthread_exit
15 libsystem_pthread.dylib        0x19698fa60 _pthread_wqthread_legacy_worker_wrap
16 libsystem_pthread.dylib        0x19698f7a4 _pthread_wqthread
17 libsystem_pthread.dylib        0x1969959c8 start_wqthread

Stack Trace 2

Crashed: com.google.firebase.crashlytics.ios.exception
0  ****                           0x10184ad28 FIRCLSProcessRecordAllThreads + 392 (FIRCLSProcess.c:392)
1  ****                           0x10184b10c FIRCLSProcessRecordAllThreads + 423 (FIRCLSProcess.c:423)
2  ****                           0x101841a60 FIRCLSHandler + 34 (FIRCLSHandler.m:34)
3  ****                           0x10183d724 __FIRCLSExceptionRecord_block_invoke + 218 (FIRCLSException.mm:218)
4  libdispatch.dylib              0x19692833c _dispatch_client_callout + 20
5  libdispatch.dylib              0x1969351f4 _dispatch_lane_barrier_sync_invoke_and_complete + 60
6  ****                          0x10183cebc FIRCLSExceptionRecord + 225 (FIRCLSException.mm:225)
7  ****                           0x10183d1b4 FIRCLSExceptionRecordNSException + 111 (FIRCLSException.mm:111)
8  ****                           0x10183ca9c FIRCLSTerminateHandler() + 279 (FIRCLSException.mm:279)
9  libc++abi.dylib                0x196a413cc std::__terminate(void (*)()) + 20
10 libc++abi.dylib                0x196a43ec0 __cxa_get_exception_ptr + 34
11 libc++abi.dylib                0x196a43e78 __cxxabiv1::exception_cleanup_func(_Unwind_Reason_Code, _Unwind_Exception*) + 130
12 libobjc.A.dylib                0x19699cd54 _objc_exception_destructor(void*) + 370
13 CoreFoundation                 0x196ce13a8 -[__NSCFString characterAtIndex:].cold.1 + 114
14 CoreFoundation                 0x196cece2c _NSArrayRaiseInsertNilException + 98
15 CoreFoundation                 0x196b5ad5c -[__NSArrayI dealloc] + 202
16 CoreFoundation                 0x196b9c804 CFArrayApplyFunction + 76
17 CoreFoundation                 0x196c02b84 __CFRunLoopDeallocateTimers + 76
18 CoreFoundation                 0x196c0b794 __CFSetApplyFunction_block_invoke + 28
19 CoreFoundation                 0x196caa320 CFBasicHashApply + 140
20 CoreFoundation                 0x196c0b730 CFSetApplyFunction + 204
21 CoreFoundation                 0x196bfc020 __CFRunLoopDeallocate + 240
22 CoreFoundation                 0x196c04fe0 _CFRelease + 252
23 CoreFoundation                 0x196be9b94 __CFTSDFinalize + 128
24 libsystem_pthread.dylib        0x1969950e4 _pthread_tsd_cleanup + 584
25 libsystem_pthread.dylib        0x19698d95c _pthread_exit + 84
26 libsystem_pthread.dylib        0x19698fa60 _pthread_wqthread_legacy_worker_wrap + 98
27 libsystem_pthread.dylib        0x19698f7a4 _pthread_wqthread + 420
28 libsystem_pthread.dylib        0x1969959c8 start_wqthread + 8

1 possible answer(s) on “Crash: CoreFoundation _NSArrayRaiseInsertNilException