2017-07-04 55 views
0

由于pjsip导航应用程序应用程序导致崩溃,并且说您必须使用pjsip线程注册外部线程。我也regsitered PJSIP与主线程这样在进行任何调用之前,您必须使用PjSip线程注册外部线程

try { 
      mEndpoint.libRegisterThread(Thread.currentThread().getName()); 
      Log.d(TAG, "Registering with thread "+Thread.currentThread().getName()); 
     } catch (Exception e) { 
      e.printStackTrace(); 
     } 

这坠毁happend如此随意,不知道到底是什么造成这一点,我也不会调用任何PJSIP方法时坠毁happend。那么这里有什么问题?

07-04 14:36:18.183 32089-32097/com.safarifone.waafi A/libc: ../src/pj/os_core_unix.c:692: pj_thread_this: assertion "!"Calling pjlib from unknown/external thread. You must " "register external threads with pj_thread_register() " "before calling any pjlib functions."" failed 
    07-04 14:36:18.183 32089-32097/com.safarifone.waafi A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 32097 (FinalizerDaemon) 
    07-04 14:36:18.193 32089-32089/com.safarifone.waafi D/ContactListAdapter: user which is recently added and not sync... 
    07-04 14:36:18.203 32089-32089/com.safarifone.waafi D/ContactListAdapter: user which is recently added and not sync... 
    07-04 14:36:18.213 32089-32089/com.safarifone.waafi D/ContactListAdapter: user which is recently added and not sync... 
    07-04 14:36:18.243 326-326/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 
    07-04 14:36:18.243 326-326/? A/DEBUG: Build fingerprint: 'samsung/grandpplteser/grandpplte:6.0.1/MMB29T/G532FXWU1APK6:user/release-keys' 
    07-04 14:36:18.243 326-326/? A/DEBUG: Revision: '0' 
    07-04 14:36:18.243 326-326/? A/DEBUG: ABI: 'arm' 
    07-04 14:36:18.243 326-326/? A/DEBUG: pid: 32089, tid: 32097, name: FinalizerDaemon >>> com.safarifone.waafi <<< 
    07-04 14:36:18.243 326-326/? A/DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr -------- 
    07-04 14:36:18.273 326-326/? A/DEBUG: Abort message: '../src/pj/os_core_unix.c:692: pj_thread_this: assertion "!"Calling pjlib from unknown/external thread. You must " "register external threads with pj_thread_register() " "before calling any pjlib functions."" failed' 
    07-04 14:36:18.273 326-326/? A/DEBUG:  r0 00000000 r1 00007d61 r2 00000006 r3 b37c2978 
    07-04 14:36:18.273 326-326/? A/DEBUG:  r4 b37c2980 r5 b37c2930 r6 0000000b r7 0000010c 
    07-04 14:36:18.273 326-326/? A/DEBUG:  r8 00000000 r9 b4424f00 sl b37c1b20 fp b37c1a64 
    07-04 14:36:18.273 326-326/? A/DEBUG:  ip 00000006 sp b37c19d0 lr b6d4cdcd pc b6d4f1bc cpsr 400e0010 
    07-04 14:36:18.293 326-326/? A/DEBUG: backtrace: 
    07-04 14:36:18.293 326-326/? A/DEBUG:  #00 pc 000431bc /system/lib/libc.so (tgkill+12) 
    07-04 14:36:18.293 326-326/? A/DEBUG:  #01 pc 00040dc9 /system/lib/libc.so (pthread_kill+32) 
    07-04 14:36:18.293 326-326/? A/DEBUG:  #02 pc 0001c7e7 /system/lib/libc.so (raise+10) 
    07-04 14:36:18.293 326-326/? A/DEBUG:  #03 pc 00019a65 /system/lib/libc.so (__libc_android_abort+34) 
    07-04 14:36:18.293 326-326/? A/DEBUG:  #04 pc 00017600 /system/lib/libc.so (abort+4) 
    07-04 14:36:18.293 326-326/? A/DEBUG:  #05 pc 0001b3fb /system/lib/libc.so (__libc_fatal+16) 
    07-04 14:36:18.293 326-326/? A/DEBUG:  #06 pc 00019aed /system/lib/libc.so (__assert2+20) 
    07-04 14:36:18.293 326-326/? A/DEBUG:  #07 pc 0034be3c /data/app/com.safarifone.waafi-2/lib/arm/libpjsua2.so (pj_thread_this+84) 
    07-04 14:36:18.293 326-326/? A/DEBUG:  #08 pc 0034c9b8 /data/app/com.safarifone.waafi-2/lib/arm/libpjsua2.so (pj_mutex_lock+124) 
    07-04 14:36:18.293 326-326/? A/DEBUG:  #09 pc 001931c0 /data/app/com.safarifone.waafi-2/lib/arm/libpjsua2.so (PJSUA_LOCK+32) 
    07-04 14:36:18.293 326-326/? A/DEBUG:  #10 pc 00194e1c /data/app/com.safarifone.waafi-2/lib/arm/libpjsua2.so (pjsua_acc_set_user_data+268) 
    07-04 14:36:18.293 326-326/? A/DEBUG:  #11 pc 00156464 /data/app/com.safarifone.waafi-2/lib/arm/libpjsua2.so (_ZN2pj7AccountD2Ev+232) 
    07-04 14:36:18.293 326-326/? A/DEBUG:  #12 pc 000d6584 /data/app/com.safarifone.waafi-2/lib/arm/libpjsua2.so (_ZN20SwigDirector_AccountD2Ev+116) 
    07-04 14:36:18.293 326-326/? A/DEBUG:  #13 pc 000d65fc /data/app/com.safarifone.waafi-2/lib/arm/libpjsua2.so (_ZN20SwigDirector_AccountD0Ev+20) 
    07-04 14:36:18.293 326-326/? A/DEBUG:  #14 pc 00114764 /data/app/com.safarifone.waafi-2/lib/arm/libpjsua2.so (Java_org_pjsip_pjsua2_pjsua2JNI_delete_1Account+76) 
    07-04 14:36:18.293 326-326/? A/DEBUG:  #15 pc 000ea539 /system/lib/libart.so (art_quick_generic_jni_trampoline+40) 
    07-04 14:36:18.293 326-326/? A/DEBUG:  #16 pc 000e5e41 /system/lib/libart.so (art_quick_invoke_stub_internal+64) 
    07-04 14:36:18.293 326-326/? A/DEBUG:  #17 pc 003e92d9 /system/lib/libart.so (art_quick_invoke_static_stub+172) 
    07-04 14:36:18.293 326-326/? A/DEBUG:  #18 pc 00101c4c [stack:32097] 
+0

我开始以为这是出现这种原因的一般性错误。就我而言,情况是我开始两次同样的电话。 –

回答

0

貌似PJSIP对象之一是越来越由GC从比你所注册的另一个线程收集。

根据文档:

... application ‘’‘MUST immediately destroy PJSUA2 objects using object’s delete() 
method (in Java)’‘’, instead of relying on the GC to clean up the object 

所以你必须删除PJSIP手动对象,例如:

account.delete(); 

链接到GC问题official documentation

相关问题