Problem: Dynamic bodies flying through static bodies

This video explains my problem:
http://www.youtube.com/watch?v=ORQrS56pGpA

What is causing this?

I fixed one of the walls by tweaking its coordinates slightly:
from this
{0,910} , {630,910} , {630,1000} , {0,1000}
to this
{100,910} , {630,910} , {630,1000} , {100,1000}

Intersecting static bodies doesn't seem to cause this problem. It's something much more mysterious, since I just shortened the wall slightly to make it work.

Please help!
Wow weird. Is that a 'debug draw' rendering of the scene?
Yes.
I use Slick 2D for rendering.
Ok, I got one of the walls working by changing the position of the body's origin.
It seems like the origin must be inside the body, even if it's a static one.
Image

But I find it weird that some (actually most) of the walls I've created the wrong way do work.
I'd like to see someone else to replicate this problem, and find a solid solution for it.
I can see from your scene that you are no newbie, but just in case... is the polygon wound the right way?
I might be a newbie since I don't understand what you mean by "polygon wound" 😛

Do you mean if the corners of the polygon are read in the correct order, like, clockwise or counterclockwise?
Yes, I think I'm creating the polygons the right way, as far as that goes.
Yeah that's right. This sounds like a bug somewhere. The only thing that is a little unusual is the large sizes of your dimensions but it should still work ok.
Is this an up-to-date version? I seem to recall toucansam updated the java port recently, maybe you could check into that.
The dimensions are large because I give them as pixels (when zoom is in 1:1 ratio), but then I have a method to convert the dimensions into smaller values so that it's fine for JBox2D. I have a very recent version of the Java port, and I don't think such a huge and obvious bug could be in the port. The problem must be in the way I use it.

Have you tried to make a static body where the origin is far away outside of the body?
For instance, if the origin is at 0,0 then the actual shape would be somewhere around 10,10 which is a huge offset in JBox2D's coordinate system.

I don't know if the origin (that is used when a body is created) is used for the collision detection at all, but at least by tweaking it I managed to fix one of the walls.
The location of the body's reference point aka location should not make any difference, especially for static bodies. It's more likely that the locations of the fixture itself that has relevance...
Are you able to narrow this down to a very small test case that shows these symptoms? You might be able to get that nice person 'Somebody' to look at it. It seems like something that should be looked at. I still have my doubts that it is happening in the C++ version.
can you verify which version of the engine you're using?

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