iOS 11.4.1 使用官方 Demo 显示异常,背景部分黑屏

  • Creator 版本: 3.0.0

  • 目标平台: iOS

  • 重现方式:必现

  • 首个报错:

Xcode 控制台日志:

2021-03-25 15:34:19.739207+0800 NewProject_2-mobile[2600:891044] [DYMTLInitPlatform] platform initialization successful
2021-03-25 15:34:19.851620+0800 NewProject_2-mobile[2600:890950] Metal GPU Frame Capture Enabled
2021-03-25 15:34:19.852077+0800 NewProject_2-mobile[2600:890950] Metal API Validation Enabled
Initializing V8, version: 8.0.426.16
libuv version: 1.23.1-dev
Number of interfaces: 9
Debugger listening..., visit [
    devtools://devtools/bundled/js_app.html?v8only=true&ws=169.254.208.95:6086/00010002-0003-4004-8005-000600070008
    devtools://devtools/bundled/js_app.html?v8only=true&ws=10.183.22.183:6086/00010002-0003-4004-8005-000600070008
    devtools://devtools/bundled/js_app.html?v8only=true&ws=127.0.0.1:6086/00010002-0003-4004-8005-000600070008
  ] in chrome browser to debug!
For help see https://nodejs.org/en/docs/inspector
JS: Warning 3660, please go to https://github.com/cocos-creator/engine/blob/3d/EngineErrorMap.md#3660 to see details. Arguments: target, cc.TargetOverrideInfo
JS: Warning 3660, please go to https://github.com/cocos-creator/engine/blob/3d/EngineErrorMap.md#3660 to see details. Arguments: nodes, cc.MountedChildrenInfo
JS: Warning 3660, please go to https://github.com/cocos-creator/engine/blob/3d/EngineErrorMap.md#3660 to see details. Arguments: prefabRootNode, cc.PrefabInstance
JS: [PHYSICS]: Using ammo.js
15:34:20 [INFO]: In the default constructor of Map!
15:34:20 [INFO]: In the default constructor of Map!
15:34:20 [INFO]: Metal Feature Set: MTLFeatureSet_iOS_GPUFamily4_v1
15:34:20 [INFO]: standard|standard-vs:vert|standard-fs:frag|CC_SUPPORT_FLOAT_TEXTURE1 compile succeed.
15:34:20 [INFO]: standard|standard-vs:vert|standard-fs:frag|CC_SUPPORT_FLOAT_TEXTURE1|CC_FORWARD_ADD1 compile succeed.
15:34:20 [INFO]: standard|shadow-caster-vs:vert|shadow-caster-fs:frag|CC_SUPPORT_FLOAT_TEXTURE1 compile succeed.
15:34:20 [INFO]: unlit|unlit-vs:vert|unlit-fs:frag|CC_SUPPORT_FLOAT_TEXTURE1 compile succeed.
15:34:20 [INFO]: clear-stencil|sprite-vs:vert|sprite-fs:frag compile succeed.
15:34:20 [INFO]: sprite|sprite-vs:vert|sprite-fs:frag compile succeed.
15:34:20 [INFO]: sprite|sprite-vs:vert|sprite-fs:frag|USE_TEXTURE1 compile succeed.
15:34:20 [INFO]: sprite|sprite-vs:vert|sprite-fs:frag|USE_ALPHA_TEST1|USE_TEXTURE1 compile succeed.
15:34:20 [INFO]: sprite|sprite-vs:vert|sprite-fs:frag|USE_TEXTURE1|IS_GRAY1 compile succeed.
15:34:20 [INFO]: sprite|sprite-vs:vert|sprite-fs:frag|CC_USE_EMBEDDED_ALPHA1|USE_TEXTURE1 compile succeed.
15:34:20 [INFO]: sprite|sprite-vs:vert|sprite-fs:frag|CC_USE_EMBEDDED_ALPHA1|USE_TEXTURE1|IS_GRAY1 compile succeed.
15:34:20 [INFO]: graphics|vs:vert|fs:frag compile succeed.
15:34:20 [INFO]: particle|particle-vs-legacy:lpvs_main|tinted-fs:add compile succeed.
15:34:20 [INFO]: particle-gpu|particle-vs-gpu:gpvs_main|tinted-fs:add compile succeed.
15:34:20 [INFO]: particle-trail|particle-trail:vs_main|tinted-fs:add compile succeed.
15:34:20 [INFO]: billboard|vert:vs_main|tinted-fs:add compile succeed.
15:34:20 [INFO]: spine|sprite-vs:vert|sprite-fs:frag compile succeed.
15:34:20 [INFO]: splash-screen|splash-screen-vs:vert|splash-screen-fs:frag compile succeed.
15:34:20 [INFO]: Clear Render Area compile succeed.
JS: Success to load scene: db://assets/scene/login.scene
JS: Created Camera: UICamera_Canvas 1080x1920
JS: Created Camera: Camera 1080x1920
15:34:23 [INFO]: planar-shadow|planar-shadow-vs:vert|planar-shadow-fs:frag|CC_SUPPORT_FLOAT_TEXTURE1 compile succeed.
15:34:23 [INFO]: skybox|sky-vs:vert|sky-fs:frag compile succeed.
JS: login finished!
JS: subpackage download finished!
I/AudioEngine-inl.mm (318): OpenAL was initialized successfully!
JS: Created Camera: UICamera_Canvas 1080x1920
JS: Created Camera: Camera 1080x1920
15:34:24 [INFO]: planar-shadow|planar-shadow-vs:vert|planar-shadow-fs:frag|CC_SUPPORT_FLOAT_TEXTURE1|USE_INSTANCING1 compile succeed.
JS: ###playerData.instance.playerInfo.realLevel; 1
JS: ###level 1
JS: load level 1
JS: build path finished!
15:34:24 [INFO]: builtin-standard|standard-vs:vert|standard-fs:frag|CC_SUPPORT_FLOAT_TEXTURE1|CC_USE_FOG4|USE_ALBEDO_MAP1 compile succeed.
15:34:24 [INFO]: builtin-standard|standard-vs:vert|standard-fs:frag|CC_SUPPORT_FLOAT_TEXTURE1|CC_USE_FOG4|CC_FORWARD_ADD1|USE_ALBEDO_MAP1 compile succeed.
15:34:24 [INFO]: builtin-standard|shadow-caster-vs:vert|shadow-caster-fs:frag|CC_SUPPORT_FLOAT_TEXTURE1|USE_ALBEDO_MAP1 compile succeed.
15:34:24 [INFO]: builtin-standard|standard-vs:vert|standard-fs:frag|CC_SUPPORT_FLOAT_TEXTURE1|CC_USE_FOG4|USE_VERTEX_COLOR1|HAS_SECOND_UV1|USE_ALBEDO_MAP1 compile succeed.
15:34:24 [INFO]: builtin-standard|standard-vs:vert|standard-fs:frag|CC_SUPPORT_FLOAT_TEXTURE1|CC_USE_FOG4|CC_FORWARD_ADD1|USE_VERTEX_COLOR1|HAS_SECOND_UV1|USE_ALBEDO_MAP1 compile succeed.
15:34:24 [INFO]: builtin-standard|shadow-caster-vs:vert|shadow-caster-fs:frag|CC_SUPPORT_FLOAT_TEXTURE1|HAS_SECOND_UV1|USE_ALBEDO_MAP1 compile succeed.
JS: build plane finished!
JS: build road finished!
JS: build tree finished!
JS: build house finished!
JS: build sign finished!
15:34:24 [WARN]: Attribute a_texCoord1 is missing, add a dummy data for it.
15:34:24 [WARN]: Attribute a_tangent is missing, add a dummy data for it.
15:34:24 [WARN]: Attribute a_texCoord1 is missing, add a dummy data for it.
15:34:24 [INFO]: builtin-particle|particle-vs-legacy:lpvs_main|tinted-fs:add|CC_USE_WORLD_SPACE1 compile succeed.

