azure-sdk-for-ios
azure-sdk-for-ios copied to clipboard
[BUG] During multiple leave/join actions on Teams meeting it crashes
Describe the bug When User leaves and joins Teams meeting multiple times app crashes.
Exception or Stack Trace
* thread #72, queue = 'com.apple.root.user-initiated-qos', stop reason = EXC_BAD_ACCESS (code=1, address=0x3938303531304065)
frame #0: 0x000000010349edb8 AzureCommunicationCalling`SkyLib::Video::Stop(GI::String const&) + 264
AzureCommunicationCalling`SkyLib::Video::Stop:
-> 0x10349edb8 <+264>: ldr x8, [x21]
0x10349edbc <+268>: ldr x8, [x8, #0x70]
0x10349edc0 <+272>: mov x0, x21
0x10349edc4 <+276>: mov x1, x20
Target 0: (Runner) stopped.
To Reproduce Steps to reproduce the behaviour:
- Join Teams meeting to Lobby.
- Leave Teams Lobby.
- Repeat it even 50 times.
- App crashes.
Code Snippet This is our code to leave meeting action:
func dispose() {
preview.dispose()
previewRenderer.delegate = nil
previewRenderer.dispose()
acsCall = nil
callAgent?.delegate = nil
deviceManager?.delegate = nil
deviceManager = nil
// Some cleanup tasks take too long, so we do it in another thread to not block the UI
DispatchQueue.global().async { [weak self] in
self?.callAgent?.dispose()
self?.callAgent = nil
self?.callClient?.dispose()
self?.callClient = nil
}
}
We moved disposing callAgent and callClient to separate thread according to your advice from: https://issuemode.com/issues/Azure/Communication/1395533#answer-1822504
Expected behavior App shouldn't crash.
Setup (please complete the following information):
- OS: iOS 14.7.1 iPhone 6s Plus
- IDE : XCode
- Version of the Library used: AzureCommunicationCalling (2.0.0)
PODS:
AzureCommunicationCalling (2.0.0):
AzureCommunicationCommon (~> 1.0.2)
AzureCommunicationCommon (1.0.3)
@raosanat can you transfer this to your repo for action?
Unfortuanatelly, it still occurs on ACS v.2.2.0. This issue is more reproducible when during beeing in Lobby app goes to background and then is moved back to foreground. Then when finishing call app crashes. Moreover, we are calling ACSCall.stopVideo() method before hangUp() method, but it doesn't help.
@dudeck I'm not able to repro currently. What is the business scenario for this? What's the situation for needing to continually join/leave lobby?
@DaybreakQuip, I'm on the same team as @dudeck.
It's not a business scenario, it's an edge case discovered in exploratory testing. It's concerning though since it might point to a problem that can manifest in scenarios yet untested.
Is there any way we can assist you to repro?
@zolhu Since Ze can't repro the issue, I'm going to close the bug as no repro. If you are still able to repro on your end, can you please attach a video of the 50 tries and crash at the end.
Tested on 2.4.0-alpha.1 and couldn't reproduce.