Sometimes during the webrtc sessions android can randomly crash with the following log
D/CCodec ( 7026): setup formats input: AMessage(what = 0x00000000) = {
D/CCodec ( 7026): Rect crop(0, 0, 639, 479)
D/CCodec ( 7026): int32_t color-standard = 0
D/CCodec ( 7026): int32_t color-range = 0
D/CCodec ( 7026): int32_t color-transfer = 0
D/CCodec ( 7026): int32_t frame-rate = 60
D/CCodec ( 7026): int32_t height = 480
D/CCodec ( 7026): int32_t i-frame-period = 6000
D/CCodec ( 7026): string mime = "video/raw"
D/CCodec ( 7026): int32_t prepend-sps-pps-to-idr-frames = 1
D/CCodec ( 7026): int32_t priority = 1
D/CCodec ( 7026): int32_t width = 640
D/CCodec ( 7026): int32_t android._dataspace = 0
D/CCodec ( 7026): int32_t android._color-format = 2130708361
D/CCodec ( 7026): int32_t color-format = 2130708361
D/CCodec ( 7026): } and output: AMessage(what = 0x00000000) = {
D/CCodec ( 7026): int32_t bitrate = 300000
D/CCodec ( 7026): int32_t bitrate-mode = 2
D/CCodec ( 7026): Rect crop(0, 0, 639, 479)
D/CCodec ( 7026): int32_t color-standard = 0
D/CCodec ( 7026): int32_t color-range = 0
D/CCodec ( 7026): int32_t color-transfer = 0
D/CCodec ( 7026): int32_t frame-rate = 60
D/CCodec ( 7026): int32_t height = 480
D/CCodec ( 7026): int32_t i-frame-period = 6000
D/CCodec ( 7026): int32_t level = 1
D/CCodec ( 7026): int32_t max-bitrate = 300000
D/CCodec ( 7026): string mime = "video/x-vnd.on2.vp8"
D/CCodec ( 7026): int32_t prepend-sps-pps-to-idr-frames = 1
D/CCodec ( 7026): int32_t priority = 1
D/CCodec ( 7026): int32_t profile = 1
D/CCodec ( 7026): int32_t width = 640
D/CCodec ( 7026): }
D/FlutterWebRTCPlugin( 7026): peerConnectionAddICECandidate() start
I/org.webrtc.Logging( 7026): EglBase14Impl: Using OpenGL ES version 2
I/org.webrtc.Logging( 7026): EglRenderer: Duration: 4003 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
W/System.err( 7026): java.lang.RuntimeException: Failed to create EGL context: 0x3003
W/System.err( 7026): at org.webrtc.EglBase14Impl.createEglContext(EglBase14Impl.java:280)
W/System.err( 7026): at org.webrtc.EglBase14Impl.<init>(EglBase14Impl.java:78)
W/System.err( 7026): at org.webrtc.EglBase$-CC.createEgl14(EglBase.java:215)
W/System.err( 7026): at org.webrtc.HardwareVideoEncoder.initEncodeInternal(HardwareVideoEncoder.java:218)
W/System.err( 7026): at org.webrtc.HardwareVideoEncoder.initEncode(HardwareVideoEncoder.java:174)
E/rtc ( 7026):
E/rtc ( 7026):
E/rtc ( 7026): #
E/rtc ( 7026): # Fatal error in: gen/sdk/android/generated_base_jni/jni/../../../../../../../../../usr/local/google/home/sakal/code/webrtc-aar-release/src/sdk/android/src/jni/jni_generator_helper.h, line 85
E/rtc ( 7026): # last system error: 0
E/rtc ( 7026): # Check failed: !env->ExceptionCheck()
E/rtc ( 7026): #
D/FlutterWebRTCPlugin( 7026): peerConnectionAddICECandidate() end
D/FlutterWebRTCPlugin( 7026): peerConnectionAddICECandidate() start
D/FlutterWebRTCPlugin( 7026): peerConnectionAddICECandidate() end
I/flutter ( 7026): ROULETTE: RTCIceConnectionState.RTCIceConnectionStateChecking
F/libc ( 7026): Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 14640 (EncoderQueue - ), pid 7026 (glovi.newlifeai)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'google/sargo/sargo:10/QQ2A.200305.002/6138846:user/release-keys'
Revision: 'MP1.0'
ABI: 'arm64'
Timestamp: 2020-04-15 10:57:15+0200
pid: 7026, tid: 14640, name: EncoderQueue - >>> <<<
uid: 10271
signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
x0 0000000000000000 x1 0000000000003930 x2 0000000000000006 x3 0000007adad7b230
x4 ff0a1072fefdfeff x5 ff0a1072fefdfeff x6 ff0a1072fefdfeff x7 7f7f7f7fffff7f7f
x8 00000000000000f0 x9 cf9801394a9c48ef x10 0000000000000001 x11 0000000000000000
x12 fffffff0fffffbdf x13 ffffffffffffffff x14 0000000000000004 x15 ffffffffffffffff
x16 0000007c1908e8c0 x17 0000007c1906c0c0 x18 0000007a30aca000 x19 0000000000001b72
x20 0000000000003930 x21 00000000ffffffff x22 0000007aef9caa83 x23 00000000000001e0
x24 000000000000012c x25 000000000000003c x26 0000000000003286 x27 0000000000000001
x28 0000000000000001 x29 0000007adad7b2d0
sp 0000007adad7b210 lr 0000007c19020f48 pc 0000007c19020f74
backtrace:
#00 pc 0000000000081f74 /apex/com.android.runtime/lib64/bionic/libc.so (abort+160) (BuildId: 8de865099c99977483c8947f9b7937e9)
#01 pc 0000000000216860 /data/app/com.test-dyRK5ZjiUzXyjdUHldczJQ==/lib/arm64/libjingle_peerconnection_so.so
#02 pc 000000000021364c /data/app/com.test-dyRK5ZjiUzXyjdUHldczJQ==/lib/arm64/libjingle_peerconnection_so.so
#03 pc 000000000021357c /data/app/com.test-dyRK5ZjiUzXyjdUHldczJQ==/lib/arm64/libjingle_peerconnection_so.so
#04 pc 00000000003d9680 /data/app/com.test-dyRK5ZjiUzXyjdUHldczJQ==/lib/arm64/libjingle_peerconnection_so.so
#05 pc 00000000003d9340 /data/app/com.test-dyRK5ZjiUzXyjdUHldczJQ==/lib/arm64/libjingle_peerconnection_so.so
#06 pc 00000000003ebfb0 /data/app/com.test-dyRK5ZjiUzXyjdUHldczJQ==/lib/arm64/libjingle_peerconnection_so.so
#07 pc 00000000002922c0 /data/app/com.test-dyRK5ZjiUzXyjdUHldczJQ==/lib/arm64/libjingle_peerconnection_so.so
#08 pc 0000000000293560 /data/app/com.test-dyRK5ZjiUzXyjdUHldczJQ==/lib/arm64/libjingle_peerconnection_so.so
#09 pc 0000000000296504 /data/app/com.test-dyRK5ZjiUzXyjdUHldczJQ==/lib/arm64/libjingle_peerconnection_so.so
#10 pc 0000000000279608 /data/app/com.test-dyRK5ZjiUzXyjdUHldczJQ==/lib/arm64/libjingle_peerconnection_so.so
#11 pc 00000000004fac04 /data/app/com.test-dyRK5ZjiUzXyjdUHldczJQ==/lib/arm64/libjingle_peerconnection_so.so
#12 pc 000000000027944c /data/app/com.test-dyRK5ZjiUzXyjdUHldczJQ==/lib/arm64/libjingle_peerconnection_so.so
#13 pc 000000000021e558 /data/app/com.test-dyRK5ZjiUzXyjdUHldczJQ==/lib/arm64/libjingle_peerconnection_so.so
#14 pc 00000000000e10a0 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36) (BuildId: 8de865099c99977483c8947f9b7937e9)
#15 pc 0000000000083ab0 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 8de865099c99977483c8947f9b7937e9)
To Reproduce && Platform information
Crash is reproduced on old & new androids (tested on Pixel 3 with android 10)
flutter doctor -v ✔ ⚙ 11273 11:02:58
[✓] Flutter (Channel stable, v1.12.13+hotfix.9, on Mac OS X 10.15.4 19E266, locale en-UA)
• Flutter version 1.12.13+hotfix.9 at /Users/tapkain/Desktop/flutter
• Framework revision f139b11009 (2 weeks ago), 2020-03-30 13:57:30 -0700
• Engine revision af51afceb8
• Dart version 2.7.2
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /Users/tapkain/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 28.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.4)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.4, Build version 11E146
• CocoaPods version 1.9.1
[✓] Android Studio (version 3.4)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 38.1.1
• Dart plugin version 183.6270
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
[✓] VS Code (version 1.44.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.9.1
[✓] Connected device (2 available)
• Pixel 3a • 016AY1RZ99 • android-arm64 • Android 10 (API 29)
• tapkain • 6f7729aa34c871d8e7ba4d3947b6ee65af9dc39e • ios • iOS 13.4.1
• No issues found!
- Plugin version: flutter_webrtc: ^0.2.7
- OS: Android
- OS version: 10
Sometimes during the webrtc sessions android can randomly crash with the following log
To Reproduce && Platform information
Crash is reproduced on old & new androids (tested on Pixel 3 with android 10)