favreau / bullet

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

Default constructor for btBvhTriangleMeshShape causes NULL dereference #465

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Invoke the default constructor for btBvhTriangleMeshShape

What is the expected output? What do you see instead?

Some kind of btBvhTriangleMeshShape should be initialized, perhaps not into a 
usable state.  Or the initialization should fail because initializing 
btBvhTriangleMeshShape without extra information doesn't make sense.

What happens instead is that btBvhTriangleMeshShape calls up to 
btTriangleMeshShape with NULL as the value for the single 
`btStridingMeshInterface* meshInterface` parameter.  The btTriangleMeshShape 
constructor immediately does `meshInterface->hasPremadeAabb()`.

What version of the product are you using? On what operating system?

Bullet 2.77, Ubuntu 9.10

Please provide any additional information below.

Original issue reported on code.google.com by calderon...@gmail.com on 17 Dec 2010 at 10:46

GoogleCodeExporter commented 9 years ago

This default constructor shouldn't even exist, and the default  constructor of 
btMultimaterialTriangleMeshShape neither. 

We should remove both. In the meanwhile, please avoid it.

Original comment by erwin.coumans on 21 Dec 2010 at 12:28

GoogleCodeExporter commented 9 years ago
Fixed in latest trunk. 
http://code.google.com/p/bullet/source/detail?r=2257

Thanks for the report!
Erwin

Original comment by erwin.coumans on 7 Jan 2011 at 5:52