harrison-lucas / bullet

Automatically exported from code.google.com/p/bullet
Other
0 stars 0 forks source link

btPersistentManifold uses globals, crashing multithreaded apps #791

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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 commented 9 years ago
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 commented 9 years ago
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 commented 9 years ago
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 commented 9 years ago
moved to github  https://github.com/bulletphysics/bullet3/issues/59

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