crueleva1 / dynamica

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

btGimpactTriangleMeshShapes crash when used from btBulletWorldImporter unless loadFileFromMemory is used #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The way btGimpactTriangleMeshShapes are designed they do not retain ownership 
of their vertex and index data. btBulletWorldImporter currently does not create 
a run time copy of this data so once loadFile() finishes, the 
btStridingMeshInterfaceData structures used during the load are discarded and 
the btGimpactTriangleMeshShape will crash during a debugRender call or 
collision test. 

I've included a patch file that fixes this problem for the time being. It might 
be worth exploring changing the design of btGimpactTriangleMeshShapes to take 
owner ship of this data or to make its own copy of it, but this fix takes care 
of the problem in a way in tune with how btBulletWorldImporter manages data.

Original issue reported on code.google.com by cont...@vicariousentertainment.com on 15 Feb 2011 at 2:00

Attachments:

GoogleCodeExporter commented 9 years ago
Fixed here:
http://code.google.com/p/bullet/source/detail?r=2336

Thanks for the report!

Original comment by erwin.coumans on 12 Mar 2011 at 6:18