meitu/MTHawkeye

异步获取UI信息

zhipengbird opened this issue · 2 comments

Describe the bug
该监测工具会在异步线程中获取UI信息
Screenshots
image

还有其他异步获取的主线程UI
这里有些信息可供参考:

=================================================================
Main Thread Checker: UI API called on a background thread: -[UIView window]
PID: 796, TID: 146959, Thread name: (none), Queue name: com.meitu.hawkeye.living-object-sniffer-queue, QoS: 0
Backtrace:
4 StarMaker 0x00000001071715f4 -[UIViewController(MTHLivingObjectSniffer) mth_shouldObjectAlive] + 124
5 StarMaker 0x00000001070b34ec -[MTHLivingObjectSniffer shouldShadowTargetReleaseButNot:] + 100
6 StarMaker 0x00000001070b2c74 __77-[MTHLivingObjectSniffer asyncExtraceUnexpectedLivingShadowsFrom:completion:]_block_invoke + 876
7 libdispatch.dylib 0x000000010ed7d1dc _dispatch_call_block_and_release + 24
8 libdispatch.dylib 0x000000010ed7d19c _dispatch_client_callout + 16
9 libdispatch.dylib 0x000000010ed8bdfc _dispatch_queue_serial_drain + 768
10 libdispatch.dylib 0x000000010ed806ac _dispatch_queue_invoke + 328
11 libdispatch.dylib 0x000000010ed8cd54 _dispatch_root_queue_drain_deferred_wlh + 352
12 libdispatch.dylib 0x000000010ed93e38 _dispatch_workloop_worker_thread + 676
13 libsystem_pthread.dylib 0x0000000181bf7e70 _pthread_wqthread + 860
14 libsystem_pthread.dylib 0x0000000181bf7b08 start_wqthread + 4
2019-04-28 20:30:44.011462+0800 StarMaker[796:146959] [reports] Main Thread Checker: UI API called on a background thread: -[UIView window]
PID: 796, TID: 146959, Thread name: (none), Queue name: com.meitu.hawkeye.living-object-sniffer-queue, QoS: 0
Backtrace:
4 StarMaker 0x00000001071715f4 -[UIViewController(MTHLivingObjectSniffer) mth_shouldObjectAlive] + 124
5 StarMaker 0x00000001070b34ec -[MTHLivingObjectSniffer shouldShadowTargetReleaseButNot:] + 100
6 StarMaker 0x00000001070b2c74 __77-[MTHLivingObjectSniffer asyncExtraceUnexpectedLivingShadowsFrom:completion:]_block_invoke + 876
7 libdispatch.dylib 0x000000010ed7d1dc _dispatch_call_block_and_release + 24
8 libdispatch.dylib 0x000000010ed7d19c _dispatch_client_callout + 16
9 libdispatch.dylib 0x000000010ed8bdfc _dispatch_queue_serial_drain + 768
10 libdispatch.dylib 0x000000010ed806ac _dispatch_queue_invoke + 328
11 libdispatch.dylib 0x000000010ed8cd54 _dispatch_root_queue_drain_deferred_wlh + 352
12 libdispatch.dylib 0x000000010ed93e38 _dispatch_workloop_worker_thread + 676
13 libsystem_pthread.dylib 0x0000000181bf7e70 _pthread_wqthread + 860
14 libsystem_pthread.dylib 0x0000000181bf7b08 start_wqthread + 4

Main Thread Checker: UI API called on a background thread: -[UIView superview]
PID: 796, TID: 146959, Thread name: (none), Queue name: com.meitu.hawkeye.living-object-sniffer-queue, QoS: 0
Backtrace:
4 StarMaker 0x000000010716feac -[UIView(MTHLivingObjectSniffer) mth_shouldObjectAlive] + 132
5 StarMaker 0x00000001070b34ec -[MTHLivingObjectSniffer shouldShadowTargetReleaseButNot:] + 100
6 StarMaker 0x00000001070b2c74 __77-[MTHLivingObjectSniffer asyncExtraceUnexpectedLivingShadowsFrom:completion:]_block_invoke + 876
7 libdispatch.dylib 0x000000010ed7d1dc _dispatch_call_block_and_release + 24
8 libdispatch.dylib 0x000000010ed7d19c _dispatch_client_callout + 16
9 libdispatch.dylib 0x000000010ed8bdfc _dispatch_queue_serial_drain + 768
10 libdispatch.dylib 0x000000010ed806ac _dis2019-04-28 20:30:53.565275+0800 StarMaker[796:146954] TIC Read Status [33:0x1c4374100]: 1:57
patch_queue_invoke + 328
11 libdispatch.dylib 0x000000010ed8cd54 _dispatch_root_queue_drain_deferred_wlh + 352
12 libdispatch.dylib 0x000000010ed93e38 _dispatch_workloop_worker_thread + 676
13 libsystem_pthread.dylib 0x0000000181bf7e70 _pthread_wqthread + 860
14 libsystem_pthread.dylib 0x0000000181bf7b08 start_wqthread + 4
2019-04-28 20:30:53.597858+0800 StarMaker[796:146959] [reports] Main Thread Checker: UI API called on a background thread: -[UIView superview]
PID: 796, TID: 146959, Thread name: (none), Queue name: com.meitu.hawkeye.living-object-sniffer-queue, QoS: 0
Backtrace:
4 StarMaker 0x000000010716feac -[UIView(MTHLivingObjectSniffer) mth_shouldObjectAlive] + 132
5 StarMaker 0x00000001070b34ec -[MTHLivingObjectSniffer shouldShadowTargetReleaseButNot:] + 100
6 StarMaker 2019-04-28 20:30:53.597907+0800 StarMaker[796:146954] TIC Read Status [33:0x1c4374100]: 1:57
0x00000001070b2c74 __77-[MTHLivingObjectSniffer asyncExtraceUnexpectedLivingShadowsFrom:completion:]_block_invoke + 876
7 libdispatch.dylib 0x000000010ed7d1dc _dispatch_call_block_and_release + 24
8 libdispatch.dylib 0x000000010ed7d19c _dispatch_client_callout + 16
9 libdispatch.dylib 0x000000010ed8bdfc _dispatch_queue_serial_drain + 768
10 libdispatch.dylib 0x000000010ed806ac _dispatch_queue_invoke + 328
11 libdispatch.dylib 0x000000010ed8cd54 _dispatch_root_queue_drain_deferred_wlh + 352
12 libdispatch.dylib 0x000000010ed93e38 _dispatch_workloop_worker_thread + 676
13 libsystem_pthread.dylib 0x0000000181bf7e70 _pthread_wqthread + 860
14 libsystem_pthread.dylib 0x0000000181bf7b08 start_wqthread + 4

最新的 develop 分支修正了这个问题 commit: 53552266