Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ResetMassData asserts and crashes client application #756

Open
simonvanbernem opened this issue Oct 28, 2023 · 0 comments
Open

ResetMassData asserts and crashes client application #756

simonvanbernem opened this issue Oct 28, 2023 · 0 comments

Comments

@simonvanbernem
Copy link
Sponsor

Box2d triggers the assert b2Assert(m_I > 0.0f); at b2_body.cpp:337 when creating a b2Body with a single fixture with density 1 and the b2PolygonShape with the following 3 vertices (given as hex for exact reproducibility):

x0: 0xc28e8d90 //-71.27
y0: 0x42100000 //36.00
x1: 0xc28eb4be //-71.35
y1: 0x42104e5f //36.07
x2: 0xc28ebf3e //-71.37
y2: 0x42100000 //36.00

These vertices seem to survive the vertex welding done by b2PolygonShape::Set just fine, but probably cause rounding errors in exactly the right way to trigger the assert.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant