pombreda / bullet

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

Frequent asserts in multi-thread dispatching after 2.82 #798

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I am seeing very frequent asserts (4 per pair per tick) when using a 
multi-threaded dispatcher that is related to a recent change from 2.81 to 2.82. 
The code that is directly causing the asserts was added in r2637. This does not 
happen in a single-threaded model. 

The full path to the asserts starts in SpuCatheringCollisionTask.cpp around 
line 727 in ProcessSpuConvexConvexCollision() where two btConvexPointCloudShape 
are created on the stack. New btConvexPointCloudShape objects have 
m_isLocalAabbValid set to false by default. And the setPoints() function is 
invoked such that AABB recalculation is disabled. When these stack objects are 
eventually passed on to btGjkPairDetector::getClosestPoints() they have not had 
recalcLocalAabb() called and m_isLocalAabbValid is still false. This is causing 
the asserts to arise in the new code from r2637 which invokes getAabb() (line 
454/457) on those collision objects.

I can work around this for now by setting m_fixContactNormalDirection in 
btGjkPairDetector to false. But I'd rather not since the description on the fix 
sounds rather important.

This happens both on ARMv7 (iOS) and x86/64 (OSX).

Original issue reported on code.google.com by drei...@atariland.net on 13 Mar 2014 at 9:07

GoogleCodeExporter commented 9 years ago
moved to github https://github.com/bulletphysics/bullet3/issues/52

Original comment by erwin.coumans on 30 Mar 2014 at 4:46