Couchbase Lite (iOS): invalid address access while closing a web socket connection in lite core

Hey all! I’ve been seeing a lot of crashes in production with this exact stack trace. Wondering if anyone has seen anything similar or if this is a known issue I haven’t found yet.

Crashed: WebSocket to 
0  CouchbaseLiteSwift             0x26ceec sockpp::mbedtls_context::allow_only_certificate(mbedtls_x509_crt*) + 52260
1  CouchbaseLiteSwift             0x115850 litecore::Logging::loggingClassName() const + 156
2  CouchbaseLiteSwift             0x118900 litecore::Logging::getObjectRef(litecore::LogLevel) const + 64
3  CouchbaseLiteSwift             0x118a30 litecore::Logging::_logv(litecore::LogLevel, char const*, char*) const + 76
4  CouchbaseLiteSwift             0x10d658 litecore::websocket::BuiltInWebSocket::closeWithException(std::exception const&, char const*) + 188
5  CouchbaseLiteSwift             0x128548 litecore::websocket::WebSocketImpl::onClose(litecore::websocket::CloseStatus) + 252
6  CouchbaseLiteSwift             0x13d974 c4socket_closed + 204
7  CouchbaseLiteSwift             0xbce08 cbl::asDouble(fleece::MValue<objc_object* __strong> const&, fleece::MCollection<objc_object* __strong> const&) + 30884
8  CouchbaseLiteSwift             0xbe940 cbl::asDouble(fleece::MValue<objc_object* __strong> const&, fleece::MCollection<objc_object* __strong> const&) + 37852
9  CouchbaseLiteSwift             0xbe8ac cbl::asDouble(fleece::MValue<objc_object* __strong> const&, fleece::MCollection<objc_object* __strong> const&) + 37704
10 libdispatch.dylib              0x24b4 _dispatch_call_block_and_release + 32
11 libdispatch.dylib              0x3fdc _dispatch_client_callout + 20
12 libdispatch.dylib              0xb694 _dispatch_lane_serial_drain + 672
13 libdispatch.dylib              0xc1e0 _dispatch_lane_invoke + 384
14 libdispatch.dylib              0x16e10 _dispatch_workloop_worker_thread + 652
15 libsystem_pthread.dylib        0xdf8 _pthread_wqthread + 288
16 libsystem_pthread.dylib        0xb98 start_wqthread + 8

Thanks for reading in advance!

This is probably worth filing an issue on the iOS repo, but with some more details. Half of this is not properly symbolicated as evidenced by the high offsets, which makes the stack trace questionable in the correctness of its method names. I do think that the loggingClassName one MIGHT be correct but not sure.