-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
在鸿蒙上用正式发布的证书打release包之后,提交审核时,鸿蒙反馈运行时会闪退(自己无法测试,因为在未审核通过时,自己无法安装正在发布的安装包) #1446
Comments
Why is it an MMKV issue? There's absolutely nothing to do with MMKV in your crash call-stacks. |
这个问题我们使用了排除法,kkmv库去掉之后,再打release包就不会闪退了,闪退和不闪退的包,除了去掉了MMKV库以外,其他没有任何变化 ,目前猜测可能是mmkv有一些初始化,即使没调用也会走到那里,触发了这个闪退,你们也可以测试下。打一个release让和你们对接的鸿蒙同事,安装测试下看看 ,使用的鸿蒙flutter sdk是3.22版本 |
MMKV for flutter is already being used in WeChat on OHOS. We don't have that crash problem if that's what you are suggesting. |
Make sure you follow the official guide from OHOS. |
https://gitee.com/harmonycommando_flutter/flutter
|
Then it would be reasonable if you complained about this crash to that repo instead of here. |
鸿蒙的那边工程师反馈,mmkv插件源码里面有ffi的函数指针转换Pointer.fromFunction 这里可能有问题,你们可以联系对接下 |
Pointer.fromFunction 的底层实现依赖 Dart VM,主要分为以下几个步骤: 桥接代码的内存分配 鸿蒙的技术专家给的方案是可以避免调用这个函数指针转换,不要让dart假装自己是c函数,而是写一个c函数,用dartvm扩展,去调用那个dart函数,这样就不会有JIT了 |
遇到这种问题,再没有确定是那边的问题前,我一般两边都会反馈的, 鸿蒙工程师给出了一些建议,你们可以参考下。 |
最终测试这句 触发了闪退,await MMKV.initialize(groupDir: groupDir, handler: JdMMKVHandler()); 去掉 handler:这参数,就不会闪退了.代码如下: await MMKV.initialize(groupDir: groupDir) , 猜测应该handler传递到c层,触发了 Pointer.fromFunction 函数 为了让你意识是你们适配鸿蒙代码的问题, 我们花了一个上午的时间去验证这个问题, 还是尽快解决下吧 。 |
On the contrary, I think it's the OHOS Flutter team that didn't support my usage, which is an officially supported feature. |
For your information, and the OHOS Flutter team as well, iOS doesn't support creating |
Note:
An crash issue will be ignored & closed in a week without logs.
The language of MMKV
The version of MMKV
The platform of MMKV
报这个错误。主要原因是鸿蒙11月22号之后对内存修改做了限制。详情看这里https://developer.huawei.com/consumer/cn/doc/harmonyos-releases-V5/changelogs-for-all-apps-b031-V5
主要报错如下:
Reason:Signal:SIGABRT(SI_TKILL)@0x01317bdb000052ad from:21165:20020187
LastFatalMessage:../../third_party/dart/runtime/vm/virtual_memory_posix.cc: 469: error: mprotect failed: 22 (Invalid argument)
Fault thread info:
Tid:21196, Name:1.ui
#00 pc 00000000001990cc /system/lib/ld-musl-aarch64.so.1(raise+228)(ba282d4e0c9add4f48aa3ff367d51fc7)
#1 pc 0000000000146424 /system/lib/ld-musl-aarch64.so.1(abort+20)(ba282d4e0c9add4f48aa3ff367d51fc7)
#2 pc 0000000000a1b198 /data/storage/el1/bundle/libs/arm64/libflutter.so(e30f7bfe875c386c56ed3d53f7f3bc4b9d2986c1)
#3 pc 0000000000aeb2c4 /data/storage/el1/bundle/libs/arm64/libflutter.so(e30f7bfe875c386c56ed3d53f7f3bc4b9d2986c1)
#4 pc 0000000000aead2c /data/storage/el1/bundle/libs/arm64/libflutter.so(e30f7bfe875c386c56ed3d53f7f3bc4b9d2986c1)
#5 pc 0000000000a48318 /data/storage/el1/bundle/libs/arm64/libflutter.so(e30f7bfe875c386c56ed3d53f7f3bc4b9d2986c1)
#6 pc 0000000000a48750 /data/storage/el1/bundle/libs/arm64/libflutter.so(e30f7bfe875c386c56ed3d53f7f3bc4b9d2986c1)
#7 pc 0000000000a302f0 /data/storage/el1/bundle/libs/arm64/libflutter.so(e30f7bfe875c386c56ed3d53f7f3bc4b9d2986c1)
#8 pc 0000000000a62a90 /data/storage/el1/bundle/libs/arm64/libflutter.so(e30f7bfe875c386c56ed3d53f7f3bc4b9d2986c1)
#9 pc 0000000000a62cc0 /data/storage/el1/bundle/libs/arm64/libflutter.so(e30f7bfe875c386c56ed3d53f7f3bc4b9d2986c1)
The installation of MMKV
What's the issue?
What's the log of MMKV when that happened?
The text was updated successfully, but these errors were encountered: