twilio / video-quickstart-android

Twilio Video Quickstart for Android
MIT License
213 stars 160 forks source link

crashing, libtwilio_video_android_so.so #630

Closed jam0cam closed 1 year ago

jam0cam commented 3 years ago

Hi, Not sure what is the proper channel to report this, but we've been seeing these random crashes for a while. There's not much of a stacktrace to go on, and I haven't personally been able to see this crash, but it's happening to our users.

Thread 0 Crashed:
0   libc.so                         0x6fe3f91f24        abort
1   libc.so                         0x6fe3ffaae4        pthread_once
2   libc.so                         0x6fe3ff9f80        <unknown> + 480566550400
3   libc.so                         0x6fe3ff9e34        pthread_mutex_lock
4   libtwilio_video_android_so.so   0x63d5b3eb94        <unknown> + 428787100564

Moreover we've only started seeing this after upgrading from com.twilio:video-android:5.2.0 to com.twilio:video-android:6.2.1

Thanks, Jia

Alton09 commented 3 years ago

Thank you for reaching out regarding this issue @jam0cam! I went ahead and moved this issue to the video quickstart as it is where we track issues with the Android Video SDK. Is there any way to provide an entire stack trace via your logging provider? Even with native crashes there is a stack trace that gets logged. Also, does this crash occur on specific devices and API versions? If so, could you please also share that info? Finally, if there is any way to track the specific SDK calls that are being made leading up to the crash, it would be very helpful for us. Thanks!

jam0cam commented 3 years ago

The logs I posted above are from Sentry. The logs below are from the google play console. Do these help? If not, could we hop on a call to dig into this? We're a paying subscriber of Twilio ;).

To answer your other questions -- it doesn't look isolated to devices, nor android versions. We've only seen this happen after upgrading the video-android sdk. Unfortunately, the crash logs we're getting are so minimal there isn't any visibility over what was happening before the crash.

backtrace:
  #00  pc 000000000004ef24  /apex/com.android.runtime/lib64/bionic/libc.so (abort+164)
  #00  pc 00000000000b7ae0  /apex/com.android.runtime/lib64/bionic/libc.so (__fortify_fatal(char const*, ...)+124)
  #00  pc 00000000000b6f7c  /apex/com.android.runtime/lib64/bionic/libc.so (HandleUsingDestroyedMutex(pthread_mutex_t*, char const*)+52)
  #00  pc 00000000000b6e30  /apex/com.android.runtime/lib64/bionic/libc.so (pthread_mutex_lock+276)
  #00  pc 0000000000739890  /data/app/~~r2FL-7sBWGORhuC_sT8zYg==/com.zocdoc.android-sR918KvYj-LlVqk_JUjA4Q==/lib/arm64/libtwilio_video_android_so.so
sunit-navsoft commented 3 years ago

@jam0cam I found the same type of crash-log only from Playstore console and not captured by Firebase Crashlytics. After a lot of workaround, I found that this is only happening in signed apk and not in debug apk. Updating proguard-rules file with below code resolved my issue. -keep class tvi.webrtc.** { *; } -keep class com.twilio.video.** { *; } -keep class com.twilio.common.** { *; } -keepattributes InnerClasses

Please check whether it can help you.

wpward commented 3 years ago

@jam0cam have you received any resolution on this? I tried @sunit-navsoft's recommendation but it did not help. We already had most of that in proguard but were missing com.twilio.common. Honestly, why not just com.twilio.**?

Anyways, we are getting this crash in NDK code and it looks very much like yours. Hoping there is something to be done here.

broccolibird commented 3 years ago

I have also seen similar crashes. For the most part, I have seen them occurring as we are trying to end a call, but I think they may occur at other times as well. com.twilio:sync-android:0.8.6 com.twilio:video-android:5.8.1