console 日志

Warning 3660, please go to https://github.com/cocos-creator/engine/blob/3d/EngineErrorMap.md#3660 to see details. Arguments: target, cc.TargetOverrideInfo
src/cocos-js/ammo-instantiated-bf292a2f.js:1 Warning 3660, please go to https://github.com/cocos-creator/engine/blob/3d/EngineErrorMap.md#3660 to see details. Arguments: nodes, cc.MountedChildrenInfo
src/cocos-js/ammo-instantiated-bf292a2f.js:1 Warning 3660, please go to https://github.com/cocos-creator/engine/blob/3d/EngineErrorMap.md#3660 to see details. Arguments: prefabRootNode, cc.PrefabInstance
src/cocos-js/ammo-instantiated-bf292a2f.js:1 [PHYSICS]: Using ammo.js
src/cocos-js/ammo-instantiated-bf292a2f.js:1 LoadScene db://assets/scene/login.scene: 97.08770900964737ms
src/application.js:158 Success to load scene: db://assets/scene/login.scene
src/cocos-js/ammo-instantiated-bf292a2f.js:1 Created Camera: UICamera_Canvas 1080x1920
src/cocos-js/ammo-instantiated-bf292a2f.js:1 Created Camera: Camera 1080x1920
assets/main/index.js:87 login finished!
assets/main/index.js:87 subpackage download finished!
src/cocos-js/ammo-instantiated-bf292a2f.js:1 LoadScene main: 27.399749994277954ms
src/cocos-js/ammo-instantiated-bf292a2f.js:1 Created Camera: UICamera_Canvas 1080x1920
src/cocos-js/ammo-instantiated-bf292a2f.js:1 Created Camera: Camera 1080x1920
assets/main/index.js:113 ###playerData.instance.playerInfo.realLevel; 1
assets/main/index.js:113 ###level 1
assets/main/index.js:113 load level 1
assets/main/index.js:15 build path finished!
assets/main/index.js:15 build plane finished!
assets/main/index.js:15 build road finished!
assets/main/index.js:15 build tree finished!
assets/main/index.js:15 build house finished!
assets/main/index.js:15 build sign finished!
  • 之前哪个版本是正常的: iOS 14 正常
  • 手机型号: iPhone 8 plus
  • 手机浏览器:
  • 编辑器操作系统:
  • 重现概率: 稳定复现

