EXC_BAD_ACCESS error for screen sharing

We followed the official documentation for screen sharing with VideoSDK iOS

Testing environment:

  • iPad Pro 11-inch (4 - th generation): iPad OS 17.4.1
  • Apple M2 Max MacBook: MacOS Ventura 13.6.6
  • XCode: Version 15.2
  • Zoom VideoSDK IOS: v1.10.11

we can successfully start the ScreenShare Broadcast Extensions. However, when it start broadcast, there is a EXC_BAD_ACCESS error in

screenShareService?.processSampleBuffer(sampleBuffer, with: sampleBufferType)

We have checked that screenShareService is not null and confirmed that the sampleBuffer and sampleBufferType are correct. It seems we can not correctly access processSampleBuffer from the screenShareService object. Any suggestion on how to solve it would be very appreciated.

1 Like

Hi @eric-gtarxr,

I apologise that the screen-sharing documentation missed out on mentioning the need for zoomcml.framework. Can I check if you have added that framework to your main target and see if you still get that error? We are also updating our doc to mention that.

Cheers!

I am also unable to start screen sharing in my app due to the same error.
I was just about to post this when I saw your reply, but adding zoomcml.framework didn’t change the situation.

My environment:

  • iPad 6th generation, iPadOS 17.6.1
  • Xcode 15.4
  • ZoomVideoSDK 1.12.10

Here is the app for repro: GitHub - ztrehagem/ZoomVideoSDK-iOS-Sample
Debug logs and some lldb outputs: ZoomVideoSDK_2024-08-29 - Google Drive

Is there something I’m missing?
Please let me know if there’s anything else you need.

Thanks.

Same issue here! When turning on the address sanitizer it crashes with…

Thread 4: EXC_RESOURCE (RESOURCE_TYPE_MEMORY: high watermark memory limit exceeded) (limit=50 MB)

Hi @ztrehagem,

Apologise of the mistake I made here. Please include CptShare.xcframework instead of zoomcml.xcframework in your main project. We have updated our screen-sharing documentation on this. For more details in all the Zoom’s xcframeworks, you can refer to here.

Thank you.

1 Like

Hi @stuart.wallace,

I don’t actually think this error is related to our SDK, can you please provide me with details on this crash.

Thank you.

Thank you @boonjun.tan , it solved! There are no more crashes.
But now I have another problem: the callback onUserShareStatusChanged is never called, so the main target has no way to know when the user starts screen sharing.
Would it be better to create a new topic about this problem?

Hi @ztrehagem.

Great to hear that the solution resolved your crashes.

As for the callback onUserShareStatusChanged, we can continue with this thread here. You should indeed get this callback whenever the share status of anyone has any changes but you will first need to subscribe to the ZoomVideoSDKDelegate first. Can I check that you have subscribed to this already before the screen sharing happened? If not, you can take a look at our documentation on this here.

Thank you.

Thank you for replying @boonjun.tan .

I subscribed to the ZoomVideoSDKDelegate here, so it seems that other callbacks are called correctly such as onUserJoin and onUserLeave, but onUserShareStatusChanged is not called.
On the other hand, when users connecting from browsers starts screen sharing, onUserShareStatusChanged is called.

Should I get debug logs again?

Hi @ztrehagem,

Do you mean to say that on web screen sharing the onUserShareStatusChanged callback is triggered but it does not get triggered when iOS screen shares? Does this happen on your actual application or the sample application you have provided? I don’t need the Zoom’s log if it’s your sample app since I can download it and investigate on my end but if it’s your actual application then I will need the log.

Thank you.

Thank you for your quick reply.
Yes, I mean that. It happens on the sample application I have provided.
Could you try to run the sample application?

I communicated with the support team via email, and finally I found it is required to get ShareHelper before starting screen sharing as below.

ZoomVideoSDK.shareInstance()?.getShareHelper()

This makes the callback onUserShareStatusChanged ready to be triggered.

I will continue to implement a screen share feature to my app.

1 Like