Prismatic Joint doesn't work

Here's how it works:

If you set the body type to dynamic yet set all fixture densities to zero, then the body's mass is forced to one and the inverse inertia is set to zero. The reason is that I want all dynamic bodies to be movable. This way I don't need redundant checks like:

if (type == b2_dynamicBody && body->GetMass() > 0.0) ....

Now prismatic joints don't work when both bodies have fixed rotation (inverse inertia is zero). I think this could be fixed, but I'm not sure if it is worth the extra code and branches.
So whats the difference between Prismatic and Line joints?
No difference according to the comments. Hmm.

There is a line joint test that shows the difference.
Well apparently, one difference is that line joints still work with infinite rotational inertia.

Although I'm confused by one thing. CreateFixture says that it automatically updates the mass of the body. So why was there a problem? Don't Dynamic bodies automatically have mass anyway?
In your case, the density of your fixtures was zero. You can't get a non-zero mass when your shapes have zero density. In this case the system forces the mass to be 1.0, and the inverse inertia to zero.

The fix in your case is to get rid of the fixed rotation setting and make your call to create a fixture like this:

float32 density = 1.0f;
body->CreateFixture(&shape, density);

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