ios 12.1 下出現 Main Thread Checker: UI API called on a background thread


(ruru7947) #1

在12.01 跟 12.1 測試,只會在12.1出現

Main Thread Checker: UI API called on a background thread: -[UIApplication applicationState]
PID: 1153, TID: 193781, Thread name: org.hxhg.jiguang.thread, Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4   libobjc.A.dylib                     0x00000001809a3894 <redacted> + 56
5   CoreLocation                        0x000000018879727c CLClientStopVehicleHeadingUpdates + 142084
6   CoreLocation                        0x000000018876e388 CoreLocation + 21384
7   CoreLocation                        0x000000018876ea78 CLClientCreateWithBundleIdentifierAndPathOnRunLoop + 128
8   CoreLocation                        0x000000018876e980 CLClientCreateWithBundleIdentifierAndPath + 320
9   CoreLocation                        0x000000018877a114 CLClientStopVehicleHeadingUpdates + 22940
10  CoreLocation                        0x000000018877a918 CLClientStopVehicleHeadingUpdates + 24992
11  TYCThree                            0x00000001026168fc -[JCORELocationController setupLocationManager] + 108
12  TYCThree                            0x00000001026159c8 -[JCORELocationController initWithDelegate:] + 124
13  TYCThree                            0x0000000102633a10 -[JPUSHHttpSessionController init] + 204
14  TYCThree                            0x000000010261ddc4 -[JPUSHNetworkController init] + 156
15  TYCThree                            0x0000000102617c74 -[JCOREClientController networkService] + 72
16  TYCThree                            0x000000010261a0c4 -[JCOREClientController reportSession] + 24
17  TYCThree                            0x0000000102617d84 -[JCOREClientController reportLaunch:] + 68
18  TYCThree                            0x0000000102617b9c -[JCOREClientController setup] + 696
19  TYCThree                            0x000000010264e27c +[JCOREInterface setup] + 56
20  TYCThree                            0x000000010267a9e8 -[JPUSHClientController setup] + 148
21  libobjc.A.dylib                     0x00000001809a3604 <redacted> + 68
22  Foundation                          0x0000000182272da8 <redacted> + 340
23  CoreFoundation                      0x00000001817396a0 <redacted> + 28
24  CoreFoundation                      0x000000018173961c <redacted> + 92
25  CoreFoundation                      0x0000000181738ed4 <redacted> + 180
26  CoreFoundation                      0x0000000181733bb4 <redacted> + 1032
27  CoreFoundation                      0x0000000181733494 CFRunLoopRunSpecific + 452
28  CoreFoundation                      0x00000001817341f8 CFRunLoopRun + 84
29  TYCThree                            0x0000000102642b00 -[JPUSHThread clientThreadMain] + 100
30  Foundation                          0x0000000182135f30 <redacted> + 72
31  Foundation                          0x0000000182272bb4 <redacted> + 1044
32  libsystem_pthread.dylib             0x00000001813ae9c8 <redacted> + 132
33  libsystem_pthread.dylib             0x00000001813ae924 _pthread_start + 52
34  libsystem_pthread.dylib             0x00000001813b6ddc thread_start + 4
2018-11-08 11:57:41.732891+0800 TYCThree[1153:193781] [reports] Main Thread Checker: UI API called on a background thread: -[UIApplication applicationState]
PID: 1153, TID: 193781, Thread name: org.hxhg.jiguang.thread, Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4   libobjc.A.dylib                     0x00000001809a3894 <redacted> + 56
5   CoreLocation                        0x000000018879727c CLClientStopVehicleHeadingUpdates + 142084
6   CoreLocation                        0x000000018876e388 CoreLocation + 21384
7   CoreLocation                        0x000000018876ea78 CLClientCreateWithBundleIdentifierAndPathOnRunLoop + 128
8   CoreLocation                        0x000000018876e980 CLClientCreateWithBundleIdentifierAndPath + 320
9   CoreLocation                        0x000000018877a114 CLClientStopVehicleHeadingUpdates + 22940
10  CoreLocation                        0x000000018877a918 CLClientStopVehicleHeadingUpdates + 24992
11  TYCThree                            0x00000001026168fc -[JCORELocationController setupLocationManager] + 108
12  TYCThree                            0x00000001026159c8 -[JCORELocationController initWithDelegate:] + 124
13  TYCThree                            0x0000000102633a10 -[JPUSHHttpSessionController init] + 204
14  TYCThree                            0x000000010261ddc4 -[JPUSHNetworkController init] + 156
15  TYCThree                            0x0000000102617c74 -[JCOREClientController networkService] + 72
16  TYCThree                            0x000000010261a0c4 -[JCOREClientController reportSession] + 24
17  TYCThree                            0x0000000102617d84 -[JCOREClientController reportLaunch:] + 68
18  TYCThree                            0x0000000102617b9c -[JCOREClientController setup] + 696
19  TYCThree                            0x000000010264e27c +[JCOREInterface setup] + 56
20  TYCThree                            0x000000010267a9e8 -[JPUSHClientController setup] + 148
21  libobjc.A.dylib                     0x00000001809a3604 <redacted> + 68
22  Foundation                          0x0000000182272da8 <redacted> + 340
23  CoreFoundation                      0x00000001817396a0 <redacted> + 28
24  CoreFoundation                      0x000000018173961c <redacted> + 92
25  CoreFoundation                      0x0000000181738ed4 <redacted> + 180
26  CoreFoundation                      0x0000000181733bb4 <redacted> + 1032
27  CoreFoundation                      0x0000000181733494 CFRunLoopRunSpecific + 452
28  CoreFoundation                      0x00000001817341f8 CFRunLoopRun + 84
29  TYCThree                            0x0000000102642b00 -[JPUSHThread clientThreadMain] + 100
30  Foundation                          0x0000000182135f30 <redacted> + 72
31  Foundation                          0x0000000182272bb4 <redacted> + 1044
32  libsystem_pthread.dylib             0x00000001813ae9c8 <redacted> + 132
33  libsystem_pthread.dylib             0x00000001813ae924 _pthread_start + 52
34  libsystem_pthread.dylib             0x00000001813b6ddc thread_start + 4
(lldb)

(12) #2

你使用的极光 SDK 的版本号多少?

该问题什么情况下出现?复现步骤


(ruru7947) #3

07

開啟app就會出現

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        
        window = UIWindow(frame: UIScreen.main.bounds)
        window?.backgroundColor = UIColor.white
        window?.rootViewController =  LoginNavigationController.init(rootViewController: LoginViewController())
        window?.makeKeyAndVisible()
        
        //推播
        let entity = JPUSHRegisterEntity.init()
        entity.types = Int(JPAuthorizationOptions.alert.rawValue|JPAuthorizationOptions.badge.rawValue|JPAuthorizationOptions.sound.rawValue)
        JPUSHService.register(forRemoteNotificationConfig: entity, delegate: self)
        JPUSHService.setup(withOption: launchOptions, appKey: "xxxxxxxxxxxxxxxx", channel: "xxxxxx", apsForProduction: true)
        
        return true
    }

(12) #4

说明:这个不影响功能,是因为你们打开了那个 main thread check 而出现的,SDK 之后会处理掉。


(ruru7947) #5

了解了,謝謝


(戏) #6

这个问题是苹果系统的问题吗?为什么之前的版本没有出现呢? 探讨一下呗