啥也不会
啥也不会
  • 发布:2021-01-26 16:17
  • 更新:2021-01-26 16:34
  • 阅读:229

uniapp+原生android,,libweexcore.so发生jni本地引用溢出

分类:uni-app

:47:14.174 2129-2129/? A/DEBUG: Revision: '0'
2021-01-08 17:47:14.174 2129-2129/? A/DEBUG: ABI: 'arm'
2021-01-08 17:47:14.174 2129-2129/? A/DEBUG: pid: 32069, tid: 32089, name: dclcoud >>> com.HBuilder.UniPlugin <<<
2021-01-08 17:47:14.174 2129-2129/? A/DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
2021-01-08 17:47:14.197 2129-2129/? A/DEBUG: Abort message:art/runtime/indirect_reference_table.cc:132] JNI ERROR (app bug): local reference table overflow (max=512)
2021-01-08 17:47:14.197 2129-2129/? A/DEBUG: r0 00000000 r1 00007d59 r2 00000006 r3 00000008
2021-01-08 17:47:14.197 2129-2129/? A/DEBUG: r4 ddc3a978 r5 00000006 r6 ddc3a920 r7 0000010c
2021-01-08 17:47:14.197 2129-2129/? A/DEBUG: r8 00000000 r9 0000000a sl 000003cc fp cd3ab000
2021-01-08 17:47:14.197 2129-2129/? A/DEBUG: ip 0000000b sp ddc3a518 lr ecdd45f7 pc ecdd6e54 cpsr 20070010
2021-01-08 17:47:14.211 2129-2129/? A/DEBUG: backtrace:
2021-01-08 17:47:14.211 2129-2129/? A/DEBUG: #00 pc 00049e54 /system/lib/libc.so (tgkill+12)
2021-01-08 17:47:14.211 2129-2129/? A/DEBUG: #01 pc 000475f3 /system/lib/libc.so (pthread_kill+34)
2021-01-08 17:47:14.211 2129-2129/? A/DEBUG: #02 pc 0001d8a5 /system/lib/libc.so (raise+10)
2021-01-08 17:47:14.211 2129-2129/? A/DEBUG: #03 pc 000193f1 /system/lib/libc.so (libc_android_abort+34)
2021-01-08 17:47:14.211 2129-2129/? A/DEBUG: #04 pc 00017034 /system/lib/libc.so (abort+4)
2021-01-08 17:47:14.211 2129-2129/? A/DEBUG: #05 pc 0031af51 /system/lib/libart.so (_ZN3art7Runtime5AbortEPKc+328)
2021-01-08 17:47:14.211 2129-2129/? A/DEBUG: #06 pc 000b5285 /system/lib/libart.so (_ZN3art10LogMessageD2Ev+1132)
2021-01-08 17:47:14.211 2129-2129/? A/DEBUG: #07 pc 001bc4fb /system/lib/libart.so (_ZN3art22IndirectReferenceTable3AddEjPNS_6mirror6ObjectE+194)
2021-01-08 17:47:14.211 2129-2129/? A/DEBUG: #08 pc 002649d3 /system/lib/libart.so (_ZN3art3JNI14GetObjectClassEP7_JNIEnvP8_jobject+426)
2021-01-08 17:47:14.211 2129-2129/? A/DEBUG: #09 pc 000c1895 /system/lib/libart.so (_ZN3art8CheckJNI14GetObjectClassEP7_JNIEnvP8_jobject+460)
2021-01-08 17:47:14.211 2129-2129/? A/DEBUG: #10 pc 00058823 /data/app/com.HBuilder.UniPlugin-2/lib/arm/libweexcore.so (_ZN6dcloud13DCJNIDelegate14CallVoidMethodEPKcS2_z+28)
2021-01-08 17:47:14.211 2129-2129/? A/DEBUG: #11 pc 0005e717 /data/app/com.HBuilder.UniPlugin-2/lib/arm/libweexcore.so (_ZN6dcloud4DCAD11notifyReqAdEP7_JNIEnvNS_11DCHttpErrorEiRNSt6__ndk112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEb+62)
2021-01-08 17:47:14.211 2129-2129/? A/DEBUG: #12 pc 0005e5ad /data/app/com.HBuilder.UniPlugin-2/lib/arm/libweexcore.so (_ZN6dcloud4DCAD7doReqAdERNSt6
ndk112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEb+288)
2021-01-08 17:47:14.211 2129-2129/? A/DEBUG: #13 pc 0006012d /data/app/com.HBuilder.UniPlugin-2/lib/arm/libweexcore.so
2021-01-08 17:47:14.212 2129-2129/? A/DEBUG: #14 pc 00063d17 /data/app/com.HBuilder.UniPlugin-2/lib/arm/libweexcore.so (_ZN6dcloud14DCTMessageLoop6DoWorkEv+362)
2021-01-08 17:47:14.212 2129-2129/? A/DEBUG: #15 pc 00063aa3 /data/app/com.HBuilder.UniPlugin-2/lib/arm/libweexcore.so (_ZN6dcloud14DCTMessageLoop3RunEv+88)
2021-01-08 17:47:14.212 2129-2129/? A/DEBUG: #16 pc 00064f55 /data/app/com.HBuilder.UniPlugin-2/lib/arm/libweexcore.so (_ZN6dcloud10ThreadFuncEPv+12)

Sensor(){
var that = this;
face.SensorStatus(this.screen,this.Variable.status,this.sersonstatus,'accesspanel',(res)=>{
console.log(res.status)
if(res.crom&&that.Variable.shu==0){
that.facergbdata();
}
if(res.nevget){
face.Setnav()
clearTimeout(that.Variable.timeoutnum);
that.Variable.timeoutnum=null;
that.Variable.run=1
}
if(that.Variable.run==0){
this.reconnect()
}
})
},
reconnect() {//重新连接
var that = this;
if(that.Variable.lockReconnect) {
return;
};
that.Variable.lockReconnect = true;
//没连接上会一直重连,设置延迟避免请求过多
clearTimeout(that.Variable.timeoutnum);
that.Variable.timeoutnum=null;
that.Variable.timeoutnum = setTimeout(function () {
that.Variable.lockReconnect = false;
//新连接
that.Sensor();
},1000);
},
后面这段代码是uniapp调用android的一个方法,不调用face.SensorStatus这个方法不会崩溃,大概4个小时的样子崩溃,因为我把android端调用的jni屏蔽还是会崩溃所以暂时排除是我android调用的jni问题,有没有大佬看一眼给个解决方法

2021-01-26 16:17 负责人:无 分享
已邀请:
DCloud_IOS_XTY

DCloud_IOS_XTY

请提供更详细的信息,提供下复现的demo和复现步骤

  • 啥也不会 (作者)

    这就不好办因为我这边android和硬件相关联,我把数据模拟下给你个apk把

    2021-01-26 16:47

  • 啥也不会 (作者)

    步骤就是首页放着几个小时之后就会崩溃,我这边android版本是7.1.2

    2021-01-26 16:54

要回复问题请先登录注册