android信令保持登录ping导致jni层crash

qq群里问到林臻同学,教我怎么android应用隐藏到后台后保持用户在线,使用setBackground方法,然后定时ping

 
尝试隐藏到后台后,调用了setBackground方法  并设置了定时器进行ping方法的调用,短时间稳定
 
时间稍长,就经常jni层crash,如下图
 
不知是否我写的保持用户在线的方式不对,请问版主,可有任何参考代码?

您好,请给一下完整的crash信息,此外您的信令是最新版的吗?

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'Xiaomi/gemini/gemini:7.0/NRD90M/V8.5.2.0.NAACNED:user/release-keys'
Revision: '0'
ABI: 'arm64'
pid: 11878, tid: 11936, name: AgoraSDKLoop  >>> com.jiaoyou.baojian <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: 'jniInit'
    x0   0000000000000000  x1   0000000000002ea0  x2   0000000000000006  x3   0000000000000008
    x4   0000000000000068  x5   0000800000000000  x6   0000007fb7b11000  x7   0000000000000000
    x8   0000000000000083  x9   ffffffffffffffdf  x10  0000000000000000  x11  0000000000000001
    x12  ffffffffffffffff  x13  ffffffffffffffff  x14  0000000000000000  x15  001d6e6c434cdd58
    x16  0000007fb449ded0  x17  0000007fb4447638  x18  0000000000000000  x19  0000007f982854f8
    x20  0000000000000006  x21  0000007f98285450  x22  0000000000000000  x23  00000000000015c8
    x24  ffffffffffffffff  x25  0000007fb3bfc730  x26  0000007fb3b863e0  x27  0000007f9827ee61
    x28  0000007fb3b4c52b  x29  0000007f9827ed90  x30  0000007fb4444ac8
    sp   0000007f9827ed70  pc   0000007fb4447640  pstate 0000000060000000

backtrace:
    #00 pc 000000000006b640  /system/lib64/libc.so (tgkill+8)
    #01 pc 0000000000068ac4  /system/lib64/libc.so (pthread_kill+64)
    #02 pc 0000000000024010  /system/lib64/libc.so (raise+24)
    #03 pc 000000000001ca94  /system/lib64/libc.so (abort+52)
    #04 pc 000000000042cb9c  /system/lib64/libart.so (_ZN3art7Runtime5AbortEv+352)
    #05 pc 00000000000e4b24  /system/lib64/libart.so (_ZN3art10LogMessageD2Ev+1204)
    #06 pc 00000000002ec654  /system/lib64/libart.so (_ZN3art9JavaVMExt8JniAbortEPKcS2_+2172)
    #07 pc 00000000002ec928  /system/lib64/libart.so (_ZN3art9JavaVMExt9JniAbortVEPKcS2_St9__va_list+120)
    #08 pc 0000000000101780  /system/lib64/libart.so (_ZN3art11ScopedCheck6AbortFEPKcz+156)
    #09 pc 0000000000101190  /system/lib64/libart.so (_ZN3art11ScopedCheck11CheckThreadEP7_JNIEnv+544)
    #10 pc 00000000000fecc8  /system/lib64/libart.so (_ZN3art11ScopedCheck5CheckERNS_18ScopedObjectAccessEbPKcPNS_12JniValueTypeE+1120)
    #11 pc 00000000000f51cc  /system/lib64/libart.so (_ZN3art8CheckJNI14GetObjectClassEP7_JNIEnvP8_jobject+620)
    #12 pc 0000000000050584  /data/app/com.jiaoyou.baojian-1/lib/arm64/libagorasdk2.so
    #13 pc 0000000000053ef4  /data/app/com.jiaoyou.baojian-1/lib/arm64/libagorasdk2.so
    #14 pc 0000000000084bcc  /data/app/com.jiaoyou.baojian-1/lib/arm64/libagorasdk2.so
    #15 pc 00000000000bdc90  /data/app/com.jiaoyou.baojian-1/lib/arm64/libagorasdk2.so
    #16 pc 00000000000bd880  /data/app/com.jiaoyou.baojian-1/lib/arm64/libagorasdk2.so
    #17 pc 0000000000077e44  /data/app/com.jiaoyou.baojian-1/lib/arm64/libagorasdk2.so
    #18 pc 00000000000839e8  /data/app/com.jiaoyou.baojian-1/lib/arm64/libagorasdk2.so
    #19 pc 000000000009a148  /data/app/com.jiaoyou.baojian-1/lib/arm64/libagorasdk2.so
    #20 pc 0000000000085a68  /data/app/com.jiaoyou.baojian-1/lib/arm64/libagorasdk2.so (_ZNKSt8functionIFvvEEclEv+48)
    #21 pc 00000000000bef6c  /data/app/com.jiaoyou.baojian-1/lib/arm64/libagorasdk2.so
    #22 pc 000000000010cc00  /data/app/com.jiaoyou.baojian-1/lib/arm64/libagorasdk2.so
    #23 pc 000000000010ccfc  /data/app/com.jiaoyou.baojian-1/lib/arm64/libagorasdk2.so
    #24 pc 00000000001159f0  /data/app/com.jiaoyou.baojian-1/lib/arm64/libagorasdk2.so
    #25 pc 000000000010d534  /data/app/com.jiaoyou.baojian-1/lib/arm64/libagorasdk2.so (uv_run+296)
    #26 pc 00000000000bf174  /data/app/com.jiaoyou.baojian-1/lib/arm64/libagorasdk2.so
    #27 pc 00000000000844f8  /data/app/com.jiaoyou.baojian-1/lib/arm64/libagorasdk2.so
    #28 pc 0000000000059590  /data/app/com.jiaoyou.baojian-1/lib/arm64/libagorasdk2.so (Java_io_agora_NativeAgoraAPI_start+52)
    #29 pc 00000000000daf90  /system/lib64/libart.so (art_quick_generic_jni_trampoline+144)
    #30 pc 00000000000d19b4  /system/lib64/libart.so (art_quick_invoke_stub+580)
    #31 pc 00000000000de680  /system/lib64/libart.so (_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+204)
    #32 pc 000000000028c758  /system/lib64/libart.so (_ZN3art11interpreter34ArtInterpreterToCompiledCodeBridgeEPNS_6ThreadEPNS_9ArtMethodEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+312)
    #33 pc 0000000000285734  /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+592)
    #34 pc 0000000000551814  /system/lib64/libart.so (MterpInvokeSuper+2032)
    #35 pc 00000000000c4414  /system/lib64/libart.so (ExecuteMterpImpl+14356)

log已贴~~~

收到,有最新结果马上反馈您。

希望能尽快哦,现在主播端一直无法保持时刻在线,问题比较严重呢
或者能否提供一段保持在线的代码,是否我的调用方式不合理呢?

请问具体方法是什么呢,能提示一下吗?

你现在的问题是?