Box2D使用Destory join报错?

使用box2d物理系统 在destory被collider绑定的sprite时会报错
Error
preload.js:55
    at Object.box2d.b2Assert (file:///D:/develop/layaspace/smallballs/bin/libs/laya.physics.js:38:57)
    at box2d.b2World.DestroyJoint (file:///D:/develop/layaspace/smallballs/bin/libs/laya.physics.js:793:295)
    at Physics.__proto._removeJoint (file:///D:/develop/layaspace/smallballs/bin/libs/laya.physics.js:3091:15)
    at DistanceJoint.__proto._onDisable (file:///D:/develop/layaspace/smallballs/bin/libs/laya.physics.js:1748:13)
    at DistanceJoint.__proto._setActive (file:///D:/develop/layaspace/smallballs/bin/libs/laya.core.js:731:26)
    at Sprite.__proto._inActiveHierarchy (file:///D:/develop/layaspace/smallballs/bin/libs/laya.core.js:13622:24)
    at Sprite.__proto._onRemoved (file:///D:/develop/layaspace/smallballs/bin/libs/laya.core.js:13650:58)
    at Sprite.__proto._setParent (file:///D:/develop/layaspace/smallballs/bin/libs/laya.core.js:13367:10)
    at Sprite.__proto._setParent (file:///D:/develop/layaspace/smallballs/bin/libs/laya.core.js:18323:31)
    at MainScene.__proto.removeChildAt (file:///D:/develop/layaspace/smallballs/bin/libs/laya.core.js:13307:9)
但并不是每次都报错 偶尔报一次? 请问这是什么原因造成的
已邀请:

pal

赞同来自:

每次destory都要调用两次destroyJoint 
;box2d.ENABLE_ASSERTS&&box2d.b2Assert(0<this.m_jointCount);
这句话会报错

laya_Aaron

赞同来自:

提供复现精简demo

要回复问题请先

商务合作
商务合作