Azure / Communication

Azure Communication Services - SDKs and Release Notes
MIT License
317 stars 98 forks source link

[iOS] Simulator crash when there is a user join with camera on randomly #408

Open AmyL219 opened 2 years ago

AmyL219 commented 2 years ago

Describe the bug 1.Join in a group call through simulator 2.Use web/app to join the same group call with camera on as a new participant 3.Find the SwiftUI app could crash in AVMakeRectWithAspectRatioFill(CGSize,int) function

Expected behavior Simulator shouldn't crash

Screenshots

Screen Shot 2021-10-28 at 10 56 55 AM

iOS SDK version:

AmyL219 commented 2 years ago

https://skype.visualstudio.com/SPOOL/_workitems/edit/2629990

Did some debugging and found the crash issues is because of the rendererView is created by scalingMode: .crop with the SwiftUI env. CallingSDK testing app use .fit mode, so their app didn't crash. But after changing the testing app scalingMode into crop, it eventually crashed at same place. (See the attachment pic) If we changed our composite rendererView creation to non-option mode (which make it default to be .fit mode), there is no more composite crash in simulator any more. But the view may not fit the designer requirement.

Screen Shot 2021-11-01 at 11 25 16 PM