2021-06-17 10:24:39.438 6287-6690/<redacted> A/libc: FORTIFY: pthread_mutex_lock called on a destroyed mutex (0xc603170c)
2021-06-17 10:24:39.526 6287-6690/<redacted> A/libc: Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 6690 (CameraBackgroun), pid 6287 (<redacted>)
2021-06-17 10:24:39.578 6712-6712/? E/crash_dump32: failed to interrupt 6475 to detach: No such process
2021-06-17 10:24:39.578 6712-6712/? E/crash_dump32: failed to interrupt 6476 to detach: No such process
2021-06-17 10:24:39.578 6712-6712/? E/crash_dump32: failed to interrupt 6477 to detach: No such process
2021-06-17 10:24:39.578 6712-6712/? E/crash_dump32: failed to interrupt 6479 to detach: No such process
2021-06-17 10:24:39.615 6712-6712/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2021-06-17 10:24:39.615 6712-6712/? A/DEBUG: Build fingerprint: 'google/sdk_gphone_x86/generic_x86:10/QSR1.190920.001/5891938:user/release-keys'
2021-06-17 10:24:39.615 6712-6712/? A/DEBUG: Revision: '0'
2021-06-17 10:24:39.615 6712-6712/? A/DEBUG: ABI: 'x86'
2021-06-17 10:24:39.615 6712-6712/? A/DEBUG: Timestamp: 2021-06-17 10:24:39-0500
2021-06-17 10:24:39.615 6712-6712/? A/DEBUG: pid: 6287, tid: 6690, name: CameraBackgroun  >>> <redacted> <<<
2021-06-17 10:24:39.615 6712-6712/? A/DEBUG: uid: 10145
2021-06-17 10:24:39.615 6712-6712/? A/DEBUG: signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
2021-06-17 10:24:39.615 6712-6712/? A/DEBUG: Abort message: 'FORTIFY: pthread_mutex_lock called on a destroyed mutex (0xc603170c)'
2021-06-17 10:24:39.615 6712-6712/? A/DEBUG:     eax 00000000  ebx 0000188f  ecx 00001a22  edx 00000006
2021-06-17 10:24:39.615 6712-6712/? A/DEBUG:     edi f420533e  esi ba5e6750
2021-06-17 10:24:39.615 6712-6712/? A/DEBUG:     ebp f731dad0  esp ba5e66f8  eip f731dad9
2021-06-17 10:24:39.786 6712-6712/? A/DEBUG: backtrace:
2021-06-17 10:24:39.786 6712-6712/? A/DEBUG:       #00 pc 00000ad9  [vdso] (__kernel_vsyscall+9)
2021-06-17 10:24:39.786 6712-6712/? A/DEBUG:       #01 pc 00092328  /apex/com.android.runtime/lib/bionic/libc.so (syscall+40) (BuildId: 76290498408016ad14f4b98c3ab6c65c)
2021-06-17 10:24:39.786 6712-6712/? A/DEBUG:       #02 pc 000ad651  /apex/com.android.runtime/lib/bionic/libc.so (abort+193) (BuildId: 76290498408016ad14f4b98c3ab6c65c)
2021-06-17 10:24:39.786 6712-6712/? A/DEBUG:       #03 pc 0011c44a  /apex/com.android.runtime/lib/bionic/libc.so (__fortify_fatal(char const*, ...)+58) (BuildId: 76290498408016ad14f4b98c3ab6c65c)
2021-06-17 10:24:39.786 6712-6712/? A/DEBUG:       #04 pc 0011b96a  /apex/com.android.runtime/lib/bionic/libc.so (HandleUsingDestroyedMutex(pthread_mutex_t*, char const*)+58) (BuildId: 76290498408016ad14f4b98c3ab6c65c)
2021-06-17 10:24:39.786 6712-6712/? A/DEBUG:       #05 pc 0011b812  /apex/com.android.runtime/lib/bionic/libc.so (pthread_mutex_lock+258) (BuildId: 76290498408016ad14f4b98c3ab6c65c)
2021-06-17 10:24:39.786 6712-6712/? A/DEBUG:       #06 pc 00559d2a  /data/app/<redacted>-3gBq6DjwduxXIr3ljCwy7w==/lib/x86/libtwilio_video_android_so.so (BuildId: f5f14e972b7f03b60b6a5e6cb6ed29a3b89a6255)
2021-06-17 10:24:39.786 6712-6712/? A/DEBUG:       #07 pc 00189d99  /data/app/<redacted>-3gBq6DjwduxXIr3ljCwy7w==/lib/x86/libtwilio_video_android_so.so (BuildId: f5f14e972b7f03b60b6a5e6cb6ed29a3b89a6255)
2021-06-17 10:24:39.786 6712-6712/? A/DEBUG:       #08 pc 0018b830  /data/app/<redacted>-3gBq6DjwduxXIr3ljCwy7w==/lib/x86/libtwilio_video_android_so.so (Java_com_twilio_video_VideoCapturerDelegate_00024NativeObserver_nativeOnByteBufferFrameCaptured+96) (BuildId: f5f14e972b7f03b60b6a5e6cb6ed29a3b89a6255)
2021-06-17 10:24:39.786 6712-6712/? A/DEBUG:       #09 pc 00144f67  /apex/com.android.runtime/lib/libart.so (art_quick_generic_jni_trampoline+71) (BuildId: 895645e5113da057f27d9b2ec11eb3bf)
2021-06-17 10:24:39.786 6712-6712/? A/DEBUG:       #10 pc 0013e7d2  /apex/com.android.runtime/lib/libart.so (art_quick_invoke_stub+338) (BuildId: 895645e5113da057f27d9b2ec11eb3bf)
2021-06-17 10:24:39.786 6712-6712/? A/DEBUG:       #11 pc 00149a69  /apex/com.android.runtime/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+281) (BuildId: 895645e5113da057f27d9b2ec11eb3bf)
2021-06-17 10:24:39.786 6712-6712/? A/DEBUG:       #12 pc 00332502  /apex/com.android.runtime/lib/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+386) (BuildId: 895645e5113da057f27d9b2ec11eb3bf)
2021-06-17 10:24:39.786 6712-6712/? A/DEBUG:       #13 pc 0032d3df  /apex/com.android.runtime/lib/libart.so (bool art::interpreter::DoCall<true, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+719) (BuildId: 895645e5113da057f27d9b2ec11eb3bf)
2021-06-17 10:24:39.786 6712-6712/? A/DEBUG:       #14 pc 00687e3d  /apex/com.android.runtime/lib/libart.so (MterpInvokeDirectRange+525) (BuildId: 895645e5113da057f27d9b2ec11eb3bf)
2021-06-17 10:24:39.786 6712-6712/? A/DEBUG:       #15 pc 00138c21  /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_direct_range+33) (BuildId: 895645e5113da057f27d9b2ec11eb3bf)
2021-06-17 10:24:39.786 6712-6712/? A/DEBUG:       #16 pc 00441e1e  [anon:dalvik-classes.dex extracted in memory from /data/app/<redacted>-3gBq6DjwduxXIr3ljCwy7w==/base.apk] (com.twilio.video.VideoCapturerDelegate$NativeObserver.onByteBufferFrameCaptured+26)
2021-06-17 10:24:39.786 6712-6712/? A/DEBUG:       #17 pc 006873b9  /apex/com.android.runtime/lib/libart.so (MterpInvokeInterfaceRange+1641) (BuildId: 895645e5113da057f27d9b2ec11eb3bf)
2021-06-17 10:24:39.786 6712-6712/? A/DEBUG:       #18 pc 00138d21  /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_interface_range+33) (BuildId: 895645e5113da057f27d9b2ec11eb3bf)
2021-06-17 10:24:39.786 6712-6712/? A/DEBUG:       #19 pc 004420ac  [anon:dalvik-classes.dex extracted in memory from /data/app/<redacted>-3gBq6DjwduxXIr3ljCwy7w==/base.apk] (com.twilio.video.VideoCapturerListenerAdapter.onFrameCaptured+64)
2021-06-17 10:24:39.786 6712-6712/? A/DEBUG:       #20 pc 006837bc  /apex/com.android.runtime/lib/libart.so (MterpInvokeInterface+1980) (BuildId: 895645e5113da057f27d9b2ec11eb3bf)
2021-06-17 10:24:39.786 6712-6712/? A/DEBUG:       #21 pc 00138a21  /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_interface+33) (BuildId: 895645e5113da057f27d9b2ec11eb3bf)
2021-06-17 10:24:39.786 6712-6712/? A/DEBUG:       #22 pc 0001bdea  [anon:dalvik-classes30.dex extracted in memory from /data/app/<redacted>-3gBq6DjwduxXIr3ljCwy7w==/base.apk!classes30.dex] (<redacted>.sdk.internal.util.<redacted>TwilioVideoCapturer.handleImageBuffer+54)
2021-06-17 10:24:39.786 6712-6712/? A/DEBUG:       #23 pc 00681adc  /apex/com.android.runtime/lib/libart.so (MterpInvokeVirtual+1612) (BuildId: 895645e5113da057f27d9b2ec11eb3bf)
2021-06-17 10:24:39.786 6712-6712/? A/DEBUG:       #24 pc 00138821  /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_virtual+33) (BuildId: 895645e5113da057f27d9b2ec11eb3bf)
2021-06-17 10:24:39.786 6712-6712/? A/DEBUG:       #25 pc 0001db02  [anon:dalvik-classes34.dex extracted in memory from /data/app/<redacted>-3gBq6DjwduxXIr3ljCwy7w==/base.apk!classes34.dex] (<redacted>.sdk.internal.remote<redacted>.twilio.TwilioVideoCapturerWrapper.handleImageBuffer+42)
2021-06-17 10:24:39.786 6712-6712/? A/DEBUG:       #26 pc 006837bc  /apex/com.android.runtime/lib/libart.so (MterpInvokeInterface+1980) (BuildId: 895645e5113da057f27d9b2ec11eb3bf)
2021-06-17 10:24:39.786 6712-6712/? A/DEBUG:       #27 pc 00138a21  /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_interface+33) (BuildId: 895645e5113da057f27d9b2ec11eb3bf)
2021-06-17 10:24:39.786 6712-6712/? A/DEBUG:       #28 pc 00012d94  [anon:dalvik-classes33.dex extracted in memory from /data/app/<redacted>-3gBq6DjwduxXIr3ljCwy7w==/base.apk!classes33.dex] (<redacted>.sdk.internal.ui.Camera2Fragment$onVideoFrameAvailableListener$1.onImageAvailable+416)
2021-06-17 10:24:39.786 6712-6712/? A/DEBUG:       #29 pc 006837bc  /apex/com.android.runtime/lib/libart.so (MterpInvokeInterface+1980) (BuildId: 895645e5113da057f27d9b2ec11eb3bf)
2021-06-17 10:24:39.786 6712-6712/? A/DEBUG:       #30 pc 00138a21  /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_interface+33) (BuildId: 895645e5113da057f27d9b2ec11eb3bf)
2021-06-17 10:24:39.787 6712-6712/? A/DEBUG:       #31 pc 001c0740  /system/framework/framework.jar (android.media.ImageReader$ListenerHandler.handleMessage+72)
2021-06-17 10:24:39.787 6712-6712/? A/DEBUG:       #32 pc 002f8e0a  /apex/com.android.runtime/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEbb.llvm.12194892193087984976+298) (BuildId: 895645e5113da057f27d9b2ec11eb3bf)
2021-06-17 10:24:39.787 6712-6712/? A/DEBUG:       #33 pc 002ffcc5  /apex/com.android.runtime/lib/libart.so (art::interpreter::EnterInterpreterFromEntryPoint(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*)+181) (BuildId: 895645e5113da057f27d9b2ec11eb3bf)
2021-06-17 10:24:39.787 6712-6712/? A/DEBUG:       #34 pc 0066fbd9  /apex/com.android.runtime/lib/libart.so (artQuickToInterpreterBridge+1209) (BuildId: 895645e5113da057f27d9b2ec11eb3bf)
2021-06-17 10:24:39.787 6712-6712/? A/DEBUG:       #35 pc 0014503d  /apex/com.android.runtime/lib/libart.so (art_quick_to_interpreter_bridge+77) (BuildId: 895645e5113da057f27d9b2ec11eb3bf)
2021-06-17 10:24:39.787 6712-6712/? A/DEBUG:       #36 pc 020dd155  /memfd:/jit-cache (deleted) (android.os.Handler.dispatchMessage+149)
2021-06-17 10:24:39.787 6712-6712/? A/DEBUG:       #37 pc 0202ed91  /memfd:/jit-cache (deleted) (android.os.Looper.loop+1553)
2021-06-17 10:24:39.787 6712-6712/? A/DEBUG:       #38 pc 0013e9a2  /apex/com.android.runtime/lib/libart.so (art_quick_invoke_static_stub+418) (BuildId: 895645e5113da057f27d9b2ec11eb3bf)
2021-06-17 10:24:39.787 6712-6712/? A/DEBUG:       #39 pc 00149a7a  /apex/com.android.runtime/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+298) (BuildId: 895645e5113da057f27d9b2ec11eb3bf)
2021-06-17 10:24:39.788 6712-6712/? A/DEBUG:       #40 pc 00332502  /apex/com.android.runtime/lib/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+386) (BuildId: 895645e5113da057f27d9b2ec11eb3bf)
2021-06-17 10:24:39.788 6712-6712/? A/DEBUG:       #41 pc 0032c19c  /apex/com.android.runtime/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+988) (BuildId: 895645e5113da057f27d9b2ec11eb3bf)
2021-06-17 10:24:39.788 6712-6712/? A/DEBUG:       #42 pc 00684d03  /apex/com.android.runtime/lib/libart.so (MterpInvokeStatic+643) (BuildId: 895645e5113da057f27d9b2ec11eb3bf)
2021-06-17 10:24:39.788 6712-6712/? A/DEBUG:       #43 pc 001389a1  /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_static+33) (BuildId: 895645e5113da057f27d9b2ec11eb3bf)
2021-06-17 10:24:39.788 6712-6712/? A/DEBUG:       #44 pc 002f4ea0  /system/framework/framework.jar (android.os.HandlerThread.run+56)
2021-06-17 10:24:39.788 6712-6712/? A/DEBUG:       #45 pc 002f8e0a  /apex/com.android.runtime/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEbb.llvm.12194892193087984976+298) (BuildId: 895645e5113da057f27d9b2ec11eb3bf)
2021-06-17 10:24:39.788 6712-6712/? A/DEBUG:       #46 pc 002ffcc5  /apex/com.android.runtime/lib/libart.so (art::interpreter::EnterInterpreterFromEntryPoint(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*)+181) (BuildId: 895645e5113da057f27d9b2ec11eb3bf)
2021-06-17 10:24:39.788 6712-6712/? A/DEBUG:       #47 pc 0066fbd9  /apex/com.android.runtime/lib/libart.so (artQuickToInterpreterBridge+1209) (BuildId: 895645e5113da057f27d9b2ec11eb3bf)
2021-06-17 10:24:39.788 6712-6712/? A/DEBUG:       #48 pc 0014503d  /apex/com.android.runtime/lib/libart.so (art_quick_to_interpreter_bridge+77) (BuildId: 895645e5113da057f27d9b2ec11eb3bf)
2021-06-17 10:24:39.788 6712-6712/? A/DEBUG:       #49 pc 0013e7d2  /apex/com.android.runtime/lib/libart.so (art_quick_invoke_stub+338) (BuildId: 895645e5113da057f27d9b2ec11eb3bf)
2021-06-17 10:24:39.788 6712-6712/? A/DEBUG:       #50 pc 00149a69  /apex/com.android.runtime/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+281) (BuildId: 895645e5113da057f27d9b2ec11eb3bf)
2021-06-17 10:24:39.788 6712-6712/? A/DEBUG:       #51 pc 0055a513  /apex/com.android.runtime/lib/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+99) (BuildId: 895645e5113da057f27d9b2ec11eb3bf)
2021-06-17 10:24:39.788 6712-6712/? A/DEBUG:       #52 pc 0055b91a  /apex/com.android.runtime/lib/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue const*)+474) (BuildId: 895645e5113da057f27d9b2ec11eb3bf)
2021-06-17 10:24:39.788 6712-6712/? A/DEBUG:       #53 pc 005aaa51  /apex/com.android.runtime/lib/libart.so (art::Thread::CreateCallback(void*)+1585) (BuildId: 895645e5113da057f27d9b2ec11eb3bf)
2021-06-17 10:24:39.788 6712-6712/? A/DEBUG:       #54 pc 0011a8e5  /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+53) (BuildId: 76290498408016ad14f4b98c3ab6c65c)
2021-06-17 10:24:39.788 6712-6712/? A/DEBUG:       #55 pc 000af6a7  /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+71) (BuildId: 76290498408016ad14f4b98c3ab6c65c)
hamidsbinfowaves commented 2 years ago

