Application Window Share - UI API called on a background thread

Description
Calling ‘startAppShare’ with valid windowID causes a main thread access error with main thread checker turned on.

The API in question:

  • (ZoomSDKError)startAppShare:(CGWindowID)windowID;

My usage:
[asController startAppShare:windowID.unsignedIntValue];

Caller is calling from the main thread
image

Which macOS Meeting SDK version?
MacOS: 11.6
Zoom SDK: 5.7.6.1333

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

  1. Enable main thread checker
    image
  2. Call startAppShare:windowID.unsignedIntValue with a valid window ID from the main thread

Device (please complete the following information):

  • Device: Macbook Pro 13 M1
  • OS: 11.6

Additional context
The window ID I am passing is fine, and the functionality works. This error is thrown and it doesn’t have an impact, but is occurring the first time application share occurs. Note: Subsequent shares doesn’t seem to cause the issue. (ie. start / stop / start again - only see error first time)

Here is the error in full:

=================================================================
Main Thread Checker: UI API called on a background thread: -[NSWindow windowNumber]
PID: 22676, TID: 4289696, Thread name: capture thread, Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4 nydus 0x0000000110fa0ac8 nydus + 166600
5 nydus 0x0000000110f90a68 nydus + 100968
6 nydus 0x0000000110f90e44 nydus + 101956
7 nydus 0x0000000110f88cd0 nydus + 68816
8 nydus 0x0000000110f8e454 nydus + 91220
9 nydus 0x0000000110f8e1c8 nydus + 90568
10 CoreFoundation 0x000000018c0a0b84 __CFMessagePortPerform + 600
11 CoreFoundation 0x000000018bff5f28 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION + 60
12 CoreFoundation 0x000000018bff5de4 __CFRunLoopDoSource1 + 596
13 CoreFoundation 0x000000018bff4264 __CFRunLoopRun + 2372
14 CoreFoundation 0x000000018bff31a8 CFRunLoopRunSpecific + 600
15 nydus 0x0000000110f8da08 nydus + 88584
16 nydus 0x0000000110f827b0 nydus + 42928
17 libsystem_pthread.dylib 0x0000000100e57fc8 _pthread_start + 320
18 libsystem_pthread.dylib 0x0000000100e52a78 thread_start + 8

2021-10-18 14:16:54.963458-0700 aircover[22676:4289696] [reports] Main Thread Checker: UI API called on a background thread: -[NSWindow windowNumber]
PID: 22676, TID: 4289696, Thread name: capture thread, Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4 nydus 0x0000000110fa0ac8 nydus + 166600
5 nydus 0x0000000110f90a68 nydus + 100968
6 nydus 0x0000000110f90e44 nydus + 101956
7 nydus 0x0000000110f88cd0 nydus + 68816
8 nydus 0x0000000110f8e454 nydus + 91220
9 nydus 0x0000000110f8e1c8 nydus + 90568
10 CoreFoundation 0x000000018c0a0b84 __CFMessagePortPerform + 600
11 CoreFoundation 0x000000018bff5f28 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION + 60
12 CoreFoundation 0x000000018bff5de4 __CFRunLoopDoSource1 + 596
13 CoreFoundation 0x000000018bff4264 __CFRunLoopRun + 2372
14 CoreFoundation 0x000000018bff31a8 CFRunLoopRunSpecific + 600
15 nydus 0x0000000110f8da08 nydus + 88584
16 nydus 0x0000000110f827b0 nydus + 42928
17 libsystem_pthread.dylib 0x0000000100e57fc8 _pthread_start + 320
18 libsystem_pthread.dylib 0x0000000100e52a78 thread_start + 8

Hi @KieranAC, thanks for the post.

Are you able to reproduce this in the SDK sample app, or does in only occur in your own application?

Thanks!

The sample app does not have the ability to share specific windows - only full desktop.

The problem does not happen in full desktop share.

Also this API call is very basic (just passing an integer) and I confirmed that I was calling from the main thread in my app, so I expect the sample app will have the same issue.

I was not able to find Zoom SDK logs after enabling them either.

Hi @KieranAC,

You are correct that the sample app does not support sharing specific windows, so it would be necessary to slightly modify the existing share logic in order to test this. It is definitely possible that you will see the same behavior in the sample app, but either way this will help us rule out a number of variables.

I was not able to find Zoom SDK logs after enabling them either.

I don’t think we will need the SDK logs just yet. If we get to that point, we can certainly look into why you aren’t seeing them. :slightly_smiling_face:

Thanks!

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