My WebRTC randomly crashes with Fatal signal 6 error. Specially on low networks. Can anyone please tell me what the reason can be or has any idea. I'm using Openvidu Android Client for WebRTC implementation.
Stack Trace :
01-18 18:33:44.275 F/libc ( 656): Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 1191 (TimeCheckThread), pid 656 (audioserver)
01-18 18:33:44.445 F/DEBUG (10961): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
01-18 18:33:44.445 F/DEBUG (10961): Build fingerprint: 'Android/sdm710/sdm710:9/MyCompany_1.6_0902/ubuntu09021542:user/test-keys'
01-18 18:33:44.445 F/DEBUG (10961): Revision: '0'
01-18 18:33:44.445 F/DEBUG (10961): ABI: 'arm'
01-18 18:33:44.445 F/DEBUG (10961): pid: 656, tid: 1191, name: TimeCheckThread >>> /system/bin/audioserver <<<
01-18 18:33:44.445 F/DEBUG (10961): signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
01-18 18:33:44.445 F/DEBUG (10961): Abort message: 'TimeCheck timeout for IAudioPolicyService: 1'
01-18 18:33:44.446 F/DEBUG (10961): r0 00000000 r1 000004a7 r2 00000006 r3 e6406568
01-18 18:33:44.446 F/DEBUG (10961): r4 00000290 r5 000004a7 r6 e1a494a4 r7 0000010c
01-18 18:33:44.446 F/DEBUG (10961): r8 e174f76c r9 e389e428 r10 e62efccc r11 3b9aca00
01-18 18:33:44.446 F/DEBUG (10961): ip e64103cc sp e1a49490 lr e637c245 pc e6373036
I found the solution, looks like this issue was device specific and required some configurations. From logs its clear that device's audioserver was crashing on a very rudimentary level. I switched from using MODE_IN_CALL to MODE_IN_COMMUNICATION for speakerphone and mic both and this issue disappeared. It's a weird issue and the solution is even weirder but it works. The device I was using was a AR Smart Glass that has a mic continuously 'on' to listen to your voice commands, I think that was the culprit or maybe misconfigured hardware drivers.