# Main Thread Checker: UI API called on a background thread: -\[UIView setSize

**URL:** <https://openvidu.discourse.group/t/main-thread-checker-ui-api-called-on-a-background-thread-uiview-setsize/5067>\
**Category:** Issues developing apps\
**Tags:** v2\
**Created:** [May 2, 2024, 8:33am UTC](https://openvidu.discourse.group/t/main-thread-checker-ui-api-called-on-a-background-thread-uiview-setsize/5067 "2024-05-02T08:33:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Kennedy](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/john_kennedy/32/2435_2.png) [@John\_Kennedy](https://openvidu.discourse.group/u/John_Kennedy)\
**Post date:** [May 2, 2024, 8:33am UTC](https://openvidu.discourse.group/t/main-thread-checker-ui-api-called-on-a-background-thread-uiview-setsize/5067/1 "2024-05-02T08:33:02Z")

</div>

Main Thread Checker: UI API called on a background thread: -[UIView setSize:]  
PID: 781, TID: 78231, Thread name: (none), Queue name: org.webrtc.cameravideocapturer.video, QoS: 25  
Backtrace:  
4 WebRTC 0x0000000107929a68 RTCShutdownInternalTracer + 5443932  
5 WebRTC 0x000000010743ed0c RTCShutdownInternalTracer + 287744  
6 WebRTC 0x000000010743abf4 RTCShutdownInternalTracer + 271080  
7 WebRTC 0x00000001073e1230 RTCFileName + 30928  
8 WebRTC 0x0000000107929e98 RTCShutdownInternalTracer + 5445004  
9 WebRTC 0x00000001073fa6c8 RTCShutdownInternalTracer + 7612  
10 AVFCapture 0x00000001b1f3ac30 7A9D2EB5-0A39-38D2-9FF1-1C8035FA7EBA + 113712  
11 AVFCapture 0x00000001b1f3aafc 7A9D2EB5-0A39-38D2-9FF1-1C8035FA7EBA + 113404  
12 CMCapture 0x00000001b56f02e4 DB0E358C-AA45-34A4-8765-2B536E5CDF99 + 275172  
13 CMCapture 0x00000001b56f0220 DB0E358C-AA45-34A4-8765-2B536E5CDF99 + 274976  
14 libdispatch.dylib 0x00000001063ea7bc \_dispatch\_client\_callout + 20  
15 libdispatch.dylib 0x00000001063ed8e0 \_dispatch\_continuation\_pop + 676  
16 libdispatch.dylib 0x0000000106404cc8 \_dispatch\_source\_latch\_and\_call + 480  
17 libdispatch.dylib 0x0000000106403718 \_dispatch\_source\_invoke + 860  
18 libdispatch.dylib 0x00000001063f24a4 \_dispatch\_lane\_serial\_drain + 376  
19 libdispatch.dylib 0x00000001063f3408 \_dispatch\_lane\_invoke + 408  
20 libdispatch.dylib 0x0000000106400404 \_dispatch\_root\_queue\_drain\_deferred\_wlh + 328  
21 libdispatch.dylib 0x00000001063ffa38 \_dispatch\_workloop\_worker\_thread + 444  
22 libsystem\_pthread.dylib 0x00000001f1010f20 \_pthread\_wqthread + 288  
23 libsystem\_pthread.dylib 0x00000001f1010fc0 start\_wqthread + 8  
Main Thread Checker: UI API called on a background thread: -[UIView setSize:]  
PID: 781, TID: 78231, Thread name: (none), Queue name: org.webrtc.cameravideocapturer.video, QoS: 25  
Backtrace:  
4 WebRTC 0x0000000107929a68 RTCShutdownInternalTracer + 5443932  
5 WebRTC 0x000000010743ed0c RTCShutdownInternalTracer + 287744  
6 WebRTC 0x000000010743abf4 RTCShutdownInternalTracer + 271080  
7 WebRTC 0x00000001073e1230 RTCFileName + 30928  
8 WebRTC 0x0000000107929e98 RTCShutdownInternalTracer + 5445004  
9 WebRTC 0x00000001073fa6c8 RTCShutdownInternalTracer + 7612  
10 AVFCapture 0x00000001b1f3ac30 7A9D2EB5-0A39-38D2-9FF1-1C8035FA7EBA + 113712  
11 AVFCapture 0x00000001b1f3aafc 7A9D2EB5-0A39-38D2-9FF1-1C8035FA7EBA + 113404  
12 CMCapture 0x00000001b56f02e4 DB0E358C-AA45-34A4-8765-2B536E5CDF99 + 275172  
13 CMCapture 0x00000001b56f0220 DB0E358C-AA45-34A4-8765-2B536E5CDF99 + 274976  
14 libdispatch.dylib 0x00000001063ea7bc \_dispatch\_client\_callout + 20  
15 libdispatch.dylib 0x00000001063ed8e0 \_dispatch\_continuation\_pop + 676  
16 libdispatch.dylib 0x0000000106404cc8 \_dispatch\_source\_latch\_and\_call + 480  
17 libdispatch.dylib 0x0000000106403718 \_dispatch\_source\_invoke + 860  
18 libdispatch.dylib 0x00000001063f24a4 \_dispatch\_lane\_serial\_drain + 376  
19 libdispatch.dylib 0x00000001063f3408 \_dispatch\_lane\_invoke + 408  
20 libdispatch.dylib 0x0000000106400404 \_dispatch\_root\_queue\_drain\_deferred\_wlh + 328  
21 libdispatch.dylib 0x00000001063ffa38 \_dispatch\_workloop\_worker\_thread + 444  
22 libsystem\_pthread.dylib 0x00000001f1010f20 \_pthread\_wqthread + 288  
23 libsystem\_pthread.dylib 0x00000001f1010fc0 start\_wqthread + 8  
\*\*\* Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[UIView renderFrame:]: unrecognized selector sent to instance 0x15df799c0’  
\*\*\* First throw call stack:  
(0x19511ab28 0x18cf92f78 0x1951abeec 0x1980fb44c 0x195060300 0x1951a1760 0x107929ab4 0x10743ed0c 0x10743abf4 0x1073e1230 0x107929e98 0x1073fa6c8 0x1b1f3ac30 0x1b1f3aafc 0x1b56f02e4 0x1b56f0220 0x1063ea7bc 0x1063ed8e0 0x106404cc8 0x106403718 0x1063f24a4 0x1063f3408 0x106400404 0x1063ffa38 0x1f1010f20 0x1f1010fc0)  
libc++abi: terminating due to uncaught exception of type NSException

Hey guys, I tried to implement this example from

> **[GitHub - Dineshvijay/openvidu-ios](https://github.com/Dineshvijay/openvidu-ios)**
>
> Contribute to Dineshvijay/openvidu-ios development by creating an account on GitHub.

I can connect to session, however, I can’t see any video, it crashes. Is there any idea how to fix it?
