Why do balls stick to wall...?

(I'm cross-posting this stackoverflow/box2d/bulletphysics forums.)

I'm making a pool game like game which needs exact bounces.
But something like this happens when I tested my configuration.

Image

If there is a wall on top of this image, red line is regular course of the regular pool game. But the engine shows green line course so often. Especially,

1. This happens after a ball moving slowly hits the wall.
2. Sometimes a ball moving fast get slower suddenly.

I know the green line course can be happen in real pool game, but it should be rarely. The problem is it happens too often. Finally, most of balls stick to walls, only a few balls are remain in center.

At first, I understood this as limitation of engine by approximation for performance. So I asked another engine in stackoverflow.com. But people said this is problem of configuration. I tried many configurations over few days, but I couldn't find solution. Current my configuration is:

Walls
- static box shape
- linear/angular damping = 0.1
- restitution = 1.0
- friction = 100
- density = 10
- bullet = false
- fixed rotation = false
- inertial scale = 1.0

Balls
- dynamic sphere shape
- linear/angular damping = 0.1
- restitution = 1.0
- friction = 100
- density = 20
- bullet = true
- fixed rotation = false
- inertial scale = 1.0

Can I know why this happens and how can I correct result?
I meet the same problem and who can help...
Try setting friction and damping to zero. Also, try adjusting the velocity tolerances in b2Settings.h. Are you using pixels or meters for your dimensions?
I change the const float32 b2_velocityThreshold = 1.0f value
in b2Settings.h and solve the problem ,thanks so much
Wow!!!!!!!!!!!!!!!!!!!!!!!!
It fixed!!! Thanks a alot!!

I changed velocity b2_velocityThreshold to 0.0f and it's working well now even with keeping friction and damping!
Also, it's working well with friction and damping = 0.0f.

I'm using meter (SI) dimensions.

What's this parameter? It looks something related to performance so it seems not a good idea setting this to 0.0f. Is there recommended or valid value range definition for this? Or where can I find information about theses parameters?

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