--------- beginning of crash 2022-04-14 11:39:44.118 7605-7889/com.coachlink A/libc: FORTIFY: pthread_mutex_lock called on a destroyed mutex (0x75d8b216e8) 2022-04-14 11:39:44.118 7605-7605/com.coachlink W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@c984899 2022-04-14 11:39:44.119 7605-8463/com.coachlink V/FA: Recording user engagement, ms: 347802 2022-04-14 11:39:44.252 7605-8463/com.coachlink V/FA: Connecting to remote service 2022-04-14 11:39:44.272 7605-8463/com.coachlink V/FA: Connection attempt already in progress 2022-04-14 11:39:44.272 7605-8463/com.coachlink V/FA: Activity paused, time: 413016588 2022-04-14 11:39:45.296 7605-7889/com.coachlink A/libc: Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 7889 (CaptureThread), pid 7605 (com.coachlink) 2022-04-14 11:39:45.914 7605-7898/com.coachlink I/tvi.webrtc.Logging: EglRenderer: primary_video_viewDuration: 4007 ms. Frames received: 44. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA. 2022-04-14 11:39:46.027 7605-7896/com.coachlink I/tvi.webrtc.Logging: EglRenderer: thumbnail_video_viewDuration: 4008 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.

I am getting this type of crash report in my logcat. App is crashing whenever we come back from Videocall .

