Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Android cause crash when debug build 3 or more users joined channel #47

Closed
duongtruong12 opened this issue Dec 10, 2019 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@duongtruong12
Copy link

I just download agora-quickstart-flutter from GitHub and update some dependencies and run some video call test, suddenly it got crashed when 3 users joined channel. I had tried revert back origin code but no luck.

This is my flutter doctor:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel unknown, v1.9.1+hotfix.2, on Mac OS X 10.15.1 19B88, locale
en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.2.1)
[✓] Android Studio (version 3.5)
[✓] Connected device (2 available)
• No issues found!

This is my build gradle:

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
def keystorePropertiesFile = rootProject.file("key.properties")
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
android {
compileSdkVersion 28
lintOptions {
disable 'InvalidPackage'
}
// splits {
// // Configures multiple APKs based on ABI.
// abi {
// // Enables building multiple APKs per ABI.
// enable true
// // By default all ABIs are included, so use reset() and include to specify that we only
// // want APKs for armeabi-v7a and arm64-v8a.
//
// // Resets the list of ABIs that Gradle should create APKs for to none.
// reset()
//
// // Specifies a list of ABIs that Gradle should create APKs for.
// include "armeabi-v7a", "arm64-v8a"
//
// // Specifies that we do not want to also generate a universal APK that includes all ABIs.
// universalApk false
// }
// }
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.agoraflutterquickstart"
minSdkVersion 21
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
// Use code below for production build
// For debug mode you need to comment above lines of code
// Issue with 'libflutter.so'
// ndk {
// abiFilters 'armeabi-v7a', 'x86' ,'arm64-v8a'
// }
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
flutter {
source '../..'
}
dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'androidx.appcompat:appcompat:1.1.0'
}

This is crash log:

