I try to use the parallel dispatcher and the parallel solver. Bullet version 2.76.
The application runs OK with the simulation turned OFF. If I turn the simulation ON, then it runs for 2 seconds, and an exception is thrown in btParallelConstraintSolver.cpp, line 423:
Code: Select all
float restitution = 0.5f * (solverBodyA.restitution + solverBodyB.restitution);
solverBodyB.restitution = 0.000 and the object is correct.
softBodyA is the alias for the object at position 65534 in offsetSolverBodies[iA], body B is at position 0;
The number of "good" pointers in offsetSolverBodies is 650 for my case, if I check above, then from 651 the is cannot evaluate expression, badptr etc.
Also, the call stack is:
> MyApp.exe!CustomSetupContactConstraintsTask(PfxSortData16 * contactPairs=0x04d77180, unsigned int numContactPairs=1, TrbState * offsetRigStates=0x04d77930, PfxSolverBody * offsetSolverBodies=0x04d777e0, unsigned int numRigidBodies=2, float separateBias=0.10000000, float timeStep=0.016666668) Line 423 + 0x6 bytes C++
MyApp.exe!SolverThreadFunc(void * userPtr=0x023fff18, void * lsMemory=0x00000000) Line 524 + 0x3f bytes C++
MyApp.exe!Thread_no_1(void * lpParam=0x023ffa90) Line 65 + 0x15 bytes C++
kernel32.dll!7c80b729()
Some suggestions?
P.S. I used the MultithreadedDemo as an example how to initialize these.