Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assert in btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySetup. btAssert(fsum > SIMD_EPSILON); (was googlecode Issue 666) #109

Closed
erwincoumans opened this issue Mar 30, 2014 · 5 comments

Comments

@erwincoumans
Copy link
Member

See https://code.google.com/p/bullet/issues/detail?id=666&colspec=Modified%20ID%20Type%20Stars%20Status%20Owner%20Summary

@vfekete
Copy link

vfekete commented Jul 1, 2014

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 (063a034) 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)

@erwincoumans
Copy link
Member Author

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?

@vfekete
Copy link

vfekete commented Jul 1, 2014

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/)

@erwincoumans
Copy link
Member Author

closing out-of-date issues.

@markusstephanides
Copy link

I still have this issue, occurs only in debug mode. Is there any solution for this yet?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants