So far it works fine for simple shapes like box, sphere, but when i created a simple mesh shape for the static ground shape, i get an unhandled exception error as soon as the scene starts.
The call stack looks like this:Unhandled exception at 0x00e8919d in chaosFrame.exe: 0xC0000005: Access violation reading location 0x02a22ae0.
If i disable debug drawing, the program runs for a while (a box falls down) and then crashes when it (presumably) collides with the mesh shape. The call stack then looks like:> chaosFrame.exe!`btBvhTriangleMeshShape::processAllTriangles'::`2'::MyNodeOverlapCallback::processNode(int nodeSubPart, int nodeTriangleIndex) Line 299 + 0xb bytes C++
chaosFrame.exe!btQuantizedBvh::walkStacklessQuantizedTree(btNodeOverlapCallback * nodeCallback, unsigned short * quantizedQueryAabbMin, unsigned short * quantizedQueryAabbMax, int startNodeIndex, int endNodeIndex) Line 712 + 0x21 bytes C++
chaosFrame.exe!btQuantizedBvh::reportAabbOverlappingNodex(btNodeOverlapCallback * nodeCallback, const btVector3 & aabbMin, const btVector3 & aabbMax) Line 329 C++
chaosFrame.exe!btBvhTriangleMeshShape::processAllTriangles(btTriangleCallback * callback, const btVector3 & aabbMin, const btVector3 & aabbMax) Line 329 C++
chaosFrame.exe!btCollisionWorld::debugDrawObject(const btTransform & worldTransform, const btCollisionShape * shape, const btVector3 & color) Line 1285 + 0x2a bytes C++
chaosFrame.exe!btCollisionWorld::debugDrawWorld() Line 1376 + 0x25 bytes C++
chaosFrame.exe!btDiscreteDynamicsWorld::debugDrawWorld() Line 121 C++
chaosFrame.exe!CsGame::Physics() Line 66 + 0x17 bytes C++
chaosFrame.exe!CsGame::Run() Line 224 C++
... etc.
> chaosFrame.exe!`btBvhTriangleMeshShape::processAllTriangles'::`2'::MyNodeOverlapCallback::processNode(int nodeSubPart, int nodeTriangleIndex) Line 299 + 0xb bytes C++
chaosFrame.exe!btQuantizedBvh::walkStacklessQuantizedTree(btNodeOverlapCallback * nodeCallback, unsigned short * quantizedQueryAabbMin, unsigned short * quantizedQueryAabbMax, int startNodeIndex, int endNodeIndex) Line 712 + 0x21 bytes C++
chaosFrame.exe!btQuantizedBvh::reportAabbOverlappingNodex(btNodeOverlapCallback * nodeCallback, const btVector3 & aabbMin, const btVector3 & aabbMax) Line 329 C++
chaosFrame.exe!btBvhTriangleMeshShape::processAllTriangles(btTriangleCallback * callback, const btVector3 & aabbMin, const btVector3 & aabbMax) Line 329 C++
chaosFrame.exe!btConvexConcaveCollisionAlgorithm::processCollision(btCollisionObject * body0, btCollisionObject * body1, const btDispatcherInfo & dispatchInfo, btManifoldResult * resultOut) Line 197 + 0x2e bytes C++
chaosFrame.exe!btCollisionDispatcher::defaultNearCallback(btBroadphasePair & collisionPair, btCollisionDispatcher & dispatcher, const btDispatcherInfo & dispatchInfo) Line 268 + 0x28 bytes C++
chaosFrame.exe!btCollisionPairCallback::processOverlap(btBroadphasePair & pair) Line 224 + 0x21 bytes C++
chaosFrame.exe!btHashedOverlappingPairCache::processAllOverlappingPairs(btOverlapCallback * callback, btDispatcher * dispatcher) Line 387 + 0x13 bytes C++
chaosFrame.exe!btCollisionDispatcher::dispatchAllCollisionPairs(btOverlappingPairCache * pairCache, const btDispatcherInfo & dispatchInfo, btDispatcher * dispatcher) Line 238 + 0x17 bytes C++
chaosFrame.exe!btCollisionWorld::performDiscreteCollisionDetection() Line 214 + 0x37 bytes C++
chaosFrame.exe!btDiscreteDynamicsWorld::internalSingleStepSimulation(float timeStep) Line 318 + 0xf bytes C++
chaosFrame.exe!btDiscreteDynamicsWorld::stepSimulation(float timeStep, int maxSubSteps, float fixedTimeStep) Line 281 + 0x19 bytes C++
chaosFrame.exe!CsGame::Physics() Line 60 + 0x2d bytes C++
chaosFrame.exe!CsGame::Run() Line 224 C++
... etc
The mesh shape I created in 3DS Max looks like this:

I created a plane, converted it to editable poly and translated the vertices to create a distorted shape as shown. Then I added them to physics from the bullet control panel, and the simulation runs fine from within 3DS Max.
But the program crashes when I try to use the .bullet file. I even tried a much simpler mesh with only 16 vertices.
What am I doing wrong? Is there a specific set of steps I need to follow to generate meshes from 3DS Max? Please help.