Parallel dispatcher seg fault

Rob2687
Posts: 5
Joined: Sat Jun 28, 2008 12:25 am

Parallel dispatcher seg fault

Post by Rob2687 »

I set up a world that consists of btConvexHullShapes based on the BSP demo. The only other things that are being placed in the world are btBoxShapes and btSphereShapes.

With the SpuGatheringCollisionDispatcher it is crashing in the btGjkEpa2.cpp on line 85.

It crashes 100% of the time with box/convex hull collisions occur. It also does it with sphere/convex collisions (but it seems to only it after I've dropped a few hundred spheres onto the convex hull. I've tried just boxes on a static plane and similarly it crashes after a few boxes have collided with each other. It seems pretty random but box/convex hull collisions are a guaranteed crash.

The same thing happens with Win32 Threads and Posix Threads.

This is what the call stack shows:

Code: Select all

 	cdcdcdcd()	
>	engine.exe!gjkepa2_impl::MinkowskiDiff::Support1(const btVector3 & d={...})  Line 85 + 0x2c bytes	C++
 	engine.exe!gjkepa2_impl::MinkowskiDiff::Support(const btVector3 & d={...})  Line 89 + 0x1d bytes	C++
 	engine.exe!gjkepa2_impl::GJK::getsupport(const btVector3 & d={...}, gjkepa2_impl::GJK::sSV & sv={...})  Line 333 + 0x10 bytes	C++
 	engine.exe!gjkepa2_impl::GJK::appendvertice(gjkepa2_impl::GJK::sSimplex & simplex={...}, const btVector3 & v={...})  Line 344	C++
 	engine.exe!gjkepa2_impl::GJK::Evaluate(const gjkepa2_impl::MinkowskiDiff & shapearg={...}, const btVector3 & guess={...})  Line 166	C++
 	engine.exe!SpuGjkEpaSolver2::Penetration(void * shapeA=0x05402280, SpuConvexPolyhedronVertexData * convexDataA=0x054031f0, int shapeTypeA=4, float marginA=0.039999999, const btTransform & wtrs0={...}, void * shapeB=0x05402380, SpuConvexPolyhedronVertexData * convexDataB=0x05403a00, int shapeTypeB=0, float marginB=0.039999999, const btTransform & wtrs1={...}, const btVector3 & guess={...}, SpuGjkEpaSolver2::sResults & results={...})  Line 806 + 0x26 bytes	C++
 	engine.exe!SpuEpaPenetrationDepthSolver::calcPenDepth(SpuVoronoiSimplexSolver & simplexSolver={...}, void * convexA=0x05402280, void * convexB=0x05402380, int shapeTypeA=4, int shapeTypeB=0, float marginA=0.039999999, float marginB=0.039999999, btTransform & transA={...}, const btTransform & transB={...}, btVector3 & v={...}, btVector3 & pa={...}, btVector3 & pb={...}, btIDebugDraw * debugDraw=0x00000000, btStackAlloc * stackAlloc=0x00000000, SpuConvexPolyhedronVertexData * convexVertexDataA=0x054031f0, SpuConvexPolyhedronVertexData * convexVertexDataB=0x05403a00)  Line 33 + 0x5b bytes	C++
 	engine.exe!SpuGjkPairDetector::getClosestPoints(const SpuClosestPointInput & input={...}, SpuContactResult & output={...})  Line 254 + 0x91 bytes	C++
 	engine.exe!ProcessSpuConvexConvexCollision(SpuCollisionPairInput * wuInput=, CollisionTask_LocalStoreMemory * lsMemPtr=, SpuContactResult & spuContacts=)  Line 566	C++
 	engine.exe!handleCollisionPair(SpuCollisionPairInput & collisionPairInput={...}, CollisionTask_LocalStoreMemory & lsMem={...}, SpuContactResult & spuContacts={...}, unsigned int collisionShape0Ptr=88183568, void * collisionShape0Loc=0x05402280, unsigned int collisionShape1Ptr=88175472, void * collisionShape1Loc=0x05402380, bool dmaShapes=true)  Line 631 + 0x11 bytes	C++
 	engine.exe!processCollisionTask(void * userPtr=, void * lsMemPtr=)  Line 983 + 0x4c bytes	C++
 	engine.exe!Thread_no_1(void * lpParam=0x05400780)  Line 64 + 0x15 bytes	C++
 	kernel32.dll!761f4911() 	
 	[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]	
 	ntdll.dll!771fe4b6() 	
 	ntdll.dll!771fe489() 	
Rob2687
Posts: 5
Joined: Sat Jun 28, 2008 12:25 am

Re: Parallel dispatcher seg fault

Post by Rob2687 »

It runs okay when the build target is Release instead of Debug.