Lines/unclosed polygons in Box2d

So, I'm creating a game where my user can draw a 'line' made of of several 'line segments'

So, essentially an unclosed polygon - see the attached image for 2 examples.

Can I create unclosed polygon bodies in Box2d?
Yes, but they cannot collide with each other.
Sorry to open a "solved" topic, but how would I do this?

I want to create a simple polygon that is unclosed and made up of some lines. The problem is that when I do this, I get this assertion:

Code:
/build/src/Box2D_v2.1.2/Box2D/Box2D/Collision/Shapes/b2PolygonShape.cpp:127: b2Vec2 ComputeCentroid(const b2Vec2*, int32): Assertion `area > 1.19209289550781250000e-7F' failed.
The program has unexpectedly finished.


I don't understand why this is happening and also how can I fix this?
Use edge or loop shapes, not polygons.

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