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

createAccount: Thread 1: signal SIGABRT #151

Open henrikbjorn opened 5 years ago

henrikbjorn commented 5 years ago

Hey

When developing our React Native app we consistenly see the error "Thread 1: signal SIGABRT" in XCode that points status = pjsua_acc_add(&cfg, PJ_TRUE, &account_id); after a few reloads in the simulator or on the device.

We are using redux-saga and dispatches a INIT that calls yield endpoint.start() (no difference in changing into using await).

Is this because the pjsip thread in the background reregisters an account and it can only handle x registered accounts? Or are we doing something stupid?

henrikbjorn commented 5 years ago

Looking at the source it seems that this is the culprit. https://github.com/datso/react-native-pjsip/blob/master/ios/RTCPjSip/PjSipEndpoint.m#L27 any reason for the random 12 item limit?

mdiflorio commented 5 years ago

It seems to me like you are trying to keep creating new accounts rather than using the one that is stored in the endpoint. The other option is to delete all the accounts in the endpoint on device launch.

I can't really see a reason to have more than 12 accounts.