Skip to content

UIKit work is done on the main thread #19

@orta

Description

@orta

In Folio, which may have more things turned on - I get errors about doing UI work on a background thread. This could be the cause of some of our crashes. /cc @alloy

Main Thread Checker: UI API called on a background thread: -[UIView layer]
PID: 67828, TID: 2321153, Thread name: (none), Queue name: com.apple.root.default-qos, QoS: 21
Backtrace:
4   FolioDev                            0x00000001057cde2b -[ARTiledImageView drawRect:] + 107
5   UIKit                               0x00000001096ab1c5 -[UIView(CALayerDelegate) drawLayer:inContext:] + 487
6   QuartzCore                          0x000000010903e254 -[CALayer drawInContext:] + 267
7   QuartzCore                          0x0000000108f88764 _ZL18tiled_layer_renderP16_CAImageProviderjjjjPv + 1817
8   QuartzCore                          0x000000010901488e _ZL21CAImageProviderThreadPjb + 789
9   libdispatch.dylib                   0x000000010db8533d _dispatch_client_callout + 8
10  libdispatch.dylib                   0x000000010db8a251 _dispatch_queue_override_invoke + 1458
11  libdispatch.dylib                   0x000000010db91102 _dispatch_root_queue_drain + 772
12  libdispatch.dylib                   0x000000010db90da0 _dispatch_worker_thread3 + 132
13  libsystem_pthread.dylib             0x000000010e051169 _pthread_wqthread + 1387
14  libsystem_pthread.dylib             0x000000010e050be9 start_wqthread + 13

2018-03-25 14:42:35.225523-0400 FolioDev[67828:2321153] [reports] Main Thread Checker: UI API called on a background thread: -[UIView layer]
PID: 67828, TID: 2321153, Thread name: (none), Queue name: com.apple.root.default-qos, QoS: 21
Backtrace:
4   FolioDev                            0x00000001057cde2b -[ARTiledImageView drawRect:] + 107
5   UIKit                               0x00000001096ab1c5 -[UIView(CALayerDelegate) drawLayer:inContext:] + 487
6   QuartzCore                          0x000000010903e254 -[CALayer drawInContext:] + 267
7   QuartzCore                          0x0000000108f88764 _ZL18tiled_layer_renderP16_CAImageProviderjjjjPv + 1817
8   QuartzCore                          0x000000010901488e _ZL21CAImageProviderThreadPjb + 789
9   libdispatch.dylib                   0x000000010db8533d _dispatch_client_callout + 8
10  libdispatch.dylib                   0x000000010db8a251 _dispatch_queue_override_invoke + 1458
11  libdispatch.dylib                   0x000000010db91102 _dispatch_root_queue_drain + 772
12  libdispatch.dylib                   0x000000010db90da0 _dispatch_worker_thread3 + 132
13  libsystem_pthread.dylib             0x000000010e051169 _pthread_wqthread + 1387
14  libsystem_pthread.dylib             0x000000010e050be9 start_wqthread + 13
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIView bounds]
PID: 67828, TID: 2321098, Thread name: (none), Queue name: com.apple.root.default-qos, QoS: 21
Backtrace:
4   FolioDev                            0x00000001057ce3a8 -[ARTiledImageView drawRect:] + 1512
5   UIKit                               0x00000001096ab1c5 -[UIView(CALayerDelegate) drawLayer:inContext:] + 487
6   QuartzCore                          0x000000010903e254 -[CALayer drawInContext:] + 267
7   QuartzCore                          0x0000000108f88764 _ZL18tiled_layer_renderP16_CAImageProviderjjjjPv + 1817
8   QuartzCore                          0x000000010901488e _ZL21CAImageProviderThreadPjb + 789
9   libdispatch.dylib                   0x000000010db8533d _dispatch_client_callout + 8
10  libdispatch.dylib                   0x000000010db8a251 _dispatch_queue_override_invoke + 1458
11  libdispatch.dylib                   0x000000010db91102 _dispatch_root_queue_drain + 772
12  libdispatch.dylib                   0x000000010db90da0 _dispatch_worker_thread3 + 132
13  libsystem_pthread.dylib             0x000000010e051169 _pthread_wqthread + 1387
14  libsystem_pthread.dylib             0x000000010e050be9 start_wqthread + 13

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions