3.8.6 ios ASTC纹理压缩,真机运行sprite全变成了文字乱码或不显示

  • Creator 版本:3.8.6

  • 目标平台:iOS 18.3.2

  • 重现方式:3.8.6创建 empty 2D项目,导入图片资源,新建纹理压缩设置,ios ASTC 4x4, 图片资源勾选该纹理压缩,打包ios真机运行必现

  • 首个报错:
    18:08:18 [INFO]: Metal Feature Set: Invalid metal feature set
    18:08:18 [INFO]: Device validator enabled.
    18:08:18 [DEBUG]: D/ Initializing V8, version: 11.6.189.22

18:08:18 [DEBUG]: D/ libuv version: 1.23.1-dev

18:08:18 [DEBUG]: D/ Number of interfaces: 41
18:08:18 [DEBUG]: D/ Debugger listening…, visit [
18:08:18 [DEBUG]: D/ devtools://devtools/bundled/js_app.html?v8only=true&ws=192.168.1.90:6086/00010002-0003-4004-8005-000600070008
18:08:18 [DEBUG]: D/ devtools://devtools/bundled/js_app.html?v8only=true&ws=169.254.169.225:6086/00010002-0003-4004-8005-000600070008
18:08:18 [DEBUG]: D/ devtools://devtools/bundled/js_app.html?v8only=true&ws=10.78.28.150:6086/00010002-0003-4004-8005-000600070008
18:08:18 [DEBUG]: D/ devtools://devtools/bundled/js_app.html?v8only=true&ws=127.0.0.1:6086/00010002-0003-4004-8005-000600070008
18:08:18 [DEBUG]: D/ ] in chrome browser to debug!
18:08:18 [DEBUG]: D/ For help see https://nodejs.org/en/docs/inspector
18:08:18 [WARN]: JS: WebAssembly is not supported!
18:08:18 [DEBUG]: EventBus[Engine] has no listener found!
18:08:32 [INFO]: Device thread detached.

