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

btPersistentManifold uses globals, crashing multithreaded apps #791

Closed
GoogleCodeExporter opened this issue Apr 28, 2015 · 4 comments
Closed

Comments

@GoogleCodeExporter
Copy link

btPersistentManifold uses globals for contact processing callbacks, which 
crashes in multithreaded scenarios (stepping two worlds at once). Some 
programmers here are using it, but can't find more references to it in the 
Bullet code base, maybe it's debug/dead code? (see also 
http://www.bulletphysics.org/mediawiki-1.5.8/index.php?title=Collision_Callbacks
_and_Triggers#gContactAddedCallback )


File btPersistentManifold.cpp:

btScalar                    gContactBreakingThreshold = btScalar(0.02);
ContactDestroyedCallback    gContactDestroyedCallback = 0;
ContactProcessedCallback    gContactProcessedCallback = 0;
///gContactCalcArea3Points will approximate the convex hull area using 3 points
///when setting it to false, it will use 4 points to compute the area: it is 
more accurate but slower
bool                        gContactCalcArea3Points = true;


Original issue reported on code.google.com by daan.nus...@gmail.com on 11 Feb 2014 at 12:47

@GoogleCodeExporter
Copy link
Author

By the way, I will probably need to fix this myself so I could make and submit 
a patch. However, where to put the vars (and the interface to get/set them)?
- in the world object?
- in the btPersistentManifold object? 

Original comment by daan.nus...@gmail.com on 11 Feb 2014 at 12:51

@GoogleCodeExporter
Copy link
Author

That might be a similar problem to mine I just added with number 793.

Original comment by mmehrw...@gmx.at on 19 Feb 2014 at 5:23

@GoogleCodeExporter
Copy link
Author

I'll look into fixing this before next release. I will create a bug-fix release 
pretty soon. 

Note that development moved over to github, for the Bullet 2 and Bullet 3 
merge. This merge is going to take time, and during this merge you can just 
Bullet 2 as usual.

http://github.com/erwincoumans/bullet3

Original comment by erwin.coumans on 19 Feb 2014 at 6:27

@GoogleCodeExporter
Copy link
Author

moved to github  https://github.com/bulletphysics/bullet3/issues/59

Original comment by erwin.coumans on 30 Mar 2014 at 5:02

  • Changed state: Done

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

No branches or pull requests

1 participant