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

在JS倒计时,databinding有使用数组的场景下会造成JNI crash (Android) #493

Open
youjiaxichenyun opened this issue Oct 15, 2024 · 1 comment

Comments

@youjiaxichenyun
Copy link
Contributor

youjiaxichenyun commented Oct 15, 2024

在JS倒计时,databing有使用数组的场景下会造成JNI crash

在倒计时 1000毫秒的时间间隔时,倒计时 1小时左右会crash,
测试demo 改成 1毫秒的时间间隔,倒计时 5分钟左右会crash,

错误日志打印:
java_vm_ext.cc:690] JNI ERROR (app bug): weak global reference table overflow (max=51200)weak global reference table dump:

查看cpp 文件发现 array和 map 的情况下 有使用 NewWeakGlobalRef

分析得知 JNI 的 NewWeakGlobalRef 有 51200限制。超出就会报错。

涉及到JNI 我们 不是很有经验,希望能提供下解决思路或方法。
9F7A3AF7-2247-4fc6-B457-9CEB1BBD61D7

1DFEAEB9-5F66-4d9b-836A-211E19B5EDD9

D7FE20EA-681D-42c9-A075-6624538A59FA

demo:
demo.zip

@youjiaxichenyun youjiaxichenyun changed the title 在JS 在JS倒计时,databinding有使用数组的场景下会造成JNI crash Oct 15, 2024
@youjiaxichenyun youjiaxichenyun changed the title 在JS倒计时,databinding有使用数组的场景下会造成JNI crash 在JS倒计时,databinding有使用数组的场景下会造成JNI crash (Android) Oct 15, 2024
@youjiaxichenyun
Copy link
Contributor Author

image
我们在releaseGXValue的同时,把弱引用的引用Delete是否可行。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant