datso / react-native-pjsip

A PJSIP module for React Native.
http://datso.github.io/react-native-pjsip
GNU General Public License v3.0
273 stars 232 forks source link

Problem with call on Android devices #74

Closed max-konin closed 6 years ago

max-konin commented 6 years ago

Hi

I faced out with strange bug on android devices.

During the call, the application crashes with an error

Build fingerprint: 'Xiaomi/rolex/rolex:6.0.1/MMB29M/V8.5.7.0.MCCMIED:user/release-keys'
Revision: '0'
ABI: 'arm'
pid: 13860, tid: 14053, name: Thread-3375  >>> com.example <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x4
    r0 00000000  r1 d590f24c  r2 00000000  r3 00000000
    r4 00007f08  r5 131f6e20  r6 12f193d0  r7 1344c2e0
    r8 131f6e20  r9 abb48aa8  sl 13328060  fp 12fe9ea0
    ip d739a083  sp d590f220  lr d739a08f  pc d73aa75e  cpsr 200f0030

backtrace:
    #00 pc 000da75e  /data/app/com.example-1/lib/arm/libpjsua2.so (_ZNK2pj7Account9isDefaultEv+17)

(on emulator it works fine)

datso commented 6 years ago

Hi, does this error appears during the call (e.g. after some seconds/actions) or at the initialization step ?

max-konin commented 6 years ago

Appears during the call

datso commented 6 years ago

Ok, please provide an output from the adb logcat(github gist, from the start till the error), current log doesn't show the details.

max-konin commented 6 years ago

@datso, gist: https://gist.github.com/max-konin/56445334fb971d81eb141e74f8290d81

max-konin commented 6 years ago

@datso Do you have any ideas about it? This beginning appears after upgrade to react-native 0.53 & react-native-pjsip 2.x. I tried to downgrade react-native-pjsip to 0.1.1 but the errors still occurs.

datso commented 6 years ago

Did you try on another native device ? Does this problem appears only on that model ?

datso commented 6 years ago

I think that you delete the account during the call, this probably is an issue.

PjSipService: Handle "account_delete" action ({"callback_id":97,"account_id":0})

datso commented 6 years ago

And it crashes when call event cause an access to account that doesn't exist.

max-konin commented 6 years ago

Did you try on another native device ? Does this problem appears only on that model ?

I try > 5 android devices. All have this error

The biggest oddity is that if I build apk with "debug" mode then it works fine on a device) (ios works fine always)

datso commented 6 years ago

@max-konin Please remove the code that related to account delete, as I see that you delete the account during the call. I think this is a bug on JS side.

max-konin commented 6 years ago

@datso yes. it helped me. Account was recreated during the call... Thx!