VoiSmart / pjsip-android

SIP Service for Android based on PJSIP
http://www.pjsip.org/
Apache License 2.0
290 stars 140 forks source link

Error while making second outgoing call while one call is till going on to make conference call #196

Closed hchauhansf closed 1 year ago

hchauhansf commented 1 year ago

Abort message: '../src/pj/os_core_unix.c:700: pj_thread_t *pj_thread_this(void): assertion "!"Calling pjlib from unknown/external thread. You must " "register external threads with pj_thread_register() " "before calling any pjlib functions."" failed'

    x0  0000000000000000  x1  0000000000001574  x2  0000000000000006  x3  0000007b93519a40
    x4  0080808080808080  x5  0080808080808080  x6  0080808080808080  x7  8080808080808080
    x8  00000000000000f0  x9  0000007c374d0b70  x10 0000000000000001  x11 0000007c37542004
    x12 0101010101010101  x13 00000000643d6c9a  x14 0006acd37449f200  x15 0000000000000010
    x16 0000007c375a9a48  x17 0000007c37583f30  x18 0000007b92562000  x19 0000000000001565
    x20 0000000000001574  x21 00000000ffffffff  x22 0000007ba30d2ef4  x23 0000007ba310660e
    x24 0000007baf000880  x25 0000007b9351b550  x26 0000000000000000  x27 0000007b9351b550
    x28 0000007b9351b450  x29 0000007b93519ac0
    lr  0000007c37533bbc  sp  0000007b93519a20  pc  0000007c37533be8  pst 0000000000000000
    backtrace:
    #00 pc 000000000008abe8  /apex/com.android.runtime/lib64/bionic/libc.so (abort+164) (BuildId: d8a8bbfdbc6a933b1d9eb2c4df04bb26)
    #01 pc 000000000008afb8  /apex/com.android.runtime/lib64/bionic/libc.so (__assert2+36) (BuildId: d8a8bbfdbc6a933b1d9eb2c4df04bb26)
    #02 pc 0000000000589c0c  /data/app/~~ekrqfDlWk_JQggTalUDzrw==/<package>-OZRlzQJ4ujqNhmiR8RNtyA==/lib/arm64/libpjsua2.so (pj_thread_this+116) (BuildId: 69dfd2f5d7a61abb87f953b9fe98831da87032c4)
    #03 pc 000000000059823c  /data/app/~~ekrqfDlWk_JQggTalUDzrw==/<package>-OZRlzQJ4ujqNhmiR8RNtyA==/lib/arm64/libpjsua2.so (pj_log+1956) (BuildId: 69dfd2f5d7a61abb87f953b9fe98831da87032c4)
    #04 pc 0000000000598af4  /data/app/~~ekrqfDlWk_JQggTalUDzrw==/<package>-OZRlzQJ4ujqNhmiR8RNtyA==/lib/arm64/libpjsua2.so (pj_log_4+160) (BuildId: 69dfd2f5d7a61abb87f953b9fe98831da87032c4)
    #05 pc 00000000002fff28  /data/app/~~ekrqfDlWk_JQggTalUDzrw==/<package>-OZRlzQJ4ujqNhmiR8RNtyA==/lib/arm64/libpjsua2.so (pjsua_call_hangup+460) (BuildId: 69dfd2f5d7a61abb87f953b9fe98831da87032c4)
    #06 pc 00000000002cd6e4  /data/app/~~ekrqfDlWk_JQggTalUDzrw==/<package>-OZRlzQJ4ujqNhmiR8RNtyA==/lib/arm64/libpjsua2.so (pj::Call::hangup(pj::CallOpParam const&)+272) (BuildId: 69dfd2f5d7a61abb87f953b9fe98831da87032c4)
    #07 pc 00000000002cd4b0  /data/app/~~ekrqfDlWk_JQggTalUDzrw==/<package>-OZRlzQJ4ujqNhmiR8RNtyA==/lib/arm64/libpjsua2.so (pj::Call::~Call()+228) (BuildId: 69dfd2f5d7a61abb87f953b9fe98831da87032c4)
    #08 pc 00000000001b8f64  /data/app/~~ekrqfDlWk_JQggTalUDzrw==/<package>-OZRlzQJ4ujqNhmiR8RNtyA==/lib/arm64/libpjsua2.so (SwigDirector_Call::~SwigDirector_Call()+108) (BuildId: 69dfd2f5d7a61abb87f953b9fe98831da87032c4)
    #09 pc 00000000001b8ff4  /data/app/~~ekrqfDlWk_JQggTalUDzrw==/<package>-OZRlzQJ4ujqNhmiR8RNtyA==/lib/arm64/libpjsua2.so (SwigDirector_Call::~SwigDirector_Call()+32) (BuildId: 69dfd2f5d7a61abb87f953b9fe98831da87032c4)
    #10 pc 0000000000233118  /data/app/~~ekrqfDlWk_JQggTalUDzrw==/<package>-OZRlzQJ4ujqNhmiR8RNtyA==/lib/arm64/libpjsua2.so (Java_org_pjsip_pjsua2_pjsua2JNI_delete_1Call+76) (BuildId: 69dfd2f5d7a61abb87f953b9fe98831da87032c4)
    #11 pc 0000000000461554  /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+148) (BuildId: 289d75599f6112d5757113220599e90b)
    #12 pc 0000000000209a9c  /apex/com.android.art/lib64/libart.so (nterp_helper+1948) (BuildId: 289d75599f6112d5757113220599e90b)
    #13 pc 0000000000023ef4  [anon:dalvik-classes6.dex extracted in memory from /data/app/~~ekrqfDlWk_JQggTalUDzrw==/<package>-OZRlzQJ4ujqNhmiR8RNtyA==/base.apk!classes6.dex] (org.pjsip.pjsua2.Call.delete+32)
    #14 pc 000000000020a254  /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 289d75599f6112d5757113220599e90b)
    #15 pc 0000000000023f40  [anon:dalvik-classes6.dex extracted in memory from /data/app/~~ekrqfDlWk_JQggTalUDzrw==/<package>-OZRlzQJ4ujqNhmiR8RNtyA==/base.apk!classes6.dex] (org.pjsip.pjsua2.Call.finalize+0)
    #16 pc 000000000212b5c0  /memfd:jit-cache (deleted) (java.lang.Daemons$FinalizerDaemon.doFinalize+272)
    #17 pc 000000000020a2b0  /apex/com.android.art/lib64/libart.so (nterp_helper+4016) (BuildId: 289d75599f6112d5757113220599e90b)
    #18 pc 000000000002a83c  /apex/com.android.art/javalib/core-libart.jar (java.lang.Daemons$FinalizerDaemon.runInternal+180)
    #19 pc 000000000020a254  /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 289d75599f6112d5757113220599e90b)
    #20 pc 000000000002a4f2  /apex/com.android.art/javalib/core-libart.jar (java.lang.Daemons$Daemon.run+50)
    #21 pc 000000000020b074  /apex/com.android.art/lib64/libart.so (nterp_helper+7540) (BuildId: 289d75599f6112d5757113220599e90b)
    #22 pc 00000000000f6740  /apex/com.android.art/javalib/core-oj.jar (java.lang.Thread.run+8)
    #23 pc 0000000000457b6c  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+556) (BuildId: 289d75599f6112d5757113220599e90b)
    #24 pc 0000000000484e54  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+156) (BuildId: 289d75599f6112d5757113220599e90b)
    #25 pc 0000000000484b20  /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeVirtualOrInterfaceWithJValues<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, jvalue const*)+400) (BuildId: 289d75599f6112d5757113220599e90b)
    #26 pc 00000000005ce334  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1684) (BuildId: 289d75599f6112d5757113220599e90b)
    #27 pc 00000000000ef678  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+208) (BuildId: d8a8bbfdbc6a933b1d9eb2c4df04bb26)
    #28 pc 000000000008c30c  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: d8a8bbfdbc6a933b1d9eb2c4df04bb26)``
hchauhansf commented 1 year ago

My requirement is, We have one call going on and we want to add another call to conference, first call is working fine, but when I try to add another call, my first call gets onHold and after that the crash happens, either while dialing the number or sometimes at time when receiver picks up the call.

aenonGit commented 1 year ago

as you can read from the README, multiple calls and or conference calls are not supported yet, but feel free to make a proper PR to fix that

hchauhansf commented 1 year ago

I am also getting the same error in simple one to one calling as well. Atleast from logs can you say what is the issue happening with call?

aenonGit commented 1 year ago

what version are you using?