lianlab / bullet

Automatically exported from code.google.com/p/bullet
0 stars 0 forks source link

Invalid node creation in btCompoundShape::addChildShape #184

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
To reproduce problem:
1. Add any shape to btCompoundShape::addChildShape
2. Try to change child shape transform with
btCompoundShape::updateChildTransform

After that updateChildTransform crashes on
m_dynamicAabbTree->update(m_children[childIndex].m_node,bounds) cause
m_children[childIndex].m_node was not created in addChildShape.
To fix this change in addChildShape line 78:
child.m_node = m_dynamicAabbTree->insert(bounds,(void*)index);
to 
m_children[index].m_node = m_dynamicAabbTree->insert(bounds,(void*)index);

Original issue reported on code.google.com by vlad.sob...@gmail.com on 4 Feb 2009 at 5:56

GoogleCodeExporter commented 9 years ago
This issue was fixed on latest revision of btCompoundShape.cpp in SVN.

Original comment by vlad.sob...@gmail.com on 5 Feb 2009 at 2:22

GoogleCodeExporter commented 9 years ago
... not fixed :)
I was tried new code on the different test, it still fails.
So my fix: replace line:
child.m_node = m_dynamicAabbTree->insert(bounds,(void*)index);
with
m_children[index].m_node = m_dynamicAabbTree->insert(bounds,(void*)index);

works.

Original comment by vlad.sob...@gmail.com on 5 Feb 2009 at 2:45

GoogleCodeExporter commented 9 years ago

Thanks for the report.

Can you please create a reproduction case that shows that the latest SVN trunk 
fails, 
when updating children in a btCompoundShape?

Original comment by erwin.coumans on 5 Feb 2009 at 5:50

GoogleCodeExporter commented 9 years ago
This issue was fixed in the latest revision from SVN.
I had a crash on the different branch with old version of addChildShape.

Thanks for reply

Original comment by vlad.sob...@gmail.com on 5 Feb 2009 at 6:54

GoogleCodeExporter commented 9 years ago

Original comment by erwin.coumans on 6 Feb 2009 at 5:49