c++ - How to investigate and fix libpjsua2.so crash -


sigsegv segv_maperr @ 0x00000008  0  libpjsua2.so                   0x56585a88 pj::call::getinfo() const 1  libpjsua2.so                   0x56546b44 std::allocator<pj::callmediainfo>::allocator() 

i'm using pjsip 1 of hobby project(complies gpl). above can see stacktrace received crashlytics. i'm using java wrapper pjsip.

there lot of users(50 %) affected error, i'm not able reproduce on local devices.

not sure suspect following java call lead error. call c++ via jni

public void notifycallstate(mycall call) {     if (currentcall == null || call.getid() != currentcall.getid())         return;      callinfo ci;     try {         ci = call.getinfo();     } catch (exception e) {         ci = null;     }     message m = message.obtain(handler, msg_type.call_state, ci);     m.sendtotarget();      if (ci != null && ci.getstate() == pjsip_inv_state.pjsip_inv_state_disconnected) {         currentcall = null;     } } 

code snippet taken examples come psjua download. link http repo. code same. highly appreciated

from stacktrace looks call null, , getid method @ 0x8 offset.

if that's case, fix make sure notifycallstate isn't called null argument, or check inside method, i.e.:

if (call == null || currentcall == null || call.getid() != currentcall.getid())     return; 

Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -