在编辑器上非活跃node的label下,batch as bitmap勾选时弹出警告

  • Creator 版本:v2.0.7

  • 目标平台:微信小游戏

  • 详细报错信息,包含调用堆栈:在今天更换了新版本creator后,使用新版本的batch as bitmap调整了一些文字固定的label,发现在有些label勾选batch as bitmap时会弹出警告:
    Failed to set property lb_CAPION to true at batchAsBitmap, TypeError: Cannot read property ‘_texture’ of null
    at cc_Label._activateMaterial (E:\CocosCreator_v207\resources\engine\bin.cache\dev\cocos2d\core\components\CCLabel.js:384:36)
    at cc_Label.set [as batchAsBitmap] (E:\CocosCreator_v207\resources\engine\bin.cache\dev\cocos2d\core\components\CCLabel.js:256:30)
    at u (E:\CocosCreator_v207\resources\app.asar\editor\page\scene-utils\set-property-by-path.js:1:2055)
    at y (E:\CocosCreator_v207\resources\app.asar\editor\page\scene-utils\set-property-by-path.js:1:3802)
    at Object.b [as setPropertyByPath] (E:\CocosCreator_v207\resources\app.asar\editor\page\scene-utils\set-property-by-path.js:1:4969)
    at Object.setProperty (E:\CocosCreator_v207\resources\app.asar\editor\page\scene-utils\utils\scene.js:1:8276)
    at HTMLElement.set-property (E:\CocosCreator_v207\resources\app.asar\editor\builtin\scene\panel\messages\scene-operation.js:1:782)
    at Object.e._dispatch (E:\CocosCreator_v207\resources\app.asar\editor-framework\lib\renderer\panel.js:1:1941)
    at EventEmitter.o.on.s (E:\CocosCreator_v207\resources\app.asar\editor-framework\lib\renderer\ipc.js:1:2917)
    at emitMany (events.js:127:13)
    at EventEmitter.emit (events.js:204:7)

后来发现在label非活跃时勾选该功能就会出现警告,模拟器运行时倒是没发现问题。
取消勾选也会弹出警告。

  • 重现方式:建立一个button,将编辑器中button设置为非活跃,关闭项目,再次启动后,不要激活button的active,直接设置button下的label的batch as bitmap应该久会弹出这个无用警告了

  • 编辑器操作系统 :windows10

  • 编辑器之前是否有其它报错 :

  • 出现概率:基本次次出现

  • 额外线索:
    这是勾选关闭两次batch as bitmap时出现的警告
    Failed to set property lb_CAPION to true at batchAsBitmap, TypeError: Cannot read property ‘_texture’ of null

Failed to set property lb_CAPION to false at batchAsBitmap, TypeError: Cannot read property ‘_resetDynamicAtlasFrame’ of null

Failed to set property lb_CAPION to true at batchAsBitmap, TypeError: Cannot read property ‘_texture’ of null

Failed to set property lb_CAPION to false at batchAsBitmap, TypeError: Cannot read property ‘_resetDynamicAtlasFrame’ of null

另外,已连接的预览设备数始终为0

感谢反馈,正在查这个问题,后面会修复一下

2.0.9还没改好这个问题
2.1.1 也有这个问题