W/System ( 6123): A resource failed to call release.
E/RtcEngine( 6123): onEvent: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
E/RtcEngine( 6123): onEvent: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
E/flutter ( 6123): [ERROR:flutter/shell/platform/android/platform_view_android_jni.cc(39)] java.lang.AbstractMethodError: abstract method "void io.flutter.plugin.platform.PlatformView.onInputConnectionLocked()"
E/flutter ( 6123): at io.flutter.plugin.platform.VirtualDisplayController.onInputConnectionLocked(VirtualDisplayController.java:166)
E/flutter ( 6123): at io.flutter.plugin.platform.PlatformViewsController.lockInputConnection(PlatformViewsController.java:370)
E/flutter ( 6123): at io.flutter.plugin.platform.PlatformViewsController.access$1000(PlatformViewsController.java:36)
E/flutter ( 6123): at io.flutter.plugin.platform.PlatformViewsController$1.resizePlatformView(PlatformViewsController.java:165)
E/flutter ( 6123): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.resize(PlatformViewsChannel.java:120)
E/flutter ( 6123): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:57)
E/flutter ( 6123): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:222)
E/flutter ( 6123): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:96)
E/flutter ( 6123): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:656)
E/flutter ( 6123): at android.os.MessageQueue.nativePollOnce(Native Method)
E/flutter ( 6123): at android.os.MessageQueue.next(MessageQueue.java:326)
E/flutter ( 6123): at android.os.Looper.loop(Looper.java:160)
E/flutter ( 6123): at android.app.ActivityThread.main(ActivityThread.java:6669)
E/flutter ( 6123): at java.lang.reflect.Method.invoke(Native Method)
E/flutter ( 6123): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
E/flutter ( 6123): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
E/flutter ( 6123):
F/flutter ( 6123): [FATAL:flutter/shell/platform/android/platform_view_android_jni.cc(76)] Check failed: CheckException(env).
F/libc ( 6123): Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 6123 (utterquickstart), pid 6123 (utterquickstart)
Build fingerprint: 'google/sdk_gphone_x86_arm/generic_x86_arm:9/PSR1.180720.117/5875966:user/release-keys'
Revision: '0'
ABI: 'x86'
pid: 6123, tid: 6123, name: utterquickstart >>> com.example.agoraflutterquickstart <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: '[FATAL:flutter/shell/platform/android/platform_view_android_jni.cc(76)] Check failed: CheckException(env).
'
eax 00000000 ebx 000017eb ecx 000017eb edx 00000006
edi 000017eb esi 00000070
ebp ffa45b88 esp ffa45b28 eip f66ccb39
backtrace:
#00 pc 00000b39 [vdso:f66cc000] (__kernel_vsyscall+9)
#1 pc 0001fdf8 /system/lib/libc.so (syscall+40)
#2 pc 00022ed3 /system/lib/libc.so (abort+115)
#3 pc 01115f65 /data/app/com.example.agoraflutterquickstart-EY7SOGLh4FcJC9ZOylv2Gg==/lib/x86/libflutter.so (offset 0x10fb000)
#4 pc 0110443b /data/app/com.example.agoraflutterquickstart-EY7SOGLh4FcJC9ZOylv2Gg==/lib/x86/libflutter.so (offset 0x10fb000)
#5 pc 01102202 /data/app/com.example.agoraflutterquickstart-EY7SOGLh4FcJC9ZOylv2Gg==/lib/x86/libflutter.so (offset 0x10fb000)
#6 pc 011622ad /data/app/com.example.agoraflutterquickstart-EY7SOGLh4FcJC9ZOylv2Gg==/lib/x86/libflutter.so (offset 0x10fb000)
#7 pc 01114729 /data/app/com.example.agoraflutterquickstart-EY7SOGLh4FcJC9ZOylv2Gg==/lib/x86/libflutter.so (offset 0x10fb000)
#8 pc 01116ce8 /data/app/com.example.agoraflutterquickstart-EY7SOGLh4FcJC9ZOylv2Gg==/lib/x86/libflutter.so (offset 0x10fb000)
#9 pc 01116c2a /data/app/com.example.agoraflutterquickstart-EY7SOGLh4FcJC9ZOylv2Gg==/lib/x86/libflutter.so (offset 0x10fb000)
#10 pc 0111d678 /data/app/com.example.agoraflutterquickstart-EY7SOGLh4FcJC9ZOylv2Gg==/lib/x86/libflutter.so (offset 0x10fb000)
#11 pc 0111d6a6 /data/app/com.example.agoraflutterquickstart-EY7SOGLh4FcJC9ZOylv2Gg==/lib/x86/libflutter.so (offset 0x10fb000)
#12 pc 00012a77 /system/lib/libutils.so (android::SimpleLooperCallback::handleEvent(int, int, void*)+39)
#13 pc 00013896 /system/lib/libutils.so (android::Looper::pollInner(int)+998)
#14 pc 0001340b /system/lib/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+43)
#15 pc 000e415b /system/lib/libandroid_runtime.so (android::android_os_MessageQueue_nativePollOnce(_JNIEnv*, _jobject*, long long, int)+59)
#16 pc 003ddb28 /system/framework/x86/boot-framework.oat (offset 0x3ca000) (android.media.MediaExtractor.seekTo [DEDUPED]+136)
#17 pc 00001806 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.os.MessageQueue.next+230)
#18 pc 005f0a02 /system/lib/libart.so (art_quick_invoke_stub+338)
#19 pc 000a2f4e /system/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+222)
#20 pc 0029bb22 /system/lib/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+338)
#21 pc 00293cc8 /system/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+1048)
#22 pc 005bc353 /system/lib/libart.so (MterpInvokeVirtual+691)
#23 pc 005e2ba1 /system/lib/libart.so (ExecuteMterpImpl+14241)
#24 pc 00aea9fc /system/framework/boot-framework.vdex (android.os.Looper.loop+128)
#25 pc 00266096 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3007865774+598)
#26 pc 0026c61c /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+220)
#27 pc 00293cab /system/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+1019)
#28 pc 005bdb1f /system/lib/libart.so (MterpInvokeStatic+207)
#29 pc 005e2d21 /system/lib/libart.so (ExecuteMterpImpl+14625)
#30 pc 00384cd2 /system/framework/boot-framework.vdex (android.app.ActivityThread.main+214)
#31 pc 00266096 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3007865774+598)
#32 pc 0026c50e /system/lib/libart.so (art::interpreter::EnterInterpreterFromEntryPoint(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*)+126)
#33 pc 005a93fd /system/lib/libart.so (artQuickToInterpreterBridge+1277)
#34 pc 005f6aed /system/lib/libart.so (art_quick_to_interpreter_bridge+77)
#35 pc 005f0bd2 /system/lib/libart.so (art_quick_invoke_static_stub+418)
#36 pc 000a2f5f /system/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+239)
#37 pc 004d3209 /system/lib/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+89)
#38 pc 004d4eee /system/lib/libart.so (art::InvokeMethod(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned int)+1422)
#39 pc 00449643 /system/lib/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)+83)
#40 pc 0011d778 /system/framework/x86/boot.oat (offset 0x114000) (java.lang.Class.getDeclaredMethodInternal [DEDUPED]+168)
#41 pc 005f0a02 /system/lib/libart.so (art_quick_invoke_stub+338)
#42 pc 000a2f4e /system/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+222)
#43 pc 0029bb22 /system/lib/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+338)
#44 pc 00293cc8 /system/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+1048)
#45 pc 005bc353 /system/lib/libart.so (MterpInvokeVirtual+691)
#46 pc 005e2ba1 /system/lib/libart.so (ExecuteMterpImpl+14241)
#47 pc 00c0b966 /system/framework/boot-framework.vdex (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+22)
#48 pc 00266096 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3007865774+598)
#49 pc 0026c50e /system/lib/libart.so (art::interpreter::EnterInterpreterFromEntryPoint(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*)+126)
#50 pc 005a93fd /system/lib/libart.so (artQuickToInterpreterBridge+1277)
#51 pc 005f6aed /system/lib/libart.so (art_quick_to_interpreter_bridge+77)
#52 pc 00badc2c /system/framework/x86/boot-framework.oat (offset 0x3ca000) (com.android.internal.os.ZygoteInit.main+3100)
#53 pc 005f0bd2 /system/lib/libart.so (art_quick_invoke_static_stub+418)
#54 pc 000a2f5f /system/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+239)
#55 pc 004d3209 /system/lib/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+89)
#56 pc 004d2e8d /system/lib/libart.so (art::InvokeWithVarArgs(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, char*)+429)
#57 pc 003a770d /system/lib/libart.so (art::JNI::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, char*)+925)
#58 pc 000d90f3 /system/lib/libart.so (art::(anonymous namespace)::CheckJNI::CallMethodV(char const*, _JNIEnv*, _jobject*, _jclass*, _jmethodID*, char*, art::Primitive::Type, art::InvokeType)+2867)
#59 pc 000c6ba9 /system/lib/libart.so (art::(anonymous namespace)::CheckJNI::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, char*)+73)
#60 pc 0007098e /system/lib/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+62)
#61 pc 00073e88 /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vectorandroid::String8 const&, bool)+744)
#62 pc 00001bb2 /system/bin/app_process32 (main+1506)
#63 pc 000c0f54 /system/lib/libc.so (__libc_init+100)

