b2World:GetContactCount() - really high numbers

Hi there,

I'm working on finding the cause of a hang during the step() (specifically, ComputeTOI() ) function in my game, and I came upon something that might or not be normal. While the game is playing, I display the contacts count, and that number is always increasing (never going down). I'm not too sure how box2D handles things internally, but in my mind that can't be good.

So I went back to the testbed, and displayed that number. It gets to 500 contacts after 4-5 seconds in the ragdoll case.

Is this normal? I kind of hope it isn't and leads me to find the cause of my hang 🙂

Attached is the testbed showing the number of contacts. (I took only the Examples folder, since zipping everything is too large for the forum)

Thanks for your help on this!
-Swah
Verified. Wow, that's pretty terrible. I'll investigate, it's definitely not meant to be like that...
Fixed, it was just miscounting.
Glad you found the problem!

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