可以看下,layer是UI_2D不

在 iOS 12 -14 系统上是可以的,另外这个不是 3D 项目吗?我们这边的需求也是 2D + 3D 的场景,目前遇到这个问题。感谢答复

通过模拟器测试情况如下:

机型 iPhone 8 plus

iOS 11.1 有问题
iOS 12.4 有问题
iOS 13.7 正常
iOS 14.2 正常

iPhone X iOS 11.1 上黑屏,报错信息基本一致

devtools 没有输出日志

Initializing V8, version: 8.0.426.16
libuv version: 1.23.1-dev
Number of interfaces: 12
Debugger listening..., visit [
    devtools://devtools/bundled/js_app.html?v8only=true&ws=169.254.100.45:6086/00010002-0003-4004-8005-000600070008
    devtools://devtools/bundled/js_app.html?v8only=true&ws=10.183.20.204:6086/00010002-0003-4004-8005-000600070008
    devtools://devtools/bundled/js_app.html?v8only=true&ws=127.0.0.1:6086/00010002-0003-4004-8005-000600070008
  ] in chrome browser to debug!
For help see https://nodejs.org/en/docs/inspector
JS: Warning 3660, please go to https://github.com/cocos-creator/engine/blob/3d/EngineErrorMap.md#3660 to see details. Arguments: target, cc.TargetOverrideInfo
JS: Warning 3660, please go to https://github.com/cocos-creator/engine/blob/3d/EngineErrorMap.md#3660 to see details. Arguments: nodes, cc.MountedChildrenInfo
JS: Warning 3660, please go to https://github.com/cocos-creator/engine/blob/3d/EngineErrorMap.md#3660 to see details. Arguments: prefabRootNode, cc.PrefabInstance
JS: [PHYSICS]: Using ammo.js
18:51:58 [INFO]: In the default constructor of Map!
18:51:58 [INFO]: In the default constructor of Map!
18:51:58 [INFO]: Metal Feature Set: MTLFeatureSet_iOS_GPUFamily1_v1
18:51:58 [ERROR]: [ERROR] file /Applications/CocosCreator/Creator/3.0.0/CocosCreator.app/Contents/Resources/resources/3d/cocos2d-x-lite/cocos/renderer/gfx-metal/MTLTexture.mm: line 103 
18:51:58 [ERROR]: CCMTLTexture: create MTLTexture failed.
18:51:58 [ERROR]: [ERROR] file /Applications/CocosCreator/Creator/3.0.0/CocosCreator.app/Contents/Resources/resources/3d/cocos2d-x-lite/cocos/renderer/gfx-metal/MTLTexture.mm: line 103 
18:51:58 [ERROR]: CCMTLTexture: create MTLTexture failed.
18:51:58 [ERROR]: [ERROR] file /Applications/CocosCreator/Creator/3.0.0/CocosCreator.app/Contents/Resources/resources/3d/cocos2d-x-lite/cocos/renderer/gfx-metal/MTLTexture.mm: line 103 
18:51:58 [ERROR]: CCMTLTexture: create MTLTexture failed.
18:51:58 [ERROR]: [ERROR] file /Applications/CocosCreator/Creator/3.0.0/CocosCreator.app/Contents/Resources/resources/3d/cocos2d-x-lite/cocos/renderer/gfx-metal/MTLTexture.mm: line 103 
18:51:58 [ERROR]: CCMTLTexture: create MTLTexture failed.
18:51:58 [ERROR]: [ERROR] file /Applications/CocosCreator/Creator/3.0.0/CocosCreator.app/Contents/Resources/resources/3d/cocos2d-x-lite/cocos/renderer/gfx-metal/MTLTexture.mm: line 103 
18:51:58 [ERROR]: CCMTLTexture: create MTLTexture failed.
18:51:58 [ERROR]: [ERROR] file /Applications/CocosCreator/Creator/3.0.0/CocosCreator.app/Contents/Resources/resources/3d/cocos2d-x-lite/cocos/renderer/gfx-metal/MTLTexture.mm: line 103 
18:51:58 [ERROR]: CCMTLTexture: create MTLTexture failed.
18:51:58 [ERROR]: [ERROR] file /Applications/CocosCreator/Creator/3.0.0/CocosCreator.app/Contents/Resources/resources/3d/cocos2d-x-lite/cocos/renderer/gfx-metal/MTLTexture.mm: line 103 
18:51:58 [ERROR]: CCMTLTexture: create MTLTexture failed.
18:51:58 [ERROR]: [ERROR] file /Applications/CocosCreator/Creator/3.0.0/CocosCreator.app/Contents/Resources/resources/3d/cocos2d-x-lite/cocos/renderer/gfx-metal/MTLTexture.mm: line 103 
18:51:58 [ERROR]: CCMTLTexture: create MTLTexture failed.
18:51:58 [ERROR]: [ERROR] file /Applications/CocosCreator/Creator/3.0.0/CocosCreator.app/Contents/Resources/resources/3d/cocos2d-x-lite/cocos/renderer/gfx-metal/MTLTexture.mm: line 103 
18:51:58 [ERROR]: CCMTLTexture: create MTLTexture failed.
18:51:58 [ERROR]: [ERROR] file /Applications/CocosCreator/Creator/3.0.0/CocosCreator.app/Contents/Resources/resources/3d/cocos2d-x-lite/cocos/renderer/gfx-metal/MTLTexture.mm: line 103 
18:51:58 [ERROR]: CCMTLTexture: create MTLTexture failed.

Hello 我在这里回复里通过模拟器验证了下问题

可以帮反馈给官方看下吗 感谢

新增问题,升级到 Cocos 3.3.1 后,在 iOS 13.6 上也出现该问题 @panda