cocos-engine icon indicating copy to clipboard operation
cocos-engine copied to clipboard

Cocos 3.8.2 XCode 15.2 UI API called on a background thread

Open zhitaocai opened this issue 1 year ago • 0 comments

Cocos Creator version

3.8.2

System information

iOS 16.3 XCode 15.2

Issue description

Run a blank ios project, and the main thread check report will appear on the log, which seems to be problematic.

Main Thread Checker: UI API called on a background thread: -[UIView layer]

Relevant error log output

Main Thread Checker: UI API called on a background thread: -[UIView layer]
PID: 495, TID: 15777, Thread name: (none), Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4   Demo-mobile                         0x0000000100e005c0 _ZN2cc3gfx14CCMTLSwapchain6doInitERKNS0_13SwapchainInfoE + 176
5   Demo-mobile                         0x0000000100d9d14c _ZN2cc3gfx9Swapchain10initializeERKNS0_13SwapchainInfoE + 144
6   Demo-mobile                         0x0000000100c73518 _ZZN2cc3gfx14SwapchainAgent6doInitERKNS0_13SwapchainInfoEEN13SwapchainInit7executeEv + 32
7   Demo-mobile                         0x00000001003bfd80 _ZN2cc12MessageQueue15executeMessagesEv + 68
8   Demo-mobile                         0x00000001003bfddc _ZN2cc12MessageQueue13flushMessagesEv + 52
9   Demo-mobile                         0x00000001003bf688 _ZN2cc12MessageQueue18consumerThreadLoopEv + 64
10  Demo-mobile                         0x00000001003c887c _ZNSt3__18__invokeB7v160006IMN2cc12MessageQueueEDoFvvEPS2_JEvEEDTcldsdeclsr3stdE7declvalIT0_EEclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT1_EEEEOS7_OS6_DpOS8_ + 116
11  Demo-mobile                         0x00000001003c87fc _ZNSt3__116__thread_executeB7v160006INS_10unique_ptrINS_15__thread_structENS_14default_deleteIS2_EEEEMN2cc12MessageQueueEDoFvvEJPS7_EJLm2EEEEvRNS_5tupleIJT_T0_DpT1_EEENS_15__tuple_indicesIJXspT2_EEEE + 48
12  Demo-mobile                         0x00000001003c84a8 _ZNSt3__114__thread_proxyB7v160006INS_5tupleIJNS_10unique_ptrINS_15__thread_structENS_14default_deleteIS3_EEEEMN2cc12MessageQueueEDoFvvEPS8_EEEEEPvSD_ + 84
13  libsystem_pthread.dylib             0x00000001e85fd6cc _pthread_start + 148
14  libsystem_pthread.dylib             0x00000001e85fcba4 thread_start + 8

Steps to reproduce

  1. build an iOS project
  2. turn on Main Thread Checker in Product > Scheme > Edit Scheme image
  3. run the ios project and you will get the above log

Minimal reproduction project

No response

zhitaocai avatar Mar 12 '24 02:03 zhitaocai