UI API called on a background thread when I start screen sharing

Hi, I have noticed some info logs while call those methods (but only for first call):
- (ZoomSDKError)startMonitorShare:(CGDirectDisplayID)monitorID
- (ZoomSDKError)startAppShare:(CGWindowID)windowID

The logs say us that some UI stuff ([NSWindow windowNumber] and [NSApplication windows]) isn’t use in the main thread.

Logs example:

=================================================================
Main Thread Checker: UI API called on a background thread: -[NSWindow windowNumber]
PID: 1265, TID: 33933, Thread name: capture thread, Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4   nydus                               0x00000001416b3c32 nydus + 183346
5   nydus                               0x00000001416a0c93 nydus + 105619
6   nydus                               0x00000001416a0fd7 nydus + 106455
7   nydus                               0x0000000141698bdc nydus + 72668
8   nydus                               0x000000014169e835 nydus + 96309
9   nydus                               0x000000014169e5a3 nydus + 95651
10  CoreFoundation                      0x00007fff20606e24 __CFMessagePortPerform + 779
11  CoreFoundation                      0x00007fff205620d4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
12  CoreFoundation                      0x00007fff20561fb5 __CFRunLoopDoSource1 + 619
13  CoreFoundation                      0x00007fff2056063f __CFRunLoopRun + 2400
14  CoreFoundation                      0x00007fff2055f61c CFRunLoopRunSpecific + 563
15  nydus                               0x000000014169dede nydus + 93918
16  nydus                               0x0000000141692d3d nydus + 48445
17  libsystem_pthread.dylib             0x00000001106271b8 _pthread_start + 224
18  libsystem_pthread.dylib             0x0000000110622af7 thread_start + 15
2021-11-18 19:37:00.069282+0200 PROJECT Dev[1265:33933] [reports] Main Thread Checker: UI API called on a background thread: -[NSWindow windowNumber]
PID: 1265, TID: 33933, Thread name: capture thread, Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4   nydus                               0x00000001416b3c32 nydus + 183346
5   nydus                               0x00000001416a0c93 nydus + 105619
6   nydus                               0x00000001416a0fd7 nydus + 106455
7   nydus                               0x0000000141698bdc nydus + 72668
8   nydus                               0x000000014169e835 nydus + 96309
9   nydus                               0x000000014169e5a3 nydus + 95651
10  CoreFoundation                      0x00007fff20606e24 __CFMessagePortPerform + 779
11  CoreFoundation                      0x00007fff205620d4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
12  CoreFoundation                      0x00007fff20561fb5 __CFRunLoopDoSource1 + 619
13  CoreFoundation                      0x00007fff2056063f __CFRunLoopRun + 2400
14  CoreFoundation                      0x00007fff2055f61c CFRunLoopRunSpecific + 563
15  nydus                               0x000000014169dede nydus + 93918
16  nydus                               0x0000000141692d3d nydus + 48445
17  libsystem_pthread.dylib             0x00000001106271b8 _pthread_start + 224
18  libsystem_pthread.dylib             0x0000000110622af7 thread_start + 15
=================================================================
Main Thread Checker: UI API called on a background thread: -[NSApplication windows]
PID: 1265, TID: 33933, Thread name: capture thread, Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4   nydus                               0x00000001416c0d13 nydus + 236819
5   nydus                               0x00000001416bb3c3 nydus + 213955
6   nydus                               0x00000001416a7d75 nydus + 134517
7   nydus                               0x000000014169a73a nydus + 79674
8   nydus                               0x000000014169bfa0 nydus + 85920
9   nydus                               0x000000014169e9de nydus + 96734
10  nydus                               0x000000014169def3 nydus + 93939
11  nydus                               0x0000000141692d3d nydus + 48445
12  libsystem_pthread.dylib             0x00000001106271b8 _pthread_start + 224
13  libsystem_pthread.dylib             0x0000000110622af7 thread_start + 15
2021-11-18 19:37:00.510993+0200 PROJECT Dev[1265:33933] [reports] Main Thread Checker: UI API called on a background thread: -[NSApplication windows]
PID: 1265, TID: 33933, Thread name: capture thread, Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4   nydus                               0x00000001416c0d13 nydus + 236819
5   nydus                               0x00000001416bb3c3 nydus + 213955
6   nydus                               0x00000001416a7d75 nydus + 134517
7   nydus                               0x000000014169a73a nydus + 79674
8   nydus                               0x000000014169bfa0 nydus + 85920
9   nydus                               0x000000014169e9de nydus + 96734
10  nydus                               0x000000014169def3 nydus + 93939
11  nydus                               0x0000000141692d3d nydus + 48445
12  libsystem_pthread.dylib             0x00000001106271b8 _pthread_start + 224
13  libsystem_pthread.dylib             0x0000000110622af7 thread_start + 15

Hi @anton.yereshchenko, thanks for bringing this to our attention.

We’ll investigate this and let you know as soon as we have any updates.

Thanks!

1 Like