yumiao2016 commented 2 years ago

@jam0cam @wpward @broccolibird Hello, sorry to bother you. Have you solved this problem? I had the same problem when using the Voice SDK.

hamidsbinfowaves commented 2 years ago

No @yumiao2016 I have not find any solution till now. I think this is from twillio end. Hope they will resolve soon.

BackPackerDz commented 2 years ago

Any update about it?

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 0 >>> com.my.app <<<

backtrace:
  #00  pc 00000000007c24a0  /data/app/~~0svzFCbBtHiWRiqve4WaMg==/com.my.app-jry-8etuKzVwey_9M_yCZg==/split_config.arm64_v8a.apk!lib/arm64-v8a/libtwilio_video_android_so.so (offset 0x6cd000)
hamidsbinfowaves commented 2 years ago

Crashing issue is resolved now. The crash was for localVideoTrack.release(); function. I have just commented this function from onPause(); onDestroy(); and disconnectClickListener(); . And replace it with Intent to the HomeActivity in disconnectClickListener(); . Actually i was releasing the video track which was already released while i click on Disconnect button. And that's why it was crashing.

avirias commented 2 years ago

I'm attaching the tombstone here

afalls-twilio commented 2 years ago

@avirias Is this still an issue with the latest release (7.3.x+)?

educate16 commented 2 years ago

