react-native-pjsip icon indicating copy to clipboard operation
react-native-pjsip copied to clipboard

createAccount: Thread 1: signal SIGABRT

Open henrikbjorn opened this issue 6 years ago • 2 comments

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 avatar Nov 23 '18 10:11 henrikbjorn

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?

henrikbjorn avatar Nov 26 '18 18:11 henrikbjorn

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.

mdiflorio avatar Dec 10 '18 20:12 mdiflorio