datso / react-native-pjsip

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

keep_alive_timer_cb crash on IOS #129

Closed mdiflorio closed 5 years ago

mdiflorio commented 5 years ago

Seem to be getting on iPhone X, doesn't happen on other iPhones as far as I can tell.

EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000048

with the callback keep_alive_timer_cb. Do you have any idea what could be causing this? @datso, seeing as keep_alive_timer_cb isn't directly in your repo but is in PJSIP?

# Platform: ios
# Application: uConnected
# Version: 0.0.1 (16)
# Bundle Identifier: au.com.uconnected.app-1
# Issue #: 22
# Issue ID: 5b835d646007d59fcde9cbf9
# Session ID: 981ff76718184ee9ae7d835f3dc262a0_DNE_0_v2
# Date: 2018-09-20T11:40:00Z
# OS Version: 12.1.0 (16B5059d)
# Device: iPhone X
# RAM Free: 6.8%
# Disk Free: 47%

#8. Crashed: Thread
0  app                    0x1006deb0c keep_alive_timer_cb + 1577860
1  app                    0x100755da0 pj_timer_heap_poll + 2065944
2  app                    0x100606530 pjsip_endpt_handle_events2 + 691624
3  app                    0x1006f183c pjsua_handle_events + 1654964
4  app                    0x1006f0d20 worker_thread + 1652120
5  app                    0x10073bdbc thread_main + 1959476
6  libsystem_pthread.dylib        0x2120212ac <redacted> + 128
7  libsystem_pthread.dylib        0x21202120c _pthread_start + 48
8  libsystem_pthread.dylib        0x212024cf4 thread_start + 4

EDIT

If any one else is having this same issue. You can disable the keep_alive_timer by adding

 cfg.ka_interval = 0;

After

        pjsua_acc_config cfg;
        pjsua_acc_config_default(&cfg);

in PjSipAccount.m