【求助】物理引擎testAABB init()报错

低版本创建的工程,用了物理引擎,1.7说修复了这个问题,我升级到1.7还是有这问题,现在升级1.8了,还是报错,为什么?
我用的mac版ccc开发的。
有开发团队的帮忙看一下吗,
Windows版本的1.8也报错。
我卡在这了。这个问题到底是没修复还是我没弄好,有知道的能说一下嘛?

代码

        checkArea1 = cc.rect(startP.x - w, startP.y + h, w, h);
        console.log(checkArea1);
        var colliderList1 = cc.director.getPhysicsManager().testAABB(checkArea1);
        console.log(colliderList1);

log

Rect {x: 760.8400198070406, y: 160, width: 160, height: 120}

Uncaught TypeError: Cannot read property ‘x’ of undefined
at PhysicsAABBQueryCallback.167.PhysicsAABBQueryCallback.init (CCPhysicsAABBQueryCallback.js:8)
at CCClass.testAABB (CCPhysicsManager.js:246)
at Object.hasDanger (AIUtil.js:161)
at Object.isSuitableMove (AIUtil.js:48)
at Object.getSuitableMoveDirection (AIUtil.js:16)
at TankScript.suitbaleMove (TankScript.js? [sm]:117)
at TankScript. (TankScript.js? [sm]:55)
at CallbackTimer.42.proto.trigger (CCScheduler.js:245)
at CallbackTimer.42.proto.update (CCScheduler.js:218)
at TheClass.update (CCScheduler.js:429)

开发团队的能不能帮我看看,是我弄错了,还是真有bug没解决。卡住了啊。拜托了

你 cc.log(startP.x)就知道了 估计你的startP里面没有x这个对象

加了log没问题呀

            checkArea1 = cc.rect(startP.x - w, startP.y + h, w, h);
            console.log(checkArea1);
            var colliderList1 = cc.director.getPhysicsManager().testAABB(checkArea1);
            console.log(colliderList1);

Rect {x: 760.8400198070406, y: 160, width: 160, height: 120}
CCPhysicsAABBQueryCallback.js:8 Uncaught TypeError: Cannot read property ‘x’ of undefined
at PhysicsAABBQueryCallback.167.PhysicsAABBQueryCallback.init (CCPhysicsAABBQueryCallback.js:8)
at CCClass.testAABB (CCPhysicsManager.js:246)
at Object.hasDanger (AIUtil.js:138)
at Object.isSuitableMove (AIUtil.js:48)
at Object.getSuitableMoveDirection (AIUtil.js:6)
at TankScript.suitbaleMove (TankScript.js? [sm]:117)
at TankScript. (TankScript.js? [sm]:55)
at CallbackTimer.42.proto.trigger (CCScheduler.js:245)
at CallbackTimer.42.proto.update (CCScheduler.js:226)
at TheClass.update (CCScheduler.js:429)

报错的x是引擎的代码中的x,不是我的代码的x

你给个demo看看啊

上传不了,写了个demo发了另一个帖子,帮我看一下

http://forum.cocos.com/t/testaabb/52814

兄弟试一下 确实是有bug 某些情况可能导致point参数为空报错 你跟着上面这个帖子操作一波就好了