This is my proguard:

#Flutter Wrapper
-keep class io.flutter.app.** { ; }
-keep class io.flutter.plugin.
* { ; }
-keep class io.flutter.util.
* { ; }
-keep class io.flutter.view.
* { ; }
-keep class io.flutter.
* { ; }
-keep class io.flutter.plugins.
* { ; }
-keep class io.agora.
* { *; }

@plutoless plutoless self-assigned this Dec 10, 2019
@plutoless plutoless added the bug Something isn't working label Dec 10, 2019
@rgb1380
Copy link

rgb1380 commented Apr 26, 2020

Has there been any update to this?
I am getting the same error (sometimes) when the number of users increase. The side effect of this is that they local video feed for the user freezes but the remote video feed of remote users work. Remote users also continue to receive the video feed of the local user which is not displayed to the local user.

@LichKing-2234
Copy link
Contributor

@rgb1380 it seems like a bug of flutter.
flutter/flutter#40126

@rgb1380
Copy link

rgb1380 commented Apr 27, 2020

@LichKing-2234 it's not immediately obvious to me how the video issue is related to flutter/flutter#40126 but I tried bumping up the minSDK to 24 as was suggested. Still getting the same issue.
Any ideas about an appropriate workaround?

@LichKing-2234
Copy link
Contributor

try this comment?
flutter/flutter#40126 (comment)

@chhota89
Copy link

This issue is fixed on FLutter 1.17.1 stable release

@yogithesymbian
Copy link

yogithesymbian commented Feb 1, 2023

This issue is fixed on FLutter 1.17.1 stable release

i got same issue

➜  ~ flutter doctor -v
[✓] Flutter (Channel stable, 3.0.5, on macOS 13.0.1 22A400 darwin-arm, locale en-ID)
    • Flutter version 3.0.5 at /Users/yogiarifwidodo/dev/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f1875d570e (7 months ago), 2022-07-13 11:24:16 -0700
    • Engine revision e85ea0e79c
    • Dart version 2.17.6
    • DevTools version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/yogiarifwidodo/Library/Android/sdk
    • Platform android-33, build-tools 30.0.3
    • ANDROID_HOME = /Users/yogiarifwidodo/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.0

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] VS Code (version 1.75.0-insider)
    • VS Code at /Applications/Visual Studio Code - Insiders.app/Contents
    • Flutter extension version 3.58.0

[✓] Connected device (3 available)
    • RMX1971 (mobile) • 192.168.43.1:5555 • android-arm64  • Android 10 (API 29)
    • macOS (desktop)  • macos             • darwin-arm64   • macOS 13.0.1 22A400 darwin-arm
    • Chrome (web)     • chrome            • web-javascript • Google Chrome 109.0.5414.119

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!
➜  ~

also my gradle properties have

android.enableDexingArtifactTransform=false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants