box2d icon indicating copy to clipboard operation
box2d copied to clipboard

Needed fix for benchmark

Open DanielUranga opened this issue 10 years ago • 2 comments

I've ported a benchmark that compares this version of Box2d to a native "linc" c++ one: https://github.com/DanielUranga/haxe_box2d_benchmarks I think this can be highly interesting to measure hxcpp performance vs native.

The problem is that the Haxe version crash due to this: https://github.com/openfl/box2d/blob/master/box2D/dynamics/B2Body.hx#L77

Any chance we could fix it?

DanielUranga avatar Jan 27 '16 00:01 DanielUranga

Can we compare to Box2DFlash and see if this is in the original code or not? Are you sure that's the cause of the crash?

jgranick avatar Jan 28 '16 20:01 jgranick

This is the stacktrace:

Called from ? line 1
Called from MainBox2dHaxe.hx line 26
Called from box2D/dynamics/B2Body.hx line 169
Called from box2D/dynamics/B2Body.hx line 132
Called from box2D/dynamics/B2Fixture.hx line 320
Uncaught exception - Invalid field access : computeAABB

It calls m_shape.computeAABB(m_aabb, xf); on B2Fixture line 320, but m_shape is null.

DanielUranga avatar Jan 28 '16 22:01 DanielUranga