因为我正在使用PJSIP库进行Sip调用,因为我面临着JNI的一个问题。当我从一个sip设备呼叫到其他sip设备时,有时它工作正常。但有时它在拿起电话时会崩溃。
这是我的错误日志:
04-06 14:45:31.605 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/java_vm_ext.cc:470] JNI DETECTED ERROR IN APPLICATION: use of invalid jobject 0x84ba9d14
04-06 14:45:31.605 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/java_vm_ext.cc:470] from byte[] org.pjsip.pjsua.pjsuaJNI.acc_get_user_data(int)
04-06 14:45:31.605 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/java_vm_ext.cc:470] "SipService.Executor" prio=5 tid=21 Runnable
04-06 14:45:31.605 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/java_vm_ext.cc:470] | group="main" sCount=0 dsCount=0 obj=0x12c30280 self=0x6c7e5200
04-06 14:45:31.605 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/java_vm_ext.cc:470] | sysTid=17992 nice=0 cgrp=default sched=0/0 handle=0x7a304920
04-06 14:45:31.605 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/java_vm_ext.cc:470] | state=R schedstat=( 638596942 799712450 3515 ) utm=45 stm=18 core=3 HZ=100
04-06 14:45:31.605 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/java_vm_ext.cc:470] | stack=0x7a202000-0x7a204000 stackSize=1038KB
04-06 14:45:31.605 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/java_vm_ext.cc:470] | held mutexes= "mutator lock"(shared held)
04-06 14:45:31.605 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/java_vm_ext.cc:470] native: #00 pc 00351b41 /system/lib/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv+128)
04-06 14:45:31.605 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/java_vm_ext.cc:470] native: #01 pc 00332139 /system/lib/libart.so (_ZNK3art6Thread9DumpStackERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEbP12BacktraceMap+304)
04-06 14:45:31.605 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/java_vm_ext.cc:470] native: #02 pc 0023a3f3 /system/lib/libart.so (_ZN3art9JavaVMExt8JniAbortEPKcS2_+846)
04-06 14:45:31.605 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/java_vm_ext.cc:470] native: #03 pc 0023a99f /system/lib/libart.so (_ZN3art9JavaVMExt9JniAbortFEPKcS2_z+66)
04-06 14:45:31.605 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/java_vm_ext.cc:470] native: #04 pc 00335bd7 /system/lib/libart.so (_ZNK3art6Thread13DecodeJObjectEP8_jobject+302)
04-06 14:45:31.605 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/java_vm_ext.cc:470] native: #05 pc 003f53d7 /system/lib/libart.so (_ZN3art25JniMethodEndWithReferenceEP8_jobjectjPNS_6ThreadE+30)
04-06 14:45:31.605 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/java_vm_ext.cc:470] native: #06 pc 000cc6d7 /data/app/com.xxx.xxx-2/oat/arm/base.odex (Java_org_pjsip_pjsua_pjsuaJNI_acc_1get_1user_1data__I+90)
04-06 14:45:31.605 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/java_vm_ext.cc:470] at org.pjsip.pjsua.pjsuaJNI.acc_get_user_data(Native method)
04-06 14:45:31.605 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/java_vm_ext.cc:470] at org.pjsip.pjsua.pjsua.acc_get_user_data(pjsua.java:275)
04-06 14:45:31.605 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/java_vm_ext.cc:470] - locked <0x072777df> (a java.lang.Class<org.pjsip.pjsua.pjsua>)
04-06 14:45:31.605 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/java_vm_ext.cc:470] at com.xxx.xxx.pjsip.UAStateReceiver.on_call_media_state(UAStateReceiver.java:404)
04-06 14:45:31.605 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/java_vm_ext.cc:470] at org.pjsip.pjsua.pjsuaJNI.SwigDirector_Callback_on_call_media_state(pjsuaJNI.java:1395)
04-06 14:45:31.605 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/java_vm_ext.cc:470] at org.pjsip.pjsua.pjsuaJNI.call_answer2(Native method)
04-06 14:45:31.605 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/java_vm_ext.cc:470] at org.pjsip.pjsua.pjsua.call_answer2(pjsua.java:399)
04-06 14:45:31.605 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/java_vm_ext.cc:470] - locked <0x072777df> (a java.lang.Class<org.pjsip.pjsua.pjsua>)
04-06 14:45:31.605 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/java_vm_ext.cc:470] at com.xxx.xxx.pjsip.PjSipService.callAnswer(PjSipService.java:1178)
04-06 14:45:31.605 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/java_vm_ext.cc:470] at com.xxx.xxx.service.SipService$1$7.runWithReturn(SipService.java:352)
04-06 14:45:31.605 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/java_vm_ext.cc:470] at com.xxx.xxx.service.SipService$ReturnRunnable.doRun(SipService.java:2116)
04-06 14:45:31.605 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/java_vm_ext.cc:470] at com.xxx.xxx.service.SipService$SipRunnable.run(SipService.java:2086)
04-06 14:45:31.605 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/java_vm_ext.cc:470] at com.xxx.xxx.service.SipService$SipServiceExecutor.executeInternal(SipService.java:1964)
04-06 14:45:31.605 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/java_vm_ext.cc:470] at com.xxx.xxx.service.SipService$SipServiceExecutor.handleMessage(SipService.java:1956)
04-06 14:45:31.605 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/java_vm_ext.cc:470] at android.os.Handler.dispatchMessage(Handler.java:102)
04-06 14:45:31.605 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/java_vm_ext.cc:470] at android.os.Looper.loop(Looper.java:154)
04-06 14:45:31.605 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/java_vm_ext.cc:470] at android.os.HandlerThread.run(HandlerThread.java:61)
04-06 14:45:31.605 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/java_vm_ext.cc:470]
04-06 14:45:31.777 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/runtime.cc:422] Runtime aborting...
04-06 14:45:31.777 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/runtime.cc:422] Aborting thread:
04-06 14:45:31.777 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/runtime.cc:422] "SipService.Executor" prio=5 tid=21 Native
04-06 14:45:31.777 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/runtime.cc:422] | group="" sCount=0 dsCount=0 obj=0x12c30280 self=0x6c7e5200
04-06 14:45:31.777 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/runtime.cc:422] | sysTid=17992 nice=0 cgrp=default sched=0/0 handle=0x7a304920
04-06 14:45:31.777 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/runtime.cc:422] | state=R schedstat=( 668576109 799991992 3519 ) utm=46 stm=20 core=3 HZ=100
04-06 14:45:31.777 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/runtime.cc:422] | stack=0x7a202000-0x7a204000 stackSize=1038KB
04-06 14:45:31.777 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/runtime.cc:422] | held mutexes= "abort lock"
04-06 14:45:31.777 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/runtime.cc:422] native: #00 pc 00351b41 /system/lib/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv+128)
04-06 14:45:31.777 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/runtime.cc:422] native: #01 pc 00332139 /system/lib/libart.so (_ZNK3art6Thread9DumpStackERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEbP12BacktraceMap+304)
04-06 14:45:31.777 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/runtime.cc:422] native: #02 pc 003251b1 /system/lib/libart.so (_ZNK3art10AbortState10DumpThreadERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEPNS_6ThreadE+24)
04-06 14:45:31.777 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/runtime.cc:422] native: #03 pc 00325039 /system/lib/libart.so (_ZNK3art10AbortState4DumpERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEE+424)
04-06 14:45:31.777 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/runtime.cc:422] native: #04 pc 0031bd45 /system/lib/libart.so (_ZN3art7Runtime5AbortEPKc+92)
04-06 14:45:31.777 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/runtime.cc:422] native: #05 pc 000b52eb /system/lib/libart.so (_ZN3art10LogMessageD2Ev+1134)
04-06 14:45:31.777 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/runtime.cc:422] native: #06 pc 0023a6d5 /system/lib/libart.so (_ZN3art9JavaVMExt8JniAbortEPKcS2_+1584)
04-06 14:45:31.777 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/runtime.cc:422] native: #07 pc 0023a99f /system/lib/libart.so (_ZN3art9JavaVMExt9JniAbortFEPKcS2_z+66)
04-06 14:45:31.777 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/runtime.cc:422] native: #08 pc 00335bd7 /system/lib/libart.so (_ZNK3art6Thread13DecodeJObjectEP8_jobject+302)
04-06 14:45:31.777 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/runtime.cc:422] native: #09 pc 003f53d7 /system/lib/libart.so (_ZN3art25JniMethodEndWithReferenceEP8_jobjectjPNS_6ThreadE+30)
04-06 14:45:31.777 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/runtime.cc:422] native: #10 pc 000cc6d7 /data/app/com.xxx.xxx-2/oat/arm/base.odex (???)
04-06 14:45:31.777 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/runtime.cc:422] at org.pjsip.pjsua.pjsuaJNI.acc_get_user_data(Native method)
04-06 14:45:31.777 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/runtime.cc:422] at org.pjsip.pjsua.pjsua.acc_get_user_data(pjsua.java:275)
04-06 14:45:31.777 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/runtime.cc:422] - locked <0x072777df> (a java.lang.Class<org.pjsip.pjsua.pjsua>)
04-06 14:45:31.777 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/runtime.cc:422] at com.xxx.xxx.pjsip.UAStateReceiver.on_call_media_state(UAStateReceiver.java:404)
04-06 14:45:31.777 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/runtime.cc:422] at org.pjsip.pjsua.pjsuaJNI.SwigDirector_Callback_on_call_media_state(pjsuaJNI.java:1395)
04-06 14:45:31.777 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/runtime.cc:422] at org.pjsip.pjsua.pjsuaJNI.call_answer2(Native method)
04-06 14:45:31.777 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/runtime.cc:422] at org.pjsip.pjsua.pjsua.call_answer2(pjsua.java:399)
04-06 14:45:31.777 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/runtime.cc:422] - locked <0x072777df> (a java.lang.Class<org.pjsip.pjsua.pjsua>)
04-06 14:45:31.777 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/runtime.cc:422] at com.xxx.xxx.pjsip.PjSipService.callAnswer(PjSipService.java:1178)
04-06 14:45:31.777 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/runtime.cc:422] at com.xxx.xxx.service.SipService$1$7.runWithReturn(SipService.java:352)
04-06 14:45:31.777 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/runtime.cc:422] at com.xxx.xxx.service.SipService$ReturnRunnable.doRun(SipService.java:2116)
04-06 14:45:31.777 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/runtime.cc:422] at com.xxx.xxx.service.SipService$SipRunnable.run(SipService.java:2086)
04-06 14:45:31.777 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/runtime.cc:422] at com.xxx.xxx.service.SipService$SipServiceExecutor.executeInternal(SipService.java:1964)
04-06 14:45:31.777 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/runtime.cc:422] at com.xxx.xxx.service.SipService$SipServiceExecutor.handleMessage(SipService.java:1956)
04-06 14:45:31.777 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/runtime.cc:422] at android.os.Handler.dispatchMessage(Handler.java:102)
04-06 14:45:31.777 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/runtime.cc:422] at android.os.Looper.loop(Looper.java:154)
04-06 14:45:31.777 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/runtime.cc:422] at android.os.HandlerThread.run(HandlerThread.java:61)
04-06 14:45:31.777 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/runtime.cc:422] Dumping all threads without appropriate locks held: thread list lock mutator lock
04-06 14:45:31.777 17940-17992/com.xxx.xxx:sipStack A/art: art/runtime/runtime.cc:422] All threads:
为什么我面临Jni检测到错误的问题。任何想法,请分享到这里。
提前致谢