crash with the following simple code

As shown in KDE bug https://bugs.kde.org/show_bug.cgi?id=258998 and https://git.reviewboard.kde.org/r/107739/, the following code asserts:

int main(int argc, char **argv)
{
b2Vec2 vv[8];
vv[0].Set(0.200000,0);
vv[1].Set(0.141421,-0.159099);
vv[2].Set(0.000000,-0.225000);
vv[3].Set(-0.141421,-0.159099);
vv[4].Set(-0.200000,-0.000000);
vv[5].Set(-0.141421,0.159099);
vv[6].Set(-0.000000,0.225000);
vv[7].Set(0.141421,0.159099);


b2Vec2 v = ComputeCentroid(vv, 8);
}

b2Vec2 ComputeCentroid(const b2Vec2*, int32): La declaración `area > b2_floatValues<sizeof(qreal)>::epsilon()' no se cumple. // sorry, message in spanish

We've solved it in kolf using abs to sum the triangles areas.
This is because the ComputeCentroid function expects to deal with polygons defined with a counter-clockwise vertex winding. I don't think this function is commonly used on its own, it would usually be called by other functions as part of creating a fixture. The most recent version of Box2D should take care of incorrect vertex windings when creating fixtures, but I guess this helper function still expects the correct winding.

Original thread: https://box2d.org/forum/viewtopic.php?t=8998