Database Crashes

[Problem/Question]
We are using v3.3.1 of Sendbird UIKit SDK and v4.2.0 of Sendbird Chat SDK and we are currently having some issues in production where the app, sometimes, crashes.
The crash stack trace it’s this one:

Crashed: com.apple.main-thread
0  libsqlite3.dylib               0xb63ac sqlite3_sourceid + 832
1  libsqlite3.dylib               0xa1f5c sqlite3_txn_state + 764
2  SendbirdChatSDK                0x37352c Database.__deallocating_deinit + 57 (Database.swift:57)
3  libswiftCore.dylib             0x3da134 _swift_release_dealloc + 56
4  SendbirdChatSDK                0x32dcf4 GroupChannelChangeLogsParamsDatabase.__deallocating_deinit + 5624 (<compiler-generated>:5624)
5  libswiftCore.dylib             0x3da134 _swift_release_dealloc + 56
6  SendbirdChatSDK                0x351418 ChannelDataSource.__deallocating_deinit + 11568 (<compiler-generated>:11568)
7  libswiftCore.dylib             0x3da134 _swift_release_dealloc + 56
8  libswiftCore.dylib             0x3db120 bool swift::HeapObjectSideTableEntry::decrementStrong<(swift::PerformDeinit)1>(unsigned int) + 292
9  SendbirdChatSDK                0x3089c0 OpenChannelManager.deinit + 8136 (<compiler-generated>:8136)
10 SendbirdChatSDK                0x3089e0 OpenChannelManager.__deallocating_deinit + 10 (OpenChannelManager.swift:10)
11 libswiftCore.dylib             0x3da134 _swift_release_dealloc + 56
12 libswiftCore.dylib             0x3db120 bool swift::HeapObjectSideTableEntry::decrementStrong<(swift::PerformDeinit)1>(unsigned int) + 292
13 SendbirdChatSDK                0x2b6dd4 SendbirdChatMain.deinit + 287 (SendbirdChatMain.swift:287)
14 SendbirdChatSDK                0x2b6e18 SendbirdChatMain.__deallocating_deinit + 286 (SendbirdChatMain.swift:286)
15 libswiftCore.dylib             0x3da134 _swift_release_dealloc + 56
16 libswiftCore.dylib             0x3db120 bool swift::HeapObjectSideTableEntry::decrementStrong<(swift::PerformDeinit)1>(unsigned int) + 292
17 SendbirdChatSDK                0x303998 specialized static SendbirdChat.initializeSynchronously(params:) + 1336 (<compiler-generated>:1336)
18 SendbirdUIKit                  0x1bae58 specialized static SendbirdUI.initialize(applicationId:startHandler:migrationHandler:completionHandler:) + 3748 (<compiler-generated>:3748)
19 SWORDHealth                    0x1ad864 closure #1 in ChatConnectionServiceImpl.loadAndConnectChat(completion:) + 4378007652
20 SWORDHealth                    0x1adbe0 partial apply for closure #1 in ChatConnectionServiceImpl.loadAndConnectChat(completion:) + 4378008544 (<compiler-generated>:4378008544)
21 SendbirdUIKit                  0x1b3c4c closure #1 in static SendbirdUI.disconnect(completionHandler:) + 15720
22 SendbirdChatSDK                0x1785f8 partial apply for closure #1 in LogoutState.didSocketClose(context:code:) + 57 (LogoutState.swift:57)
23 SendbirdChatSDK                0x2c6a90 partial apply for closure #1 in QueueService.performOnCompletionQueue(_:) + 35456 (<compiler-generated>:35456)
24 SendbirdChatSDK                0x148c20 thunk for @escaping @callee_guaranteed () -> () + 592 (<compiler-generated>:592)
25 libdispatch.dylib              0x24b4 _dispatch_call_block_and_release + 32
26 libdispatch.dylib              0x3fdc _dispatch_client_callout + 20
27 libdispatch.dylib              0x127f4 _dispatch_main_queue_drain + 928
28 libdispatch.dylib              0x12444 _dispatch_main_queue_callback_4CF + 44
29 CoreFoundation                 0x9a6f8 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
30 CoreFoundation                 0x7c058 __CFRunLoopRun + 2036
31 CoreFoundation                 0x80ed4 CFRunLoopRunSpecific + 612
32 GraphicsServices               0x1368 GSEventRunModal + 164
33 UIKitCore                      0x3a23d0 -[UIApplication _run] + 888
34 UIKitCore                      0x3a2034 UIApplicationMain + 340
35 libswiftUIKit.dylib            0x35308 UIApplicationMain(_:_:_:_:) + 104

We are not able to reproduce following a specific behaviour, it appears to be randomly.
Do you know what might be causing this?


[UIKit Version]
3.3.1

[Reproduction Steps]
N/A

[Frequency]
Randomly, between 2-10 times a day

[Current impact]
Our production application is having multiple crashes a day, and we still haven’t figure out a way to replicate this issue

1 Like

I’m experiencing this same crash using the following dependency versions:

  • SendBirdUIKit (3.3.1)
  • SendbirdChatSDK (4.2.0)

I’ve also opened a support ticket with Sendbird but haven’t heard back (case #00063302).

Update from my original post:

Sendbird support reached out shortly after I posted and suggested updating to Sendbird UIKit v3.3.4. After doing so and testing / monitoring for a couple days I can confirm I’m still seeing this crash in the following frameworks:

  • Sendbird UIKit v3.3.4
  • Sendbird Chat v4.3.0

we are also facing same issue in our prod app.
versions we are using

  • Sendbird UIKit v3.3.2
  • Sendbird Chat v4.2.3

According to an email thread that I’ve with sendbird this was fixed in Sendbird Chat v4.8.1
I haven’t try this as I’ve been off and will do this update in our next release

Hi @plopes , any luck on this? was it fixed on the updated version?
we got exactly the same problem.
:pray: