Open
Description
Describe your environment
- Objective C or Swift: Swift
- iOS version: 10.2.0
- Firebase SDK version: 5.6.0
- FirebaseUI version: 5.2.0
- CocoaPods Version: 1.5.0
Describe the problem:
We got a crash report this morning that says
Fatal Exception: NSRangeException
*** -[__NSArrayM insertObject:atIndex:]: index 9223372036854775808 beyond bounds for empty array
-[FUIArray insertSnapshot:withPreviousChildKey:]
I was not able to reproduce this unfortunatly and it looked like a FirebaseUI to me and not something coming from our side. I might be wrong but I think those logs could help.
Steps to reproduce:
I could no reproduce this crash so far. I have a UIViewController with a tableview binded to a FUITableViewDataSource
Observed Results:
Here's what I've got from Crashlytics:
Fatal Exception: NSRangeException
*** -[__NSArrayM insertObject:atIndex:]: index 9223372036854775808 beyond bounds for empty array
-[FUIArray insertSnapshot:withPreviousChildKey:]
Fatal Exception: NSRangeException
0 CoreFoundation 0x1923611b8 __exceptionPreprocess
1 libobjc.A.dylib 0x190d9855c objc_exception_throw
2 CoreFoundation 0x19223fd44 CFStringConvertNSStringEncodingToEncoding
3 Bamboo 0x1004fa318 -[FUIArray insertSnapshot:withPreviousChildKey:] (FUIArray.m:193)
4 Bamboo 0x1004f9904 __24-[FUIArray observeQuery]_block_invoke (FUIArray.m:84)
5 Bamboo 0x100326ee4 __43-[FChildEventRegistration fireEvent:queue:]_block_invoke.55 (FChildEventRegistration.m:74)
6 libdispatch.dylib 0x1911ea1fc _dispatch_call_block_and_release
7 libdispatch.dylib 0x1911ea1bc _dispatch_client_callout
8 libdispatch.dylib 0x1911eed68 _dispatch_main_queue_callback_4CF
9 CoreFoundation 0x19230e810 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
10 CoreFoundation 0x19230c3fc __CFRunLoopRun
11 CoreFoundation 0x19223a2b8 CFRunLoopRunSpecific
12 GraphicsServices 0x193cee198 GSEventRunModal
13 UIKit 0x1982817fc -[UIApplication _run]
14 UIKit 0x19827c534 UIApplicationMain
15 Bamboo 0x100090008 main (QueueTask.swift:26)
16 ??? 0x19121d5b8 (Missing)
Crashed: com.twitter.crashlytics.ios.exception
0x0000000000000000
Crashed: com.twitter.crashlytics.ios.exception
0 Bamboo 0x10028f350 CLSProcessRecordAllThreads (CLSProcess.c:376)
1 Bamboo 0x10028f810 CLSProcessRecordAllThreads (CLSProcess.c:407)
2 Bamboo 0x10027f060 CLSHandler (CLSHandler.m:26)
3 Bamboo 0x10028d960 __CLSExceptionRecord_block_invoke (CLSException.mm:199)
4 libdispatch.dylib 0x1911ea1bc _dispatch_client_callout + 16
5 libdispatch.dylib 0x1911f77f0 _dispatch_barrier_sync_f_invoke + 84
6 Bamboo 0x10028d3d0 CLSExceptionRecord (CLSException.mm:206)
7 Bamboo 0x10028d200 CLSExceptionRecordNSException (CLSException.mm:102)
8 Bamboo 0x10028cdf8 CLSTerminateHandler() (CLSException.mm:259)
9 libc++abi.dylib 0x190d8766c std::__terminate(void (*)()) + 16
10 libc++abi.dylib 0x190d86f84 __cxxabiv1::exception_cleanup_func(_Unwind_Reason_Code, _Unwind_Exception*) + 134
11 libobjc.A.dylib 0x190d98690 _objc_exception_destructor(void*) + 362
12 CoreFoundation 0x19223fd44 CFStringConvertNSStringEncodingToEncoding + 1134
13 Bamboo 0x1004fa318 -[FUIArray insertSnapshot:withPreviousChildKey:] (FUIArray.m:193)
14 Bamboo 0x1004f9904 __24-[FUIArray observeQuery]_block_invoke (FUIArray.m:84)
15 Bamboo 0x100326ee4 __43-[FChildEventRegistration fireEvent:queue:]_block_invoke.55 (FChildEventRegistration.m:74)
16 libdispatch.dylib 0x1911ea1fc _dispatch_call_block_and_release + 24
17 libdispatch.dylib 0x1911ea1bc _dispatch_client_callout + 16
18 libdispatch.dylib 0x1911eed68 _dispatch_main_queue_callback_4CF + 1000
19 CoreFoundation 0x19230e810 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
20 CoreFoundation 0x19230c3fc __CFRunLoopRun + 1660
21 CoreFoundation 0x19223a2b8 CFRunLoopRunSpecific + 444
22 GraphicsServices 0x193cee198 GSEventRunModal + 180
23 UIKit 0x1982817fc -[UIApplication _run] + 684
24 UIKit 0x19827c534 UIApplicationMain + 208
25 Bamboo 0x100090008 main (QueueTask.swift:26)
26 ??? 0x19121d5b8 (Missing)
Expected Results:
I was expecting the table view to be updated and not to crash