Firebase-ios-sdk: Crash: CoreFoundation _NSArrayRaiseInsertNilException

Created on 8 Jun 2020  路  6Comments  路  Source: firebase/firebase-ios-sdk

[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
closed-by-bot needs-info no-recent-activity question

Most helpful comment

Have same problem too.

All 6 comments

Have same problem too.

This crashing stack trace doesn't contain any Firebase symbols except for Crashlytics' crash recording thread, which is most likely not responsible for the exception. Are you able to create a sample that reproduces this crash? If so, can you share it with us?


Hey @jiehu5114. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

My users are heavily affected by this same issue.

Crash Title:
CoreFoundation
_NSArrayRaiseInsertNilException

Xcode version: 11.5
iOS Version: 13.4.1
Firebase Analytics Version: 6.26.0
Firebase Crashlytics Version: 4.1.1
Installation method: CocoaPods

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

Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x1b68d65f0 __exceptionPreprocess
1 libobjc.A.dylib 0x1b65f8bcc objc_exception_throw
2 CoreFoundation 0x1b692c0cc -[__NSCFString characterAtIndex:].cold.1
3 CoreFoundation 0x1b6936e3c _NSArrayRaiseInsertNilException
4 CoreFoundation 0x1b67b09f0 -[__NSArrayI dealloc]
5 CoreFoundation 0x1b67f016c CFArrayApplyFunction
6 CoreFoundation 0x1b6853efc __CFRunLoopDeallocateTimers
7 CoreFoundation 0x1b685c7d4 __CFSetApplyFunction_block_invoke
8 CoreFoundation 0x1b68f6eec CFBasicHashApply
9 CoreFoundation 0x1b685c7b0 CFSetApplyFunction
10 CoreFoundation 0x1b684d6d0 __CFRunLoopDeallocate
11 CoreFoundation 0x1b68561dc _CFRelease
12 CoreFoundation 0x1b683b954 __CFTSDFinalize
13 libsystem_pthread.dylib 0x1b65eff8c _pthread_tsd_cleanup
14 libsystem_pthread.dylib 0x1b65ecdf4 _pthread_exit
15 libsystem_pthread.dylib 0x1b65ede64 _pthread_wqthread_legacy_worker_wrap
16 libsystem_pthread.dylib 0x1b65edc04 _pthread_wqthread
17 libsystem_pthread.dylib 0x1b65f0740

Crashed: com.google.firebase.crashlytics.ios.exception
EXC_BREAKPOINT 0x00000001b65376e0

Crashed: com.google.firebase.crashlytics.ios.exception
0 Street Smarts 0x1014591a0 FIRCLSProcessRecordAllThreads + 392 (FIRCLSProcess.c:392)
1 Street Smarts 0x101459584 FIRCLSProcessRecordAllThreads + 423 (FIRCLSProcess.c:423)
2 Street Smarts 0x10144fed8 FIRCLSHandler + 34 (FIRCLSHandler.m:34)
3 Street Smarts 0x10144bbe4 __FIRCLSExceptionRecord_block_invoke + 218 (FIRCLSException.mm:218)
4 libdispatch.dylib 0x1b659c524 _dispatch_client_callout + 16
5 libdispatch.dylib 0x1b654f0b0 _dispatch_lane_barrier_sync_invoke_and_complete + 56
6 Street Smarts 0x10144b37c FIRCLSExceptionRecord + 225 (FIRCLSException.mm:225)
7 Street Smarts 0x10144b674 FIRCLSExceptionRecordNSException + 111 (FIRCLSException.mm:111)
8 Street Smarts 0x10144af5c FIRCLSTerminateHandler() + 279 (FIRCLSException.mm:279)
9 libc++abi.dylib 0x1b669f14c std::__terminate(void ()()) + 16
10 libc++abi.dylib 0x1b66a1bd8 __cxa_get_exception_ptr + 30
11 libc++abi.dylib 0x1b66a1b98 __cxxabiv1::exception_cleanup_func(_Unwind_Reason_Code, _Unwind_Exception
) + 122
12 libobjc.A.dylib 0x1b65f8cf8 _objc_exception_destructor(void*) + 354
13 CoreFoundation 0x1b692c0cc -[__NSCFString characterAtIndex:].cold.1 + 110
14 CoreFoundation 0x1b6936e3c _NSArrayRaiseInsertNilException + 94
15 CoreFoundation 0x1b67b09f0 -[__NSArrayI dealloc] + 194
16 CoreFoundation 0x1b67f016c CFArrayApplyFunction + 72
17 CoreFoundation 0x1b6853efc __CFRunLoopDeallocateTimers + 64
18 CoreFoundation 0x1b685c7d4 __CFSetApplyFunction_block_invoke + 24
19 CoreFoundation 0x1b68f6eec CFBasicHashApply + 132
20 CoreFoundation 0x1b685c7b0 CFSetApplyFunction + 172
21 CoreFoundation 0x1b684d6d0 __CFRunLoopDeallocate + 212
22 CoreFoundation 0x1b68561dc _CFRelease + 224
23 CoreFoundation 0x1b683b954 __CFTSDFinalize + 124
24 libsystem_pthread.dylib 0x1b65eff8c _pthread_tsd_cleanup + 580
25 libsystem_pthread.dylib 0x1b65ecdf4 _pthread_exit + 80
26 libsystem_pthread.dylib 0x1b65ede64 _pthread_wqthread_legacy_worker_wrap + 94
27 libsystem_pthread.dylib 0x1b65edc04 _pthread_wqthread + 416
28 libsystem_pthread.dylib 0x1b65f0740 start_wqthread + 8


Hey @jiehu5114. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!


Since there haven't been any recent updates here, I am going to close this issue.

@jiehu5114 if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

Was this page helpful?
0 / 5 - 0 ratings