Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug / Crash  IdentifyMovingColliders.Execute OutOfBound crash
#2
Well, I realize that there is still a place in the IdentifyMovingColliders.Execute that is testing if we are a "removed" shape/collider by testing "i >= colliderCount".

And that the cellSpans count is indeed reduced if it doesn't match the colliderCount, so it's not only growing in count (only in capacity!)


Code:
            // remove tail from the current spans array:
            if (colliderCount < cellSpans.count)
                cellSpans.count -= cellSpans.count - colliderCount;

So I guess the only issue we had is that we manage to have a zeroed shape that was still doing some computation and accessing an out of bound index in the collisionMaterials array that is the only unprotected access in the code, and we should have not noticed the out of bound access if we had at least one collision material !

It was not the point of this topic, but the question that came to me is: is it important for the simulation to have collisionMaterials? Or the default values without material are okay?
Reply


Messages In This Thread
RE: IdentifyMovingColliders.Execute OutOfBound crash - by Guillaume - 24-04-2024, 08:42 AM