opentok / opentok-android-sdk-samples

Sample applications illustrating best practices using OpenTok Android SDK.
https://tokbox.com/developer/sdks/android/
MIT License
210 stars 169 forks source link

Crashing on video call.Facing the same issue. #456

Closed MSajidJuneja closed 1 year ago

MSajidJuneja commented 1 year ago

Not much more info, but this just crashed for me as well.

Describe the bug Fatal signal 6 CRASH

To Reproduce Call was connected for several minutes then the crash happened without any user interaction

Expected behavior don't crash

Device (please compete the following information): Google Pixel 7 with Android 13 opentok-android-sdk:2.24.1

Screenshot 2023-04-04 at 12 23 17 PM

v-kpheng commented 1 year ago

Thanks, @MSajidJuneja, for letting us know about this issue.

Can you still reproduce on 2.25.0, which was just released? Also, does this impact other devices, or just the Pixel 7. Also, to confirm, it just crashed without any user interaction?

MSajidJuneja commented 1 year ago

@v-kpheng I have tried updating version to 2.25.0 and it still crashes. It crashed on Vivo, realme and pixel phones. It just crashed without any user interaction while video call was in progress. Attaching error received when crashes.

Screenshot 2023-04-04 at 12 23 17 PM Screenshot 2023-04-06 at 11 44 51 AM

MSajidJuneja commented 1 year ago

@v-kpheng Any update?

jonathan-k4 commented 1 year ago

I am also seeing the same thing after upgrading from 2.19 this morning to fix a different issue. Can create on 2.24.0, 2.24.1, 2.24.2, and 2.25.0

stack corruption detected (-fstack-protector)
A  Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 29358 (Thread-15), pid 29112

I suspect the issue was introduced with WebRTC 99, as downgrading to 2.23.x resolved the crash (WebRTC 84)

MSajidJuneja commented 1 year ago

@jonathan-k4 are you sure that it doesn't crash on 2.23.x? i also had tested on 2.24.x and 2.25.0 and it crashed while in call.

jonathan-k4 commented 1 year ago

@MSajidJuneja we are continuing to test, but we could reproduce the crash immediately on session.subscribe(mSubscriber) on 2.24.x and 2.25.0, and that went away when we downgraded to 2.23.1. Havent seen a crash since so far.

MSajidJuneja commented 1 year ago

Hello @v-kpheng Any solution to this issue?

v-kpheng commented 1 year ago

We're not seeing any crashes. As part of our QA, we run long running sessions and we don't see any crashes.

@MSajidJuneja , @jonathan-k4 , which sample app did you use to reproduce the issue?

jonathan-k4 commented 1 year ago

It was our app, but near identical to Basic Video Chat example.

MSajidJuneja commented 1 year ago

@v-kpheng It was our app but same as basic video chat sample. I was checking old version 2.20.1 and found this crash also. last image

MSajidJuneja commented 1 year ago

@v-kpheng Have you found any solution?

MSajidJuneja commented 1 year ago

@v-kpheng Fixed this in 2.23.1 with the following changes. Still not working on latest versions. Added READ_PHONE_STATE permission in Manifest and asked user for permission in app. Added proguard rule for -keep class androidx.lifecycle.DefaultLifecycleObserver and -keep class com.cloudwebrtc.webrtc.* { ; }. Replace proguard-android-optimize.txt in build.gradle with proguard-android.txt.

v-kpheng commented 1 year ago

Thanks for sharing your workaround, @MSajidJuneja .

We haven't been able to reproduce, so we don't have a solution to offer. Sorry.