UI API called on a background thread

Description
After joining a meeting and sharing a view on iOS the console prints messages about the UI API being called on a background thread.

=================================================================
Main Thread Checker: UI API called on a background thread: -[UIView frame]
PID: 4268, TID: 3456833, Thread name: (none), Queue name: us.zoom.timerqueue, QoS: 0
Backtrace:
4   MobileRTC                           0x0000000109ddd0dc _Z16TermSBPTUIModulePN3Cmm22ICmmMessageQueueClientE + 10945636
5   MobileRTC                           0x0000000109ddc4bc _Z16TermSBPTUIModulePN3Cmm22ICmmMessageQueueClientE + 10942532
6   MobileRTC                           0x0000000109ddc70c _Z16TermSBPTUIModulePN3Cmm22ICmmMessageQueueClientE + 10943124
7   MobileRTC                           0x0000000109ddcdf0 _Z16TermSBPTUIModulePN3Cmm22ICmmMessageQueueClientE + 10944888
8   libdispatch.dylib                   0x000000010abb8c78 _dispatch_client_callout + 16
9   libdispatch.dylib                   0x000000010abbbffc _dispatch_continuation_pop + 524
10  libdispatch.dylib                   0x000000010abce610 _dispatch_source_invoke + 1444
11  libdispatch.dylib                   0x000000010abc0a4c _dispatch_lane_serial_drain + 288
12  libdispatch.dylib                   0x000000010abc18b4 _dispatch_lane_invoke + 456
13  libdispatch.dylib                   0x000000010abcb77c _dispatch_workloop_worker_thread + 1148
14  libsystem_pthread.dylib             0x00000002098c6114 _pthread_wqthread + 304
15  libsystem_pthread.dylib             0x00000002098c8cd4 start_wqthread + 4

Which version?
Latest version as of writing: v4.4.57220.1211

To Reproduce(If applicable)
Join a meeting. Share a view.

I have tried to mitigate the issue by wrapping MobileRTCMeetingServiceDelegate callbacks (onMeetingStateChange/onMeetingReady) with DispatchQueue.main.async. Even with this, the app still suffers from the threading warnings.

Smartphone (please complete the following information):

  • Device: iPhone 7
  • OS: 12.14.1

Hi
Yes, we have the Main Thread Checker when shared view, our colleagues in charge of the share module have not been able to change this problem, we will optimize this problem in the feature version, you can not check the “Main Thread Checker” option in the “Edit scheme-> Diagnostics”.


Ths

I am also having the same problem with the latest Zoom iOS SDK.

Description:

When I tried sharing the local content than when onSinkShareSizeChange(_:) method called than I do get the following error in the console:

[reports] Main Thread Checker: UI API called on a background thread: -[UIView frame]
PID: 1586, TID: 686205, Thread name: (none), Queue name: us.zoom.timerqueue, QoS: 0
Backtrace:
4   MobileRTC                           0x0000000102509ba0 _Z16TermSBPTUIModulePN3Cmm22ICmmMessageQueueClientE + 14292396
5   MobileRTC                           0x0000000102508f78 _Z16TermSBPTUIModulePN3Cmm22ICmmMessageQueueClientE + 14289284
6   MobileRTC                           0x00000001025091c8 _Z16TermSBPTUIModulePN3Cmm22ICmmMessageQueueClientE + 14289876
7   MobileRTC                           0x00000001025098b4 _Z16TermSBPTUIModulePN3Cmm22ICmmMessageQueueClientE + 14291648
8   libdispatch.dylib                   0x0000000101577730 _dispatch_client_callout + 16
9   libdispatch.dylib                   0x000000010157a390 _dispatch_continuation_pop + 524
10  libdispatch.dylib                   0x000000010158d614 _dispatch_source_invoke + 1412
11  libdispatch.dylib                   0x000000010157e588 _dispatch_lane_serial_drain + 304
12  libdispatch.dylib                   0x000000010157f2e0 _dispatch_lane_invoke + 444
13  libdispatch.dylib                   0x000000010158a6c4 _dispatch_workloop_worker_thread + 1304
14  libsystem_pthread.dylib             0x00000001b3321b74 _pthread_wqthread + 272
15  libsystem_pthread.dylib             0x00000001b3324740 start_wqthread + 8

Which Version?
4.6.15084.0206

Device and OS info?
iPad Air 2 (running iOS 13.4)
iPhone X (running iOS 13.4)

Hi usman.awan,

Thanks for the info. Are you getting this with Zoom default UI or Custom UI? Are you using any 3rd party libraries such as MWPhotoBrowser?

Thanks!

Hi @carson.zoom,

I am getting this in Zoom Custom UI in the sample application. This issue happens when I start the app share locally and on participants side, it started the screen share after the certain delay of (10-15sec).

I got this following exception:

I am unable to trace when the UI is accessed in the background thread. However, I think it’s happening when the [UIView frame] is initialized or fetched while the screen share size is changed.

Thanks for the info. I will forward this to the engineering team for further investigation. Will get back to you shortly.

Thanks!