Closed erwincoumans closed 4 years ago
I have the same problem for btSliderConstraint where body is made out of btShapeHull (I don't observe assertion failure in case of primitive collision shapes cylinder). Concerning the bullet version, I pulled out the last one (063a0344acdae57df0321d898f1375d68a152aaf) and saw, that faulty part is line 1440 (as was written before about bug 666) :
1439 btScalar fsum = btFabs(sum); 1440 btAssert(fsum > SIMD_EPSILON); 1441 solverConstraint.m_jacDiagABInv = fsum>SIMD_EPSILON?btScalar(1.)/sum : 0.f;
Although I don't understand the reason for all those dot products being computed as "sum" in lines before 1439, one can see, that the fsum is checked for being bigger than SIMD_EPSILON properly at line 1441 which is after assert. This must be the correct (inteded) behavior in case of fsum being "0" (assertion failed). So i simply commented the line 1440 and everything works as it supposed to - aka constraints behave properly.
Imho assertion is just a raised finger for developer, that there is a situation that should not happen, however the code counts with this situation and behaves properly as far as I can see. (hope this helps anybody to temporary fix this)
If sum is 0, there is an issue with the constraint that shouldn't happen. Can you recreate the issue in a modified Bullet demo?
sure, I changed ConstraintDemo (pulled fresh repo today - 07/01/14),
diff : http://nova.dnp.fmph.uniba.sk/~fekete/bullet/ConstraintDemo.cpp.diff cpp file : http://nova.dnp.fmph.uniba.sk/~fekete/bullet/ConstraintDemo.cpp and test wavefront object: http://nova.dnp.fmph.uniba.sk/~fekete/bullet/test.obj
and of course the 'test.obj' file must be in correct directory while debugging (in my case it's build3/vs2010/)
closing out-of-date issues.
I still have this issue, occurs only in debug mode. Is there any solution for this yet?
See https://code.google.com/p/bullet/issues/detail?id=666&colspec=Modified%20ID%20Type%20Stars%20Status%20Owner%20Summary