BelledonneCommunications / linphone-iphone

Linphone is a free VoIP and video softphone based on the SIP protocol. Mirror of linphone-iphone (git://git.linphone.org/linphone-iphone.git)
http://linphone.org
GNU General Public License v3.0
584 stars 348 forks source link

Incoming call make app crashes. #451

Open fedesenmartin opened 6 years ago

fedesenmartin commented 6 years ago

Hi

I have an issue when the apps get an incoming call. It only happens in one device.But I think is something related with this

Here is the crashLog ->

2018-07-03 11:09:36.249731-0300 linphone[1558:114296] Crash: -[__NSArray0 objectAtIndex:]: index 0 beyond bounds for empty NSArray 2018-07-03 11:09:36.450711-0300 linphone[1558:114296] Stack Trace: ( 0 CoreFoundation 0x00000001faccf978 + 176 1 libobjc.A.dylib 0x00000001f9f8052c objc_exception_throw + 56 2 CoreFoundation 0x00000001fac3bd0c + 108 3 linphone 0x000000010112ebc8 -[LinphoneManager audioRouteChangeListenerCallback:] + 416 4 CoreFoundation 0x00000001fac6b068 + 20 5 CoreFoundation 0x00000001fac6b034 + 64 6 CoreFoundation 0x00000001fac6a720 + 392 7 CoreFoundation 0x00000001fac6a3cc + 96 8 CoreFoundation 0x00000001facde060 + 1404 9 CoreFoundation 0x00000001fabba164 _CFXNotificationPost + 384 10 Foundation 0x00000001fb6383b4 + 68 11 AVFAudio 0x00000002014183f0 + 1140 12 AVFAudio 0x0000000201417964 + 1756 13 AudioToolbox 0x00000001feea7b70 + 800 14 AudioToolbox 0x00000001fef9dc7c + 224 15 AudioToolbox 0x00000001fefdea64 + 504 16 AudioToolbox 0x00000001fefe3600 + 288 17 AudioToolbox 0x00000001fefe288c + 1460 18 AudioToolbox 0x00000001fefe1f80 + 612 19 AudioToolbox 0x00000001fee9804c + 52 20 AudioToolbox 0x00000001ff1edc48 + 248 21 CoreFoundation 0x00000001fac821d8 + 56 22 CoreFoundation 0x00000001fac81910 + 448 23 CoreFoundation 0x00000001fac7f490 + 2152 24 CoreFoundation 0x00000001fabb8430 CFRunLoopRunSpecific + 436 25 AVFAudio 0x0000000201415a74 + 164 26 AVFAudio 0x000000020144258c + 88 27 libsystem_pthread.dylib 0x00000001fa8f65a4 + 132 28 libsystem_pthread.dylib 0x00000001fa8f64f8 _pthread_start + 48 29 libsystem_pthread.dylib 0x00000001fa8f5374 thread_start + 4 ) 2018-07-03 11:09:36.473655-0300 linphone[1558:114296] Terminating app due to uncaught exception 'NSRangeException', reason: ' -[__NSArray0 objectAtIndex:]: index 0 beyond bounds for empty NSArray' First throw call stack: (0x1faccf960 0x1f9f8052c 0x1fac3bd0c 0x10112ebc8 0x1fac6b068 0x1fac6b034 0x1fac6a720 0x1fac6a3cc 0x1facde060 0x1fabba164 0x1fb6383b4 0x2014183f0 0x201417964 0x1feea7b70 0x1fef9dc7c 0x1fefdea64 0x1fefe3600 0x1fefe288c 0x1fefe1f80 0x1fee9804c 0x1ff1edc48 0x1fac821d8 0x1fac81910 0x1fac7f490 0x1fabb8430 0x201415a74 0x20144258c 0x1fa8f65a4 0x1fa8f64f8 0x1fa8f5374) libc++abi.dylib: terminating with uncaught exception of type NSException

ghost commented 6 years ago

Hello,

at what lines does it crash ?

Thanks

fedesenmartin commented 6 years ago

LINE 2608 (LinphoneManager.m) -> NSString *route = newRoute.outputs[0].portType;

ghost commented 6 years ago

Does it happen on every call ? Can you post logs ?

Thanks

fedesenmartin commented 6 years ago

It happened in every call ,

I make a new branch with a change in LinphoneManager.m

if (newRoute) { // this

if (newRoute && [newRoute.outputs count]>=1) {// for this

And now the first call doest ring,but the app dont crash but it flash the screen, and the next calls are working fine without having to restart app.

Spyspyspy commented 6 years ago

I have the same bug too on iOs 12

HuangLiang-Jun commented 6 years ago

same issue on iOS12,I used the Linphone APP have the same issue too.

GiHutb commented 5 years ago

Looks like a ios12 bug. AVAudioSession fails to fill its properties. With a break point everything works fine but without breakpoints it just crash. I have put an if check for currentroute property then crashed occured inside iOS not in application code. Looks like iOS 12.2 does not have this problem. Btw I did this with totally a different application.