Strange collisions (jitter?) on sharp edges of chainshape

Hi everyone!

I'm currently developing 2D side scroll game with Libgdx + Box2D.
And I'm facing some problems with ChainShape (the ground) and PolygonShape (the cart body) collisions.
Please look at this video: http://www.youtube.com/watch?v=gljgMn8lYfs

As you see the PolygonShape jitters(?) when collides with ChainShape. BUT it only happens on sharp edges!
What I've tried:
    - Increase/decrease velocityIterations/positionIterations. Didin't help. Currently they are set to 10/8 (as shown in video).
    - Turn off CCD. Didin't help. Currently is turned on.
    - Set velocityThreshold to zero. Didin't help. Currently is default - 1f.
    - Set restitution/friction values to zero. Didin't help.

Any suggestions why it's happening and how can I fix/avoid it? 🙁
Seems rewriting ground generation script to use PolygonShape for each segment instead of ChainShape fixed it!

The result:
Image
Physics working good now! 🙂
I think this is caused by the 'ghost vertices' of the chain shape, which are intended to prevent other bodies from getting stuck on the individual chain segments when sliding over a smooth chain. The problem seems to be when the chain is not smooth, as in this case, and the minimum angle between two consecutive segments is less than 90 degrees.

viewtopic.php?f=4&t=8867
http://code.google.com/p/box2d/issues/detail?id=286

The ideal solution is for Box2D itself not to use any ghost vertices when segments have an acute angle like this ( b2ChainShape::GetChildEdge? ) but you could work around it by either breaking the chain into two chains, separated at that point, or simply by making the ground from individual edge shapes.

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