preventRotation on jointed bodies?

I am working on a game where the physics bodies do not rotate at all. I am using the preventRotation flag (set to true) on the body to achieve this. Thats working good. The problem is that some of these bodies have joints generated at run-time (to other dynamic objects) and these seem to conflict with the preventRotation. When I create a new joint then both bodies just snap to the 0,0 of the screen. I am testing with both prismatic and distance joints which show the same issue. What exactly am I doing wrong here?

I managed to get this situation somewhat working by setting the preventRotation to true only on one of the jointed bodies. That appears to work for 2 bodies at a time. However I plan on having multiple joints created (not necessarily only one per body) so I can see this situation getting tricky. I also tried setting the m_invI to 0.0 directly, but this seem to do the same thing as preventRotation. So basically how do I deal with this situation of multiple non-rotating bodies with interconnecting joints?
There is a bug where the prismatic joint computes 1 / (invI1 + invI2), which is infinity in your case. I set the result to zero and it works correctly. This will go into SVN soon.

I didn't see a problem with the distance joint.
Ok, thanks a lot man. I figured it was something like that (those pesky divide by zeros). I just didn't want to go in hacking up the API if it was something I was doing wrong. I just went in and set a fallback for the m_angularMass equal to 0.0 and that seemed to fix it. Thanks a bunch.

I just double checked and I was mistaken about the distance joint. I guess it was only the prismatic joints that had the issue. I must have got confused when I was testing.

Also, very nice library you have here. Much appreciation.

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