hello, I have tried with the latest version 7.3.1 ( https://mvnrepository.com/artifact/com.twilio/video-android ) and still have the same issue but it only happens on release variant.
For me the app crashes when creating audio or video track: LocalAudioTrack.create(this, true, LOCAL_AUDIO_TRACK_NAME);

trace: 2022-08-29 11:51:23.395 1371-1371/? D/Twilio_Flow: TwilioService create LocalAudioTrack 2022-08-29 11:51:23.407 1371-1371/? E/rtc: #

Fatal error in: ../../../src/sdk/android/src/jni/jni_generator_helper.cc, line 28

# last system error: 0
# Check failed: !clazz.is_null()
# tvi/webrtc/WebRtcClassLoader

2022-08-29 11:51:23.407 1371-1371/? A/libc: Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 1371 (om.myapp), pid 1371 (om.myapp) 2022-08-29 11:51:23.468 1714-1714/? I/crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstone 2022-08-29 11:51:23.469 639-639/? I/tombstoned: received crash request for pid 1371 2022-08-29 11:51:23.469 1714-1714/? I/crash_dump64: performing dump of process 1371 (target tid = 1371) 2022-08-29 11:51:23.480 1714-1714/? A/DEBUG: Process name is com.myapp, not key_process 2022-08-29 11:51:23.480 1714-1714/? A/DEBUG: 2022-08-29 11:51:23.480 1714-1714/? A/DEBUG: Build fingerprint: 'OPPO/CPH2021EEA/OP4B9B:11/RP1A.200720.011/1653293246049:user/release-keys' 2022-08-29 11:51:23.480 1714-1714/? A/DEBUG: Revision: '0' 2022-08-29 11:51:23.480 1714-1714/? A/DEBUG: ABI: 'arm64' 2022-08-29 11:51:23.481 1714-1714/? A/DEBUG: Timestamp: 2022-08-29 11:51:23+0200 2022-08-29 11:51:23.481 1714-1714/? A/DEBUG: pid: 1371, tid: 1371, name: om.myapp >>> com.myapp <<< 2022-08-29 11:51:23.481 1714-1714/? A/DEBUG: uid: 10441 2022-08-29 11:51:23.481 1714-1714/? A/DEBUG: signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr -------- 2022-08-29 11:51:23.481 1714-1714/? A/DEBUG: x0 0000000000000000 x1 000000000000055b x2 0000000000000006 x3 0000007fd6bc0080 2022-08-29 11:51:23.481 1714-1714/? A/DEBUG: x4 feff716463606e4b x5 feff716463606e4b x6 feff716463606e4b x7 7f7f7f7f7f7f7f7f 2022-08-29 11:51:23.481 1714-1714/? A/DEBUG: x8 00000000000000f0 x9 00000070d932f8d8 x10 ffffff80fffffbdf x11 0000000000000001 2022-08-29 11:51:23.481 1714-1714/? A/DEBUG: x12 0000007fd6bbe9a0 x13 00000000000000ae x14 0000007fd6bbea50 x15 0000000000000000 2022-08-29 11:51:23.481 1714-1714/? A/DEBUG: x16 00000070d93f07e0 x17 00000070d93cf950 x18 00000070dab68000 x19 00000000000000ac 2022-08-29 11:51:23.481 1714-1714/? A/DEBUG: x20 000000000000055b x21 00000000000000b2 x22 000000000000055b x23 00000000ffffffff 2022-08-29 11:51:23.481 1714-1714/? A/DEBUG: x24 0000006fa50be2a8 x25 b4000070540923c0 x26 b400006fb92ab680 x27 0000000000000088 2022-08-29 11:51:23.481 1714-1714/? A/DEBUG: x28 0000000000000085 x29 0000007fd6bc0100 2022-08-29 11:51:23.481 1714-1714/? A/DEBUG: lr 00000070d9382944 sp 0000007fd6bc0060 pc 00000070d9382974 pst 0000000000000000 2022-08-29 11:51:23.482 1714-1714/? A/DEBUG: backtrace: 2022-08-29 11:51:23.482 1714-1714/? A/DEBUG: #00 pc 0000000000078974 /apex/com.android.runtime/lib64/bionic/libc.so (abort+180) (BuildId: 554cb674fad07588ff08040bb89924c9) 2022-08-29 11:51:23.482 1714-1714/? A/DEBUG: #01 pc 0000000000517aa0 /data/app/~~LOXSorS6ZrqHsNvJaP867g==/com.myapp-1IoUkiDx4lD8I8rualciQw==/split_config.arm64_v8a.apk!libtwilio_video_android_so.so (offset 0xbea000) (BuildId: 672b54fb77f09e29aec62385741eccfddb977b79)

targetSdk: 32

proguard-rules: -keep class tvi.webrtc. { *; } -keep class com.twilio.video.* { ; } -keep class com.twilio.common. { *; } -keepattributes InnerClasses

I use abi split: splits { abi { enable true reset() include "armeabi-v7a", "arm64-v8a", "x86", "x86_64" universalApk false } }

CristianoWinter10 commented 1 year ago

Hi guys, we are using version 7.3.0

We got the issue only on release version as well, we are not using split, but we are using AAB file instead of APK, which already does the work. The native debug symbols are being generated without problems.

main (native): tid=1 systid=6916

00 pc 0x4deb0 libc.so (syscall + 32)

01 pc 0xb77c0 libc.so (pthread_join + 268)

02 pc 0x513bd8 split_config.arm64_v8a.apk

   at com.twilio.video.Room.nativeRelease(Room.java)
   at com.twilio.video.Room.release(Room.java:14)
   at com.twilio.video.Room.-$$Nest$mrelease(Room.java)
   at com.twilio.video.Room$1.lambda$onDisconnected$4(Room.java:27)
   at com.twilio.video.Room$1.$r8$lambda$-18HjjQaxGgFyRkzlG2vE84fEgU(Room.java)
   at com.twilio.video.Room$1$$InternalSyntheticLambda$0$410d5141f31afac4dd0cc73db0e5458c100b7e8377d18bbeafb221e526829c44$0.run(Room.java:6)
   at android.os.Handler.handleCallback(Handler.java:938)
   at android.os.Handler.dispatchMessage(Handler.java:99)
   at android.os.Looper.loopOnce(Looper.java:226)
   at android.os.Looper.loop(Looper.java:313)
   at android.app.ActivityThread.main(ActivityThread.java:8751)
   at java.lang.reflect.Method.invoke(Method.java)
   at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)

proguard-rules: -keep class org.webrtc. { *; } -keep class tvi.webrtc.* { ; } -keep class com.twilio.video. { ; } -keepattributes InnerClasses -keepattributes Annotation*

afalls-twilio commented 1 year ago

@CristianoWinter10 @educate16 Thank you... There seems to be different issues here being lumped together...

The first issue...

# Fatal error in: ../../../src/sdk/android/src/jni/jni_generator_helper.cc, line 28
# last system error: 0
# Check failed: !clazz.is_null()

This happens when internal classes are being obfuscated by progaurd and then the C/C++ layer cannot find the java class. I would suggest getting your release APK (or whatever package) and unzip it. Inside you will find all the compiled class files. If the classes regarding Twilio & WebRTC have been obfuscated, then I would suggest revisiting your progaurd rules.

@CristianoWinter10 The issue you reported appears to be different. Did it happen when after a successful session upon shutdown?

afalls-twilio commented 1 year ago

Closing due to age and lack of response