Found an infinite loop when b2_maxProxies is set to 65536:
From SVN a few days ago:
Since the iteration uses a uint16, i will never reach 65536.
Dunno if you're supposed to be able to go so high. There are similar problems in AABB debug drawing and something which gets close to being wrong in the b2BroadPhase constructor. b2_maxProxies is declared to be an int32 though. b2_maxPairs doesn't seem to have this problem since it uses int32 for indices.
From SVN a few days ago:
Code:
void b2BroadPhase::IncrementTimeStamp()
{
if (m_timeStamp == B2BROADPHASE_MAX)
{
for (uint16 i = 0; i < b2_maxProxies; ++i)
{
m_proxyPool[i].timeStamp = 0;
}
m_timeStamp = 1;
}
else
{
++m_timeStamp;
}
}
{
if (m_timeStamp == B2BROADPHASE_MAX)
{
for (uint16 i = 0; i < b2_maxProxies; ++i)
{
m_proxyPool[i].timeStamp = 0;
}
m_timeStamp = 1;
}
else
{
++m_timeStamp;
}
}
Since the iteration uses a uint16, i will never reach 65536.
Dunno if you're supposed to be able to go so high. There are similar problems in AABB debug drawing and something which gets close to being wrong in the b2BroadPhase constructor. b2_maxProxies is declared to be an int32 though. b2_maxPairs doesn't seem to have this problem since it uses int32 for indices.