Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI API called on a background thread: -[UIViewController init] #26

Closed
Siedlerchr opened this issue Jun 10, 2021 · 0 comments · Fixed by #27
Closed

UI API called on a background thread: -[UIViewController init] #26

Siedlerchr opened this issue Jun 10, 2021 · 0 comments · Fixed by #27

Comments

@Siedlerchr
Copy link
Contributor

Hi,

I found another smalll issue:
in Thread Checker: UI API called on a background thread: -[UIViewController init]
The fix is simple. The init of the PrevieControl has to be moved to the Main Thread.

Backtrace:
4   myapp                          0x0000000104890710 $sSo19QLPreviewControllerCABycfcTO + 24
5   myapp                          0x0000000104888800 $sSo19QLPreviewControllerCABycfC + 32
6   myapp                          0x0000000104889e34 $s10myapp14PreviewAnyFileC11previewPath8_commandySo20CDVInvokedUrlCommandC_tFySb_10Foundation3URLVSgSo7NSErrorCSgtcfU_ + 672
7   myapp                          0x000000010488f970 $s10myapp14PreviewAnyFileC12downloadfile8withName04fileG010completionySS_SSySb_10Foundation3URLVSgSo7NSErrorCSgtctFyAK_So13NSURLResponseCSgs5Error_pSgtcfU_ + 1292
8   myapp                          0x000000010488fdf4 $s10Foundation3URLVSgSo13NSURLResponseCSgs5Error_pSgIegngg_So5NSURLCSgAGSo7NSErrorCSgIeyByyy_TR + 412
9   CFNetwork                           0x0000000186496400 CFNetServiceBrowserSearchForServices + 75244
10  CFNetwork                           0x00000001864abc4c _CFHTTPMessageSetResponseProxyURL + 18640
11  libdispatch.dylib                   0x0000000105fc40b4 _dispatch_call_block_and_release + 32
12  libdispatch.dylib                   0x0000000105fc5de0 _dispatch_client_callout + 20
13  libdispatch.dylib                   0x0000000105fcdef0 _dispatch_lane_serial_drain + 788
14  libdispatch.dylib                   0x0000000105fced48 _dispatch_lane_invoke + 496
15  libdispatch.dylib                   0x0000000105fdba50 _dispatch_workloop_worker_thread + 1600
16  libsystem_pthread.dylib             0x00000001d0dba7a4 _pthread_wqthread + 276
17  libsystem_pthread.dylib             0x00000001d0dc174c start_wqthread + 8
2021-06-10 11:02:00.295861+0200 myapp[1102:422107] [reports] Main Thread Checker: UI API called on a background thread: -[UIViewController init]
PID: 1102, TID: 422107, Thread name: (none), Queue name: com.apple.NSURLSession-delegate, QoS: 0
Backtrace:
4   myapp                          0x0000000104890710 $sSo19QLPreviewControllerCABycfcTO + 24
5   myapp                          0x0000000104888800 $sSo19QLPreviewControllerCABycfC + 32
6   myapp                          0x0000000104889e34 $s10myapp14PreviewAnyFileC11previewPath8_commandySo20CDVInvokedUrlCommandC_tFySb_10Foundation3URLVSgSo7NSErrorCSgtcfU_ + 672
7   myapp                          0x000000010488f970 $s10myapp14PreviewAnyFileC12downloadfile8withName04fileG010completionySS_SSySb_10Foundation3URLVSgSo7NSErrorCSgtctFyAK_So13NSURLResponseCSgs5Error_pSgtcfU_ + 1292
8   myapp                          0x000000010488fdf4 $s10Foundation3URLVSgSo13NSURLResponseCSgs5Error_pSgIegngg_So5NSURLCSgAGSo7NSErrorCSgIeyByyy_TR + 412
9   CFNetwork                           0x0000000186496400 CFNetServiceBrowserSearchForServices + 75244
10  CFNetwork                           0x00000001864abc4c _CFHTTPMessageSetResponseProxyURL + 18640
11  libdispatch.dylib                   0x0000000105fc40b4 _dispatch_call_block_and_release + 32
12  libdispatch.dylib                   0x0000000105fc5de0 _dispatch_client_callout + 20
13  libdispatch.dylib                   0x0000000105fcdef0 _dispatch_lane_serial_drain + 788
14  libdispatch.dylib                   0x0000000105fced48 _dispatch_lane_invoke + 496
15  libdispatch.dylib                   0x0000000105fdba50 _dispatch_workloop_worker_thread + 1600
16  libsystem_pthread.dylib             0x00000001d0dba7a4 _pthread_wqthread + 276
17  libsystem_pthread.dylib             0x00000001d0dc174c start_wqthread + 8
2021-06-10 11:02:10.089118+0200 myapp[1102:421886] open status SUCCESS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant