I was doing some implementation of soft bodies on my current game. At first, I just implemented the btDX11SoftBodySolver, replacing the btDefaultSoftBodySolver, adding the ID3D11Device* and ID3D11DeviceContext* parameters (I am using immediate context).
The bullet library is 2.82 (I am not using SVN)
The soft bodies are loaded on user call (when the user loads a character, for instance), so initially, the physics world has no soft bodies registered.
But, at first frame, the software crashes, on btDX11SoftBodySolver::prepareCollisionConstraints(), line 1281.
It attempts to access an object in an array (m_perClothCollisionObjects), but since there are no objects, it just crashes. The surroundings are:
Code: Select all
// And update last cloth
m_perClothCollisionObjects[currentCloth].firstObject = startIndex;
m_perClothCollisionObjects[currentCloth].endObject = m_collisionObjectDetails.size();
Code: Select all
// And update last cloth
if (m_perClothCollisionObjects.size() > 0) {
m_perClothCollisionObjects[currentCloth].firstObject = startIndex;
m_perClothCollisionObjects[currentCloth].endObject = m_collisionObjectDetails.size();
}
I also created an issue on the tracker, here: https://code.google.com/p/bullet/issues/detail?id=775
Thanks,
Bruno