Crash when starting new call immediately after finishing other one

Description
During testing of MobileRTC SDK implementation, I’ve got into a crash scenario. It is SIGSEGV crash inside MobileRTC SDK.

Which version?
v5.2.41735.0928

To Reproduce(If applicable)
Steps to reproduce the behavior:

  1. Join zoom meeting using meetingService.joinMeeting(with: params)
  2. Wait until onInitMeetingView is called
  3. Call meetingService?.leaveMeeting(with: LeaveMeetingCmd_Leave)
  4. Wait until onMeetingEndedReson callback triggered
  5. Call again meetingService.joinMeeting(with: params)
    After this step we have 3 different scenarios how SDK will behave
    Scenario 1.
    meetingService.joinMeeting(with: params) called in 500+ ms, it mostly pulls through and SDK behaves as expected
    Scenario 2
    meetingService.joinMeeting(with: params) called immediately after we onMeetingEndedReson was called. Here we are getting MobileRTCMeetError_InAnotherMeeting error. The next call to meetingService.joinMeeting(with: params) succedes
    Scenario 3
    meetingService.joinMeeting(with: params) called in range of 150 - 300 ms. In this scenario onInitMeetingView is never called (at least not called in 15 seconds that we are waiting for it). After we cancel this attempt because we reached a 15-sec timeout and starting
    meetingService.joinMeeting(with: params) once again everything looks pretty normal, we are getting onInitMeetingView callback, the call goes through to the recipient, but when recipient picks up and meeting should start on the Mobile side we are getting crash.

Smartphone (please complete the following information):

  • Device: iPad 6
  • OS: iOS 14.0.1

Additional context
We are using MobileRTC SDK for video calls with custom UI build upon MobileRTCVideoView using iOS native SDK
Crash Log

Date/Time:           2020-10-21 17:16:55.1593 +0300
Launch Time:         2020-10-21 17:15:46.0822 +0300
OS Version:          iPhone OS 14.0.1 (18A393)
Release Type:        User
Baseband Version:    8.02.01
Report Version:      104

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000741403b0e060
VM Region Info: 0x741403b0e060 is not in any region.  Bytes after previous region: 127148273754209  
      REGION TYPE                      START - END             [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      commpage (reserved)          1000000000-7000000000       [384.0G] ---/--- SM=NUL  ...(unallocated)
--->  
      UNUSED SPACE AT END

Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [433]
Triggered by Thread:  0

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libobjc.A.dylib               	0x000000019b1c137c lookUpImpOrForward + 72
1   libobjc.A.dylib               	0x000000019b1ac980 _objc_msgSend_uncached + 64
2   libobjc.A.dylib               	0x000000019b1ac980 _objc_msgSend_uncached + 64
3   MobileRTC                     	0x0000000102c11e88 0x102a04000 + 2154120
4   MobileRTC                     	0x0000000102c11d30 0x102a04000 + 2153776
5   MobileRTC                     	0x0000000102c119ac 0x102a04000 + 2152876
6   MobileRTC                     	0x0000000102ab4024 0x102a04000 + 720932
7   UIKitCore                     	0x000000018a6ce954 -[UIView+ 16935252 (CALayerDelegate) layoutSublayersOfLayer:] + 2464
8   QuartzCore                    	0x000000018abce9e8 -[CALayer layoutSublayers] + 288
9   QuartzCore                    	0x000000018abd4eb4 CA::Layer::layout_if_needed+ 1420980 (CA::Transaction*) + 520
10  QuartzCore                    	0x000000018abe01d0 CA::Layer::layout_and_display_if_needed+ 1466832 (CA::Transaction*) + 140
11  QuartzCore                    	0x000000018ab2c500 CA::Context::commit_transaction+ 730368 (CA::Transaction*, double, double*) + 416
12  QuartzCore                    	0x000000018ab56698 CA::Transaction::commit+ 902808 () + 728
13  QuartzCore                    	0x000000018ab57948 CA::Transaction::observer_callback+ 907592 (__CFRunLoopObserver*, unsigned long, void*) + 92
14  CoreFoundation                	0x0000000187908ecc __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
15  CoreFoundation                	0x00000001879035b0 __CFRunLoopDoObservers + 604
16  CoreFoundation                	0x0000000187903af8 __CFRunLoopRun + 960
17  CoreFoundation                	0x0000000187903200 CFRunLoopRunSpecific + 572
18  GraphicsServices              	0x000000019d9fe598 GSEventRunModal + 160
19  UIKitCore                     	0x000000018a1c9004 -[UIApplication _run] + 1052
20  UIKitCore                     	0x000000018a1ce5d8 UIApplicationMain + 164
21  Runner                        	0x00000001004e872c main + 558892 (main.swift:1)
22  libdyld.dylib                 	0x00000001875e2598 start + 4

Hello @yostrovskyi

Thank you for using the dev forum!

Thank you for bringing this to our attention. I apologize you are experiencing this, crashes are unacceptable. There were various meeting related crashes identified in that version of the SDK. The team has released a new hotfix version that was built to target the bug that caused these crashes. Could you please update to v5.2.41739.1022?

Please let us know if you experience any other issues or if the crashes are not resolved in that version.
Thanks!
Michael