Fleece crash during document retrieval

Couchbase Lite crashes sporadically in production. Crashes occur when retrieving multiple docs inside a loop, the docs are all the same type.

Is this a multithreading issue on my side? Do I have to ensure that cblite is always accessed from the same thread, or is that an old restriction?

Excerpt from crash log:

9   libc++abi.dylib                      0x0000000199762f58 std::__terminate(void (*)()) + 16
10  libc++abi.dylib                      0x0000000199762ef4 std::terminate() + 60
11  CouchbaseLiteSwift                   0x00000001019caa94 fleece::MDict<objc_object* __strong>::get+ 1501844 (fleece::slice) const + 80
12  CouchbaseLiteSwift                   0x00000001019ca9e8 _get+ 1501672 (fleece::MDict<objc_object* __strong>&, NSString*) + 56
13  CouchbaseLiteSwift                   0x00000001019cab24 _getObject+ 1501988 (fleece::MDict<objc_object* __strong>&, NSString*, objc_class*) + 48
14  CouchbaseLiteSwift                   0x00000001019c88b0 -[CBLDictionary valueForKey:] + 72
15  CouchbaseLiteSwift                   0x00000001018724d8 DictionaryObject.toDictionary+ 91352 () + 296
16  CouchbaseLiteSwift                   0x0000000101872584 DictionaryObject.toDictionary+ 91524 () + 468
17  CouchbaseLiteSwift                   0x000000010187a354 ArrayObject.toArray+ 123732 () + 388
18  CouchbaseLiteSwift                   0x0000000101872690 DictionaryObject.toDictionary+ 91792 () + 736
19  CouchbaseLiteSwift                   0x000000010187a354 ArrayObject.toArray+ 123732 () + 388
20  CouchbaseLiteSwift                   0x0000000101872690 DictionaryObject.toDictionary+ 91792 () + 736
21  CouchbaseLiteSwift                   0x000000010187a354 ArrayObject.toArray+ 123732 () + 388
22  CouchbaseLiteSwift                   0x0000000101884ca4 Document.toDictionary+ 167076 () + 740
23  MyApp                                0x0000000100b04c00 MyApp.myFunctionThatRetrievesASetOfDocs() -> [MyApp.Doc]
  • Device: iPhone 11 Pro Max, iPhone 7
  • iOS: 15.2.1, 15.1
  • CouchbaseLiteSwift 2.8.4