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
Engine crashes when AndroidView is used large size #116954
Comments
Hi @JosephNK PS: The issue I mentioned above may be a webview issue, but it has the same error and almost same reproduction steps. A fix for that may likely fix all such crashes with native views |
Hi @exaby73 |
Yes I agree this is not just a webview problem. But the root cause seems to be the same, which is why I closed this as a duplicate. A fix to the Webview issue, which originates from hybrid composition if I am not mistaken, would extend the fix to similar issues like this too. If you still disagree with my closing, I'll reopen it for someone from the team to look at and give a final conclusion :) |
@exaby73 I do not agree with the issue being closed. but, I agree that it is a similar problem to WebView. |
Same thing happen to me. I'm using flutter_naver_map package(This package support map by platform view) The situtaion is below Screen1 contain flutter naver map widget. In Screen1 push Screen2 page on top > In Screen2 pop and Screen1 appear Above behavior trigger app crash. The app crash maybe not appeared at first time, but eventually this situation happen. The crash log is below. E/flutter ( 7707): [ERROR:flutter/fml/platform/android/jni_util.cc(204)] java.lang.IllegalStateException: Platform view hasn't been initialized from the platform view channel.
E/flutter ( 7707): at io.flutter.plugin.platform.PlatformViewsController.initializePlatformViewIfNeeded(PlatformViewsController.java:1062)
E/flutter ( 7707): at io.flutter.plugin.platform.PlatformViewsController.onDisplayPlatformView(PlatformViewsController.java:1132)
E/flutter ( 7707): at io.flutter.embedding.engine.FlutterJNI.onDisplayPlatformView(FlutterJNI.java:1414)
E/flutter ( 7707): at android.os.MessageQueue.nativePollOnce(Native Method)
E/flutter ( 7707): at android.os.MessageQueue.next(MessageQueue.java:335)
E/flutter ( 7707): at android.os.Looper.loopOnce(Looper.java:186)
E/flutter ( 7707): at android.os.Looper.loop(Looper.java:313)
E/flutter ( 7707): at android.app.ActivityThread.main(ActivityThread.java:8751)
E/flutter ( 7707): at java.lang.reflect.Method.invoke(Native Method)
E/flutter ( 7707): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
E/flutter ( 7707): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
E/flutter ( 7707):
F/flutter ( 7707): [FATAL:flutter/shell/platform/android/platform_view_android_jni_impl.cc(1498)] Check failed: fml::jni::CheckException(env).
F/libc ( 7707): Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 7707 (DELETE_FOR_SECURE_REASON), pid 7707 (DELETE_FOR_SECURE_REASON)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'samsung/d2xks/d2x:12/SP1A.210812.016/N976BLAHBLAH:user/release-keys'
Revision: '24'
ABI: 'arm64'
Processor: '7'
Timestamp: 2023-10-23 13:45:00.805663875+0900
Process uptime: 274s
Cmdline: DELETED FOR SECURE
pid: 7707, tid: 7707, name: DELETE_FOR_SECURE_REASON >>> DELETE_FOR_SECURE_REASON <<<
uid: 10799
signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
Abort message: '[FATAL:flutter/shell/platform/android/platform_view_android_jni_impl.cc(1498)] Check failed: fml::jni::CheckException(env).
'
x0 0000000000000000 x1 0000000000001e1b x2 0000000000000006 x3 0000007fff27a9c0
x4 000000723285d000 x5 000000723285d000 x6 000000723285d000 x7 0000000005762d34
x8 00000000000000f0 x9 000000721be5c290 x10 ffffff00fffffbdf x11 0000000000000001
x12 0000fffffffff3ff x13 000000000000007e x14 0000000000000000 x15 00003011e3b0a768
x16 000000721befd058 x17 000000721bed9e00 x18 0000007231914000 x19 00000000000000ac
x20 0000000000001e1b x21 00000000000000b2 x22 0000000000001e1b x23 00000000ffffffff
x24 0000006fdb111f30 x25 00000000fffffadc x26 000000000000000e x27 0000000000000099
x28 0000007fff27acd8 x29 0000007fff27aa40
lr 000000721be8b394 sp 0000007fff27a9a0 pc 000000721be8b3c4 pst 0000000000000000
backtrace:
#00 pc 00000000000513c4 /apex/com.android.runtime/lib64/bionic/libc.so (abort+180) (BuildId: 88b933fc529619f5e58bc6d5510017ee)
#01 pc 000000000167ef8c /data/app/~~Uk7WhylB2o3tPoyOZe_oIw==/DELETE_FOR_SECURE_REASON-c00JNJZWBBh5HdzGczCR2w==/lib/arm64/libflutter.so (BuildId: 0d7f795748efadb20835883f196e9ba311e4322f)
#02 pc 00000000016a6670 /data/app/~~Uk7WhylB2o3tPoyOZe_oIw==/DELETE_FOR_SECURE_REASON-c00JNJZWBBh5HdzGczCR2w==/lib/arm64/libflutter.so (BuildId: 0d7f795748efadb20835883f196e9ba311e4322f)
#03 pc 000000000168ca20 /data/app/~~Uk7WhylB2o3tPoyOZe_oIw==/DELETE_FOR_SECURE_REASON-c00JNJZWBBh5HdzGczCR2w==/lib/arm64/libflutter.so (BuildId: 0d7f795748efadb20835883f196e9ba311e4322f)
#04 pc 0000000001e05650 /data/app/~~Uk7WhylB2o3tPoyOZe_oIw==/DELETE_FOR_SECURE_REASON-c00JNJZWBBh5HdzGczCR2w==/lib/arm64/libflutter.so (BuildId: 0d7f795748efadb20835883f196e9ba311e4322f)
#05 pc 0000000001a43b28 /data/app/~~Uk7WhylB2o3tPoyOZe_oIw==/DELETE_FOR_SECURE_REASON-c00JNJZWBBh5HdzGczCR2w==/lib/arm64/libflutter.so (BuildId: 0d7f795748efadb20835883f196e9ba311e4322f)
#06 pc 0000000001a428a4 /data/app/~~Uk7WhylB2o3tPoyOZe_oIw==/DELETE_FOR_SECURE_REASON-c00JNJZWBBh5HdzGczCR2w==/lib/arm64/libflutter.so (BuildId: 0d7f795748efadb20835883f196e9ba311e4322f)
#07 pc 0000000001a430bc /data/app/~~Uk7WhylB2o3tPoyOZe_oIw==/DELETE_FOR_SECURE_REASON-c00JNJZWBBh5HdzGczCR2w==/lib/arm64/libflutter.so (BuildId: 0d7f795748efadb20835883f196e9ba311e4322f)
#08 pc 0000000001a441c4 /data/app/~~Uk7WhylB2o3tPoyOZe_oIw==/DELETE_FOR_SECURE_REASON-c00JNJZWBBh5HdzGczCR2w==/lib/arm64/libflutter.so (BuildId: 0d7f795748efadb20835883f196e9ba311e4322f)
#09 pc 0000000001a42c94 /data/app/~~Uk7WhylB2o3tPoyOZe_oIw==/DELETE_FOR_SECURE_REASON-c00JNJZWBBh5HdzGczCR2w==/lib/arm64/libflutter.so (BuildId: 0d7f795748efadb20835883f196e9ba311e4322f)
#10 pc 0000000001a42a08 /data/app/~~Uk7WhylB2o3tPoyOZe_oIw==/DELETE_FOR_SECURE_REASON-c00JNJZWBBh5HdzGczCR2w==/lib/arm64/libflutter.so (BuildId: 0d7f795748efadb20835883f196e9ba311e4322f)
#11 pc 0000000001a444c0 /data/app/~~Uk7WhylB2o3tPoyOZe_oIw==/DELETE_FOR_SECURE_REASON-c00JNJZWBBh5HdzGczCR2w==/lib/arm64/libflutter.so (BuildId: 0d7f795748efadb20835883f196e9ba311e4322f)
#12 pc 00000000016a722c /data/app/~~Uk7WhylB2o3tPoyOZe_oIw==/DELETE_FOR_SECURE_REASON-c00JNJZWBBh5HdzGczCR2w==/lib/arm64/libflutter.so (BuildId: 0d7f795748efadb20835883f196e9ba311e4322f)
#13 pc 00000000016ac8d8 /data/app/~~Uk7WhylB2o3tPoyOZe_oIw==/DELETE_FOR_SECURE_REASON-c00JNJZWBBh5HdzGczCR2w==/lib/arm64/libflutter.so (BuildId: 0d7f795748efadb20835883f196e9ba311e4322f)
#14 pc 0000000000016bb0 /system/lib64/libutils.so (android::Looper::pollInner(int)+912) (BuildId: 176a88c64d70f517a4c1c58b40932d90)
#15 pc 00000000000167b8 /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+112) (BuildId: 176a88c64d70f517a4c1c58b40932d90)
#16 pc 0000000000153f84 /system/lib64/libandroid_runtime.so (android::android_os_MessageQueue_nativePollOnce(_JNIEnv*, _jobject*, long, int)+44) (BuildId: 4d247a29d7f86eb679b2a60064fc3f99)
#17 pc 000000000023d57c /system/framework/arm64/boot-framework.oat (art_jni_trampoline+108) (BuildId: 4b91d967447509b203d12e2f47755fc3cf80d81f)
#18 pc 000000000200dfcc /memfd:jit-cache (deleted) (android.os.MessageQueue.next+204)
#19 pc 0000000002015d48 /memfd:jit-cache (deleted) (android.os.Looper.loopOnce+168)
#20 pc 00000000021318d0 /memfd:jit-cache (deleted) (android.os.Looper.loop+464)
#21 pc 0000000000218c7c /apex/com.android.art/lib64/libart.so (art_quick_osr_stub+60) (BuildId: 1724d2edb620afb8c3e8c5ea6c61ac19)
#22 pc 000000000040bee0 /apex/com.android.art/lib64/libart.so (art::jit::Jit::MaybeDoOnStackReplacement(art::Thread*, art::ArtMethod*, unsigned int, int, art::JValue*)+344) (BuildId: 1724d2edb620afb8c3e8c5ea6c61ac19)
#23 pc 0000000000769d88 /apex/com.android.art/lib64/libart.so (MterpMaybeDoOnStackReplacement+208) (BuildId: 1724d2edb620afb8c3e8c5ea6c61ac19)
#24 pc 0000000000208350 /apex/com.android.art/lib64/libart.so (MterpHelpers+240) (BuildId: 1724d2edb620afb8c3e8c5ea6c61ac19)
#25 pc 00000000004cb318 /system/framework/framework.jar (android.os.Looper.loop+160)
#26 pc 0000000000763330 /apex/com.android.art/lib64/libart.so (MterpInvokeStatic+2352) (BuildId: 1724d2edb620afb8c3e8c5ea6c61ac19)
#27 pc 0000000000203994 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_static+20) (BuildId: 1724d2edb620afb8c3e8c5ea6c61ac19)
#28 pc 00000000001bd3e6 /system/framework/framework.jar (android.app.ActivityThread.main+214)
#29 pc 00000000003d98e0 /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool)+304) (BuildId: 1724d2edb620afb8c3e8c5ea6c61ac19)
#30 pc 000000000074657c /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+780) (BuildId: 1724d2edb620afb8c3e8c5ea6c61ac19)
#31 pc 0000000000222378 /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: 1724d2edb620afb8c3e8c5ea6c61ac19)
#32 pc 0000000000218be8 /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+568) (BuildId: 1724d2edb620afb8c3e8c5ea6c61ac19)
#33 pc 000000000028520c /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+212) (BuildId: 1724d2edb620afb8c3e8c5ea6c61ac19)
#34 pc 0000000000627760 /apex/com.android.art/lib64/libart.so (_jobject* art::InvokeMethod<(art::PointerSize)8>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)+1384) (BuildId: 1724d2edb620afb8c3e8c5ea6c61ac19)
#35 pc 0000000000597a38 /apex/com.android.art/lib64/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)+48) (BuildId: 1724d2edb620afb8c3e8c5ea6c61ac19)
#36 pc 00000000000b2f74 /apex/com.android.art/javalib/arm64/boot.oat (art_jni_trampoline+132) (BuildId: f35585e93c1ff4c865b6334fa014e97244124284)
#37 pc 0000000000218964 /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: 1724d2edb620afb8c3e8c5ea6c61ac19)
#38 pc 00000000002851f0 /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+184) (BuildId: 1724d2edb620afb8c3e8c5ea6c61ac19)
#39 pc 00000000003e70f0 /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+400) (BuildId: 1724d2edb620afb8c3e8c5ea6c61ac19)
#40 pc 00000000003e1cec /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+804) (BuildId: 1724d2edb620afb8c3e8c5ea6c61ac19)
#41 pc 0000000000757d64 /apex/com.android.art/lib64/libart.so (MterpInvokeVirtual+1164) (BuildId: 1724d2edb620afb8c3e8c5ea6c61ac19)
#42 pc 0000000000203814 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_virtual+20) (BuildId: 1724d2edb620afb8c3e8c5ea6c61ac19)
#43 pc 000000000045b04e /system/framework/framework.jar (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+22)
#44 pc 00000000003d98e0 /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool)+304) (BuildId: 1724d2edb620afb8c3e8c5ea6c61ac19)
#45 pc 000000000074657c /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+780) (BuildId: 1724d2edb620afb8c3e8c5ea6c61ac19)
#46 pc 0000000000222378 /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: 1724d2edb620afb8c3e8c5ea6c61ac19)
#47 pc 0000000000aec748 /system/framework/arm64/boot-framework.oat (com.android.internal.os.ZygoteInit.main+2376) (BuildId: 4b91d967447509b203d12e2f47755fc3cf80d81f)
#48 pc 0000000000218be8 /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+568) (BuildId: 1724d2edb620afb8c3e8c5ea6c61ac19)
#49 pc 000000000028520c /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+212) (BuildId: 1724d2edb620afb8c3e8c5ea6c61ac19)
#50 pc 0000000000627ec0 /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeWithVarArgs<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, std::__va_list)+448) (BuildId: 1724d2edb620afb8c3e8c5ea6c61ac19)
#51 pc 0000000000628394 /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeWithVarArgs<_jmethodID*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+92) (BuildId: 1724d2edb620afb8c3e8c5ea6c61ac19)
#52 pc 0000000000501094 /apex/com.android.art/lib64/libart.so (art::JNI<true>::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+612) (BuildId: 1724d2edb620afb8c3e8c5ea6c61ac19)
#53 pc 00000000000b2b28 /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+120) (BuildId: 4d247a29d7f86eb679b2a60064fc3f99)
#54 pc 00000000000becd8 /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)+856) (BuildId: 4d247a29d7f86eb679b2a60064fc3f99)
#55 pc 00000000000025b0 /system/bin/app_process64 (main+1368) (BuildId: 9a7b5029aaf92752a6307785aa874b5a)
#56 pc 0000000000049b48 /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+96) (BuildId: 88b933fc529619f5e58bc6d5510017ee)
Lost connection to device.
Exited Tested Device is Galaxy Note 10+ but, this situaion happened on iOS also. I've tested on Flutter (Channel stable, 3.13.8, 3.10.5). |
Most of them are coming up as issues for WebView, but when checked, it is not just an issue for WebView.
When the native UI component is wrapped and used as an AndroidView, a crash occurs when the View is increased in size to SizeBox.
It also occurs on any Android Device.
In building and operating a project using the Flutter framework, this seems to be a serious error as a whole.
The following reports are related to WebView large size
#106999, #104889, #93115, #45243, #28978
Example Full Soruce Code
https://github.com/JosephNK/flutter_native_view
Code
Error Log
Flutter Doctor
The text was updated successfully, but these errors were encountered: