Skip to content

Crash After App Delete: Fatal Exception: NSRangeException #5161

Open
@min

Description

@min

[REQUIRED] Step 1: Describe your environment

  • Xcode version: 11.3.1
  • Firebase SDK version: 6.14.0
  • Firebase Component: Core, Database
  • Component version: 6.14.0
  • Installation method: Carthage

[REQUIRED] Step 2: Describe the problem

Steps to reproduce:

We're observing a crash that's slowly increasing when executing this code block:

database.purgeOutstandingWrites()
app.delete()

Stack Trace

Fatal Exception: NSRangeException
*** -[__NSArrayM objectAtIndexedSubscript:]: index 9223372036854775807 beyond bounds for empty array

Fatal Exception: NSRangeException
0   CoreFoundation                      0x00007fff23c7127e __exceptionPreprocess + 350
1   libobjc.A.dylib                     0x00007fff513fbb20 objc_exception_throw + 48
2   CoreFoundation                      0x00007fff23d03ab1 _CFThrowFormattedException + 194
3   CoreFoundation                      0x00007fff23b8572e -[__NSArrayM objectAtIndexedSubscript:] + 142
4   Foo                                 0x0000000103c22a0c -[FWriteTree removeWriteId:] + 171
5   Foo                                 0x0000000103c0b2bd -[FSyncTree ackUserWriteWithWriteId:revert:persist:clock:] + 166
6   Foo                                 0x0000000103bf9a1d -[FRepo ackWrite:rerunTransactionsAtPath:status:] + 212
7   Foo                                 0x0000000103bf876b __39-[FRepo update:withNodes:withCallback:]_block_invoke + 114
8   Foo                                 0x0000000103bf1361 -[FPersistentConnection ackPuts] + 343
9   Foo                                 0x0000000103bf0de5 -[FPersistentConnection purgeOutstandingWrites] + 54
10  Foo                                 0x0000000103bf9144 -[FRepo purgeOutstandingWrites] + 287
11  Foo                                 0x0000000103bd37be __37-[FIRDatabase purgeOutstandingWrites]_block_invoke + 52
12  libdispatch.dylib                   0x000000010d90fdd4 _dispatch_call_block_and_release + 12
13  libdispatch.dylib                   0x000000010d910d48 _dispatch_client_callout + 8
14  libdispatch.dylib                   0x000000010d9175ef _dispatch_lane_serial_drain + 788
15  libdispatch.dylib                   0x000000010d91817f _dispatch_lane_invoke + 422
16  libdispatch.dylib                   0x000000010d923a4e _dispatch_workloop_worker_thread + 719
17  libsystem_pthread.dylib             0x00007fff524636fc _pthread_wqthread + 290
18  libsystem_pthread.dylib             0x00007fff52462827 start_wqthread + 15

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions