azure-sdk-for-ios
azure-sdk-for-ios copied to clipboard
[BUG] Azure Communication Calling iOS SDK version 2.2.0 crashes on start call function
Describe the bug I am trying to start a one on one call using Azure CommunicationCalling sdk for iOS. I am getting a crash inside one of the sdk functions as shown in screenshot for backtrace below.
Exception or Stack Trace Exception:- *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil' terminating with uncaught exception of type NSException
Stack Trace:- Thread#0 0x00000001d70a6248 in __exceptionPreprocess () #1 0x00000001d0473a68 in objc_exception_throw () #2 0x00000001d724a6d4 in _CFThrowFormattedException () #3 0x00000001d72475cc in -[__NSArrayM insertObject:atIndex:].cold.1 () #4 0x00000001d70b0350 in -[__NSArrayM insertObject:atIndex:] () #5 0x000000010699cfe4 in -[ACSIdentifiers toMRIs:] () #6 0x000000010697b044 in -[ACSCallAgent startCall:options:withCompletionHandler:] () #7 0x0000000102500648 in CallManager.startCall(callee:successHandler:)
I have verified that call agent and communication identifier arr obj passed is not nil.
To Reproduce Steps to reproduce the behavior: simply getting a crash on execute the start call function.
Code Snippet Code for start call:-
func startCall(callee: String, successHandler: @escaping (Call?) -> Void ) {
// start call logic
debugPrint(callee)
let callees:[CommunicationIdentifier] = [CommunicationUserIdentifier(callee)]
debugPrint(callees)
self.callAgent?.startCall(participants: callees, options: StartCallOptions()) { (call, error) in
if let error = error {
debugPrint(error.localizedDescription)
successHandler(nil)
} else {
self.call = call
debugPrint("call placed successfully")
successHandler(call)
}
}
}
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Setup (please complete the following information):
- OS: iOS 16.0.3
- IDE : Xcode 14.0.1
- Azure Communication Calling Version:- 2.2.0
Additional context I have verified that call agent and communication identifier arr obj passed is not nil.
"8:acs:c95f80a2......" [<AzureCommunicationCommon.CommunicationUserIdentifier: 0x28323a580>]
@ashishpatill thanks for the report. @raosanat can you please take a look?
We are looking into these old bugs and closing, can you please try with latest version and if still reproducible, feel free to reopen.
Yes its fixed with next version released after i created the bug.