-
Creator 版本:1.9.0
-
目标平台: 模拟器
-
详细报错信息,包含调用堆栈:error: vector iterator not incrementable
-
重现方式:见后文
-
之前哪个版本是正常的 :
-
手机型号 :
-
手机浏览器 :
-
编辑器操作系统 :Win10 x64
-
编辑器之前是否有其它报错 :
-
出现概率:
-
额外线索:
const {ccclass, property} = cc._decorator;
@ccclass
export default class NewClass extends cc.Component {
@property(dragonBones.ArmatureDisplay)
avatar: dragonBones.ArmatureDisplay = null;
start() {
this.avatar.addEventListener(dragonBones.EventObject.COMPLETE, (event)=>{
this.avatar.playAnimation('normal', 0);
}, this);
}
// 这是一个按钮的点击响应
changeAction() {
this.avatar.playAnimation('attack', 1);
}
}
在模拟器下调试,执行到监听事件中的playAnimation时会直接报错,但在Web环境下(Chrome 52),就可以正常执行。
然后,如果讲监听事件中的代码改为
this.scheduleOnce(()=>{
this.avatar.playAnimation('normal', 0);
}, 0);
模拟器下就没有问题了。
这个是就这么设计的,还是BUG?