重现步骤
- 在Android 9设备上使用webview_flutter加载一个简单的应用(在Android 10+上运行良好)。
- 加载一个包含嵌入式视频的页面(例如新闻网站)。
- 应用崩溃。
预期结果
预期结果是播放嵌入式视频。
实际结果
应用崩溃,并附带以下崩溃日志。
W/ColorUtils(26506): expected specified color aspects (2:0:0:0)
I/MediaCodec(26506): MediaCodec will operate in async mode
D/SurfaceUtils(26506): connecting to surface 0x7aa9aa9010, reason connectToSurface
I/MediaCodec(26506): [c2.android.avc.decoder] setting surface generation to 27142145
D/SurfaceUtils(26506): disconnecting from surface 0x7aa9aa9010, reason connectToSurface(reconnect)
D/SurfaceUtils(26506): connecting to surface 0x7aa9aa9010, reason connectToSurface(reconnect)
E/GraphicBufferAllocator(26506): Failed to allocate (1 x 1) layerCount 1 format 34 usage 100: 3
E/BufferQueueProducer(26506): [ImageReader-1x1f22u256m2-26506-0] dequeueBuffer: createGraphicBuffer failed
D/EGL_emulation(26506): eglMakeCurrent: 0x7a7d2aa640: ver 3 0 (tinfo 0x7a7d35b380)
F/libc (26506): Fatal signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x7a6c09f214 in tid 27973 (CodecLooper), pid 26506 (dubook.learning)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'Android/sdk_gphone_arm64/generic_arm64:9/PSR1.210301.009.B1/7985424:user/release-keys'
Revision: '0'
ABI: 'arm64'
pid: 26506, tid: 27973, name: CodecLooper >>> com.edubook.learning <<<
signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x7a6c09f214
x0 0000007a7e9afce8 x1 0000007a68113f50 x2 0000007a7d400000 x3 ffffffff996a37ad
x4 001632ce2d000000 x5 0000000000000018 x6 0000007b35add000 x7 0000000000288d9e
x8 0000007a6c09f210 x9 0000007a6c09f214 x10 000000000000007b x11 0000000038aff333
x12 0000000000000018 x13 00000000669615d5 x14 002255155406ac80 x15 0000280fb255a761
x16 0000007b308dfc50 x17 0000007b30c0dc10 x18 0000007a68113190 x19 0000007aa9a66c00
x20 0000007a68114060 x21 0000007aa9aa9010 x22 0000007b33a6bba8 x23 0000000000000000
x24 0000000000000000 x25 0000007a7f7816d9 x26 0000007a68114588 x27 0000000000000000
x28 0000007a68114588 x29 0000007a68113fb0
sp 0000007a68113f40 lr 0000007a6c04d090 pc 0000007b30c0dc20
backtrace:
#00 pc 000000000000bc20 /system/lib64/libutils.so (android::RefBase::incStrong(void const*) const+16)
#01 pc 000000000004a08c /system/lib64/libstagefright_ccodec.so (android::CCodecBufferChannel::setSurface(android::sp<android::Surface> const&)+240)
#02 pc 0000000000036c98 /system/lib64/libstagefright_ccodec.so (_ZNSt3__110__function6__funcIZN7android6CCodec9configureERKNS2_2spINS2_8AMessageEEEE3$_4NS_9allocatorIS9_EEFivEEclEv+660)
#03 pc 000000000002e174 /system/lib64/libstagefright_ccodec.so (android::CCodec::configure(android::sp<android::AMessage> const&)+724)
#04 pc 0000000000029e7c /system/lib64/libstagefright_ccodec.so (android::CCodec::onMessageReceived(android::sp<android::AMessage> const&)+776)
#05 pc 0000000000019904 /system/lib64/libstagefright_foundation.so (android::AHandler::deliverMessage(android::sp<android::AMessage> const&)+92)
#06 pc 0000000000020f6c /system/lib64/libstagefright_foundation.so (android::AMessage::deliver()+180)
#07 pc 000000000001c48c /system/lib64/libstagefright_foundation.so (android::ALooper::loop()+556)
#08 pc 000000000000f974 /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+276)
#09 pc 0000000000081080 /system/lib64/libc.so (__pthread_start(void*)+36)
#10 pc 0000000000023510 /system/lib64/libc.so (__start_thread+68)
Lost connection to device.
代码示例
代码示例
[Paste your code here]
截图或视频
截图/视频演示
[上传媒体这里]
日志
日志
[Paste your logs here]
Flutter Doctor输出
Doctor输出
[Paste your output here]
1条答案
按热度按时间rjzwgtxy1#
感谢报告@MobileD3v3l
查看日志,它们似乎来自原生Android而不是webview_flutter插件或Dart,并且很可能与内存不足的场景有关。
你能提供最小可复现的代码示例吗?你正在使用哪个插件和Flutter版本?