KERN_INVALID_ADDRESS at 0x000000094d164c50

Description
We are integrating the Zoom iOS SDK into Xamarin forms.
What we experience is that after we successfully initialize the SDK using SdkAuth, if we join a meeting we receive a successful result but 8 times on 10 the application goes in crash.

If we wait 5-7 seconds from the SDK authentication and then we join the meeting, we are able to successfully join the meeting 8 times on 10.
Of course we check if MobileRTC.IsRTCAuthorized returns true and mobileRTC.GetMeetingService() is not null before joining in any case.
Both the SdkAuth and the JoinMeetingWithJoinParam methods are called in the device main thread.

We are using the standard UI to join the meeting.

Which iOS Meeting SDK version?
iOS v5.11.10.4556

Error details
From XCode the logs we can retrieve are all like this:

Incident Identifier: F9FD4934-5CE9-481C-B59E-45008A6E87A7
CrashReporter Key:   551e92c3bf02736950a1edacd8ebb3325ca418f3
Hardware Model:      iPad5,3
Process:             Progotan.App.iOS [12368]
Path:                /private/var/containers/Bundle/Application/A193D20F-3841-44CA-956C-D71EA15CDABF/Progotan.App.iOS.app/Progotan.App.iOS
Identifier:          com.progotan.progotanone
Version:             1.3.0-Upgrade (1.3.0-Upgrade)
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           com.progotan.progotanone [619]

Date/Time:           2022-09-14 19:20:43.0190 +0200
Launch Time:         2022-09-14 19:19:47.6431 +0200
OS Version:          iPhone OS 15.7 (19H12)
Release Type:        User
Report Version:      104

Exception Type:  EXC_BAD_ACCESS (SIGKILL)
Exception Subtype: KERN_INVALID_ADDRESS at 0x000000094d164c50
Exception Codes: 0x0000000000000001, 0x000000094d164c50
VM Region Info: 0x94d164c50 is not in any region.  Bytes after previous region: 28673723473  Bytes before following region: 27697722288
      REGION TYPE                 START - END      [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      MALLOC_NANO              2829e8000-2a0000000 [470.1M] rw-/rwx SM=ZER  
--->  GAP OF 0xd20000000 BYTES
      commpage (reserved)      fc0000000-1000000000 [  1.0G] ---/--- SM=NUL  ...(unallocated)
Exception Note:  EXC_CORPSE_NOTIFY
Termination Reason: FRONTBOARD 2343432205 
<RBSTerminateContext| domain:10 code:0x8BADF00D explanation:[application<com.progotan.progotanone>:12368] failed to terminate gracefully after 5.0s
ProcessVisibility: Unknown
ProcessState: Running
WatchdogEvent: process-exit
WatchdogVisibility: Background
WatchdogCPUStatistics: (
"Elapsed total CPU time (seconds): 10.000 (user 10.000, system 0.000), 60% CPU",
"Elapsed application CPU time (seconds): 5.322, 32% CPU"
) reportType:CrashLog maxTerminationResistance:Interactive>

Triggered by Thread:  0

Thread 0 name:  tid_103 Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libobjc.A.dylib               	       0x19878ecf4 objc_msgSend + 20
1   MobileRTC                     	       0x106f20dc8 0x106db0000 + 1510856
2   MobileRTC                     	       0x10717d6a8 0x106db0000 + 3987112
3   MobileRTC                     	       0x106efca6c 0x106db0000 + 1362540
4   MobileRTC                     	       0x1077237a4 0x106db0000 + 9910180
...

From Firebase the same errors are reported as follows:

Crashed: tid_103
0  libobjc.A.dylib                0x5e40 lookUpImpOrForward + 80
1  libobjc.A.dylib                0x20e0 _objc_msgSend_uncached + 64
2  MobileRTC                      0x3a2ed4 TermSBPTUIModule(Cmm::ICmmMessageQueueClient*) + 1201280
3  libdispatch.dylib              0x63094 _dispatch_call_block_and_release + 24
4  libdispatch.dylib              0x64094 _dispatch_client_callout + 16
5  libdispatch.dylib              0x10d44 _dispatch_main_queue_drain + 928
6  libdispatch.dylib              0x10994 _dispatch_main_queue_callback_4CF$VARIANT$mp + 36
7  CoreFoundation                 0x4e0d4 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
8  CoreFoundation                 0xb5f8 __CFRunLoopRun + 2544
9  CoreFoundation                 0x1e250 CFRunLoopRunSpecific + 572
10 GraphicsServices               0x1988 GSEventRunModal + 160
11 UIKitCore                      0x4e5a88 -[UIApplication _run] + 1080
12 UIKitCore                      0x27efc8 UIApplicationMain + 336
13 Progotan.App.iOS               0x3033f08 wrapper_managed_to_native_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr + 4353310472
14 Progotan.App.iOS               0x28f4960 UIKit_UIApplication_Main_string___System_Type_System_Type + 85 (UIApplication.cs:85)
15 Progotan.App.iOS               0x190090 App_iOS_Application_Main_string__ + 18 (Main.cs:18)
16 Progotan.App.iOS               0xa4c480 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 4313564288
17 Progotan.App.iOS               0x52888f8 mono_jit_runtime_invoke + 3191 (mini-runtime.c:3191)
18 Progotan.App.iOS               0x53430c4 mono_runtime_invoke_checked + 3052 (object.c:3052)
19 Progotan.App.iOS               0x53493cc mono_runtime_exec_main_checked + 5182 (object.c:5182)
20 Progotan.App.iOS               0x5266c60 mono_jit_exec + 1383 (driver.c:1383)
21 Progotan.App.iOS               0x544f6bc xamarin_main + 490 (monotouch-main.m:490)
22 Progotan.App.iOS               0x18fc68 main + 204 (main.m:204)
23 ???                            0x106af84d0 (Mancante)

Anyone has an idea about what is going on?

Thanks,
Mdm

hi @Progotan ,
Thank you for reporting this issue.
After analyzing this crash call stack, this issue happened because the meetingservice.delegate be wild pointer in this case. The delegate is assigned to meetingservice, not strong or retain. So, need set the delegate to nil before the object free.

/*!
 @class MobileRTCMeetingService
 @brief The method is an implementation for client to start/join a meeting.
 @warning The meeting service allows only one concurrent operation at a time, which means, only one API call is in progress at any given time.  
 */
@interface MobileRTCMeetingService : NSObject

/*!
 @brief Callback of receiving meeting events.  
 */
@property (nullable, assign, nonatomic) id<MobileRTCMeetingServiceDelegate> delegate;

Thanks

Hi @jackie.chen ,
your answer pointed me on the right direction. I got this issue solved changing:

ZoomMeetingEventHandler handler = new ZoomMeetingEventHandler(); //implements IMobileRTCMeetingServiceDelegate
meetingService.Delegate = handler;

to

meetingService.Delegate = this; // the current class now implements directly IMobileRTCMeetingServiceDelegate

Now our application integrate successfully the latest iOS SDK (v5.11.10.4556).

For the other Microsoft Xamarin Forms developers, I am contributing to this package: GitHub - VisualService/Xamarin.ZoomSDKBinding: A xamarin forms binding for the zoom sdk .
Soon the Android and iOS libraries will be updated to the latest SDK versio.

Thanks,
Mdm

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.