Main Thread Checker: UI API called on a background thread: -[UIView layer]
PID: 5388, TID: 1633791, Thread name: (none), Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4 silentforest-mobile 0x0000000100f3bba0 _ZN2cc3gfx14CCMTLSwapchain6doInitERKNS0_13SwapchainInfoE + 164
5 silentforest-mobile 0x0000000100ee99e0 _ZN2cc3gfx9Swapchain10initializeERKNS0_13SwapchainInfoE + 144
6 silentforest-mobile 0x0000000100eca088 _ZZN2cc3gfx14SwapchainAgent6doInitERKNS0_13SwapchainInfoEEN13SwapchainInit7executeEv + 32
7 silentforest-mobile 0x000000010093b424 _ZN2cc12MessageQueue15executeMessagesEv + 68
8 silentforest-mobile 0x000000010093b480 _ZN2cc12MessageQueue13flushMessagesEv + 52
9 silentforest-mobile 0x000000010093ad24 _ZN2cc12MessageQueue18consumerThreadLoopEv + 64
10 silentforest-mobile 0x0000000100943ce4 ZNSt3__18__invokeB8de180100IMN2cc12MessageQueueEDoFvvEPS2_JEvEEDTcldsdeclsr3stdE7declvalIT0_EEclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT1_EEEEOS7_OS6_DpOS8 + 132
11 silentforest-mobile 0x0000000100943c54 _ZNSt3__116__thread_executeB8de180100INS_10unique_ptrINS_15__thread_structENS_14default_deleteIS2_EEEEMN2cc12MessageQueueEDoFvvEJPS7_EJLm2EEEEvRNS_5tupleIJT_T0_DpT1_EEENS_15__tuple_indicesIJXspT2_EEEE + 48
12 silentforest-mobile 0x0000000100943900 ZNSt3__114__thread_proxyB8de180100INS_5tupleIJNS_10unique_ptrINS_15__thread_structENS_14default_deleteIS3_EEEEMN2cc12MessageQueueEDoFvvEPS8_EEEEEPvSD + 84
13 libsystem_pthread.dylib 0x000000021017a7d0 _pthread_start + 136
14 libsystem_pthread.dylib 0x000000021017a480 thread_start + 8
Main Thread Checker: UI API called on a background thread: -[UIView layer]
PID: 5388, TID: 1633791, Thread name: (none), Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4 silentforest-mobile 0x0000000100f3bba0 _ZN2cc3gfx14CCMTLSwapchain6doInitERKNS0_13SwapchainInfoE + 164
5 silentforest-mobile 0x0000000100ee99e0 _ZN2cc3gfx9Swapchain10initializeERKNS0_13SwapchainInfoE + 144
6 silentforest-mobile 0x0000000100eca088 _ZZN2cc3gfx14SwapchainAgent6doInitERKNS0_13SwapchainInfoEEN13SwapchainInit7executeEv + 32
7 silentforest-mobile 0x000000010093b424 _ZN2cc12MessageQueue15executeMessagesEv + 68
8 silentforest-mobile 0x000000010093b480 _ZN2cc12MessageQueue13flushMessagesEv + 52
9 silentforest-mobile 0x000000010093ad24 _ZN2cc12MessageQueue18consumerThreadLoopEv + 64
10 silentforest-mobile 0x0000000100943ce4 ZNSt3__18__invokeB8de180100IMN2cc12MessageQueueEDoFvvEPS2_JEvEEDTcldsdeclsr3stdE7declvalIT0_EEclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT1_EEEEOS7_OS6_DpOS8 + 132
11 silentforest-mobile 0x0000000100943c54 _ZNSt3__116__thread_executeB8de180100INS_10unique_ptrINS_15__thread_structENS_14default_deleteIS2_EEEEMN2cc12MessageQueueEDoFvvEJPS7_EJLm2EEEEvRNS_5tupleIJT_T0_DpT1_EEENS_15__tuple_indicesIJXspT2_EEEE + 48
12 silentforest-mobile 0x0000000100943900 ZNSt3__114__thread_proxyB8de180100INS_5tupleIJNS_10unique_ptrINS_15__thread_structENS_14default_deleteIS3_EEEEMN2cc12MessageQueueEDoFvvEPS8_EEEEEPvSD + 84
13 libsystem_pthread.dylib 0x000000021017a7d0 _pthread_start + 136
14 libsystem_pthread.dylib 0x000000021017a480 thread_start + 8
Modifying properties of a view’s layer off the main thread is not allowed: view <View: 0x109764400> with associated view controller <ViewController: 0x109764000>; backtrace:
(
0 UIKitCore 0x00000001880b736c 8CC54497-F7EC-3903-AE5A-A274047C0CF1 + 5075820
1 UIKitCore 0x0000000187c0835c 8CC54497-F7EC-3903-AE5A-A274047C0CF1 + 164700
2 QuartzCore 0x0000000186ead1b0 8A08CC24-0017-3108-BEA4-29111B40063C + 98736
3 QuartzCore 0x0000000186ead024 8A08CC24-0017-3108-BEA4-29111B40063C + 98340
4 QuartzCore 0x0000000186ead64c 8A08CC24-0017-3108-BEA4-29111B40063C + 99916
5 QuartzCore 0x0000000186ffe474 8A08CC24-0017-3108-BEA4-29111B40063C + 1479796
6 silentforest-mobile 0x0000000100f3bf08 _ZZN2cc3gfx14CCMTLSwapchain6doInitERKNS0_13SwapchainInfoEENK3$_0clEbb + 64
7 silentforest-mobile 0x0000000100f3bc6c _ZN2cc3gfx14CCMTLSwapchain6doInitERKNS0_13SwapchainInfoE + 368
8 silentforest-mobile 0x0000000100ee99e0 _ZN2cc3gfx9Swapchain10initializeERKNS0_13SwapchainInfoE + 144
9 silentforest-mobile 0x0000000100eca088 _ZZN2cc3gfx14SwapchainAgent6doInitERKNS0_13SwapchainInfoEEN13SwapchainInit7executeEv + 32
10 silentforest-mobile 0x000000010093b424 _ZN2cc12MessageQueue15executeMessagesEv + 68
11 silentforest-mobile 0x000000010093b480 _ZN2cc12MessageQueue13flushMessagesEv + 52
12 silentforest-mobile 0x000000010093ad24 _ZN2cc12MessageQueue18consumerThreadLoopEv + 64
13 silentforest-mobile 0x0000000100943ce4 ZNSt3__18__invokeB8de180100IMN2cc12MessageQueueEDoFvvEPS2_JEvEEDTcldsdeclsr3stdE7declvalIT0_EEclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT1_EEEEOS7_OS6_DpOS8 + 132
14 silentforest-mobile 0x0000000100943c54 _ZNSt3__116__thread_executeB8de180100INS_10unique_ptrINS_15__thread_structENS_14default_deleteIS2_EEEEMN2cc12MessageQueueEDoFvvEJPS7_EJLm2EEEEvRNS_5tupleIJT_T0_DpT1_EEENS_15__tuple_indicesIJXspT2_EEEE + 48
15 silentforest-mobile 0x0000000100943900 ZNSt3__114__thread_proxyB8de180100INS_5tupleIJNS_10unique_ptrINS_15__thread_structENS_14default_deleteIS3_EEEEMN2cc12MessageQueueEDoFvvEPS8_EEEEEPvSD + 84
16 libsystem_pthread.dylib 0x000000021017a7d0 _pthread_start + 136
17 libsystem_pthread.dylib 0x000000021017a480 thread_start + 8
)
Modifying properties of a view’s layer off the main thread is not allowed: view <View: 0x109764400> with associated view controller <ViewController: 0x109764000>; backtrace:
(
0 UIKitCore 0x00000001880b736c 8CC54497-F7EC-3903-AE5A-A274047C0CF1 + 5075820
1 UIKitCore 0x0000000187c0835c 8CC54497-F7EC-3903-AE5A-A274047C0CF1 + 164700
2 QuartzCore 0x0000000186ead1b0 8A08CC24-0017-3108-BEA4-29111B40063C + 98736
3 QuartzCore 0x0000000186ead024 8A08CC24-0017-3108-BEA4-29111B40063C + 98340
4 QuartzCore 0x0000000186ead64c 8A08CC24-0017-3108-BEA4-29111B40063C + 99916
5 QuartzCore 0x0000000186ffe474 8A08CC24-0017-3108-BEA4-29111B40063C + 1479796
6 silentforest-mobile 0x0000000100f3bf08 _ZZN2cc3gfx14CCMTLSwapchain6doInitERKNS0_13SwapchainInfoEENK3$_0clEbb + 64
7 silentforest-mobile 0x0000000100f3bc88 _ZN2cc3gfx14CCMTLSwapchain6doInitERKNS0_13SwapchainInfoE + 396
8 silentforest-mobile 0x0000000100ee99e0 _ZN2cc3gfx9Swapchain10initializeERKNS0_13SwapchainInfoE + 144
9 silentforest-mobile 0x0000000100eca088 _ZZN2cc3gfx14SwapchainAgent6doInitERKNS0_13SwapchainInfoEEN13SwapchainInit7executeEv + 32
10 silentforest-mobile 0x000000010093b424 _ZN2cc12MessageQueue15executeMessagesEv + 68
11 silentforest-mobile 0x000000010093b480 _ZN2cc12MessageQueue13flushMessagesEv + 52
12 silentforest-mobile 0x000000010093ad24 _ZN2cc12MessageQueue18consumerThreadLoopEv + 64
13 silentforest-mobile 0x0000000100943ce4 ZNSt3__18__invokeB8de180100IMN2cc12MessageQueueEDoFvvEPS2_JEvEEDTcldsdeclsr3stdE7declvalIT0_EEclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT1_EEEEOS7_OS6_DpOS8 + 132
14 silentforest-mobile 0x0000000100943c54 _ZNSt3__116__thread_executeB8de180100INS_10unique_ptrINS_15__thread_structENS_14default_deleteIS2_EEEEMN2cc12MessageQueueEDoFvvEJPS7_EJLm2EEEEvRNS_5tupleIJT_T0_DpT1_EEENS_15__tuple_indicesIJXspT2_EEEE + 48
15 silentforest-mobile 0x0000000100943900 ZNSt3__114__thread_proxyB8de180100INS_5tupleIJNS_10unique_ptrINS_15__thread_structENS_14default_deleteIS3_EEEEMN2cc12MessageQueueEDoFvvEPS8_EEEEEPvSD + 84
16 libsystem_pthread.dylib 0x000000021017a7d0 _pthread_start + 136
17 libsystem_pthread.dylib 0x000000021017a480 thread_start + 8
)
18:08:59 [ERROR]: JS: Error 3300, please go to https://github.com/cocos/cocos-engine/blob/3.8.6/EngineErrorMap.md#3300 to see details. Arguments: logo/, 1853, 0
18:08:59 [ERROR]: JS: Error 3300, please go to https://github.com/cocos/cocos-engine/blob/3.8.6/EngineErrorMap.md#3300 to see details. Arguments: start/, 1234, 0
18:09:00 [INFO]: for2d/builtin-sprite|sprite-vs:vert|sprite-fs:frag|CC_USE_EMBEDDED_ALPHA0|USE_TEXTURE1|IS_GRAY0 compile succeed.
18:09:00 [ERROR]: [ERROR] file /Users/cerfbaleine/Applications/Cocos/Creator/3.8.6/CocosCreator.app/Contents/Resources/resources/3d/engine/native/cocos/renderer/gfx-metal/MTLCommandBuffer.mm: line 904
18:09:00 [ERROR]: Sampler binding cc_spriteTexture at set 2 binding 12 is not bounded.

  • 之前哪个版本是正常的:3.8.5
  • 手机型号: iPhone 15 Plus
  • 手机浏览器:原生,非浏览器
  • 编辑器操作系统:
  • 重现概率: 必现

目前 不勾选纹理压缩,使用PNG 或者是 PVRTC 纹理压缩时,游戏画面是正常的

运行检测一下 你的手机是否支持ASTC先

1赞

现在还有不支持ASTC的手机吗?ios的话好像要在iPhone5s以前才不支持 :thinking:

支持ASTC的,我另一个项目3.8.2,纹理压缩只勾选了astc 4x4,在iPhone 15plus 上运行是正常的

有复现的demo吗?贴图如果有写入,是不能用压缩格式的。

demo.zip (3.5 MB)


这个demo能复现
这个网页的原画面

@zlzhou.sh 我也遇到这个问题了,3.8.6的astc在ios上无法正常显示

我们跟进下。