Tripping over vertex in middle of chain shape

New poster here. I realise there are many posts concerning ghost collisions and solutions, but I seem to have an issue that isn't covered by the obvious solutions. The attached images show a body (composed of a box fixture and polygon 'ski' fixture) moving to the right over a chain shape ground. When it reaches the dropoff it jerks backward and then proceeds to rotate forwards about the point at the bottom right of the ski. You can see from the images that the jerking does not happen until a couple of frames after the ski vertex passes the ground vertex.

Some info:
The ski is a polygon shape made up of just the 4 vertices.
The first three vertices of the ground (which is created using CreateChain()) are (-2.5, 0), (2.5, 0), (9, -9).
The body is moving to the right at a speed of 3m/s (friction is zero)
Using iterations of 8/3 at 60 hertz.

If the ski is made twice as thick (vertically) the behaviour is smooth as expected. However I'd obviously rather understand why this is happening than just fiddle with things until the issue goes away under these particular conditions. Am I expecting too much for a polygon shape to ride smoothly along a chain shape? Is a looped chain shape any different from a polygon shape, and if so when is one preferable to the other?

Thanks for any suggestions.

**Error attaching images so uploaded to dropbox.**
Is this the debug draw display?
Nope, just a temporary drawing framework I threw together. I'm certain it's not an issue within the drawing code though, if that is what you were getting at? I have chart feedback confirming the behaviour is as shown. Or does posting images from this debug draw display you mentioned just make it easier for people to give feedback?

I tried adding a circle fixture at either end of the ski, each one slightly breaking the surface of the underside of the ski. I still see the same jerking backward though, so it would seem it maybe isn't a direct result of polygon-chain collision. Is there some information I could pull from a contact listener which might shed some light on what is happening?
Well... I guess I was getting at that, yes 🙂 I can't see anything obviously wrong with the situation as is, so was thinking perhaps we are not seeing the full situation.
The debug draw helps because it removes the rendering framework as a potential source of problems. It's often a good way to "understand why this is happening".
How thin is the ski? Making fixtures too small (or thin) can cause problems, usually they need to be really small before this shows up though (about 0.01 or so).
You could always just use the ski thicker since it fixes the problem, and just draw the graphics that the player will see as a thin ski. If making the ski fixture thicker will upset the balance or center of mass etc, you can have two fixtures. One would be the thicker size, but with zero density. The other would be the thin size, with the current density but set to not collide with anything (zero the mask of the collision filter).
Thanks for your input. I increased the ski thickness from 0.1 to 0.16, and while initially it fixed things, I'm still getting the issue in some situations. Your suggestions for working around it make sense, but for now I'm not so much bothered about making it work, as understanding Box2D and getting to know what it's capable of. It's not much use me tweaking things until I stop seeing the problem, if it subsequently shows up again under slightly different conditions.

I'm going to look into the testbed/debug draw code and see if I can reproduce the problem in a simplified program that I can post here.

Unrelated, but was interested to see your blog post about the inverted pendulum. As it happens I recently did the same thing with Box2D myself, but as a test case for my neural net/evolutionary algorithm framework. So far I just did the prismatic joint version, but once my framework is more fleshed out I plan to go back and add lots of variations on the simulation. All the publications I read were using the derived equation of motion for the system rather than a more generic physics simulation, it would be interesting to see how solutions in Box2D compare. Anyway your article and links will be useful!
Added testbed reproduction here (Skier.h). Explanation in the code.
Good demo. It looks like it is catching on the ghost vertices at that corner. Ghost vertices are not really relevant for convex corners anyway, so you can get around the problem by just breaking the chain shape at that corner. Eg. for the situation in your demo, the first flat part would be one chain shape, and the curve would be another chain shape.
viewtopic.php?f=9&t=9455
Thanks, you are correct, removing the ghost vertices does indeed resolve the issue.

Could you clarify regarding use of ghost vertices and convexity/concavity? Are you saying they shouldn't be used when the angle below the terrain is <180 degrees? My assumption was that this was the time they would be needed, since when the angle is >180 (eg. the ground goes from being horizontal to upward sloping to the right) then a collision should be detected. And my understanding was that ghost vertices are used to avoid detecting false collisions.

I've reduced the problem down to a simple terrain of 3 edge shapes, and submitted a new issue here. I read the posts you linked and the issue you submitted, however my feeling is that this is somewhat different, though probably related. Erin's comment was that it was caused by sharp angles and the polygon centroid crossing the edge, neither of which is the case in this instance.

Anyway, for now I'll just proceed without ghost vertices.

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