dgCollisionBVH::GetCollidingFaces m_meshData

Report any bugs here and we'll post fixes

Moderators: Sascha Willems, Thomas

dgCollisionBVH::GetCollidingFaces m_meshData

Postby arkeon » Fri Oct 17, 2014 1:19 pm

Hello,

I ran into a crash in dgCollisionBVH::GetCollidingFaces
and while debugging I just saw that all m_meshData member have an address but all
m_globalFaceIndexCount, m_globalFaceIndexStart ... have non initialized values (0xccccccccc)

I could not find where this values are initialized anywhere in the code, did I miss something ?
arkeon
 
Posts: 261
Joined: Sat Sep 13, 2014 5:25 pm

Re: dgCollisionBVH::GetCollidingFaces m_meshData

Postby arkeon » Fri Oct 17, 2014 1:47 pm

forget about it ^^ this is again an exception in sqrt with a too huge value coming from no where :/ (-9.0941463e-011)
arkeon
 
Posts: 261
Joined: Sat Sep 13, 2014 5:25 pm

Re: dgCollisionBVH::GetCollidingFaces m_meshData

Postby arkeon » Fri Oct 17, 2014 1:57 pm

ho this is related to
Code: Select all
DG_INLINE dgFloat32 dgCollisionInstance::GetBoxMaxRadius () const
{
   //return m_childShape->GetBoxMaxRadius() * m_maxScale.m_x;
   return GetBoxMinRadius ();
}


then the angularSpeedBound of
dgFloat32 angularSpeedBound = maxAngularSpeed * (convexInstance->GetBoxMaxRadius() - minRadius);

just return weird value.
arkeon
 
Posts: 261
Joined: Sat Sep 13, 2014 5:25 pm

Re: dgCollisionBVH::GetCollidingFaces m_meshData

Postby Julio Jerez » Fri Oct 17, 2014 2:22 pm

Code: Select all
DG_INLINE dgFloat32 dgCollisionInstance::GetBoxMaxRadius () const
{
   //return m_childShape->GetBoxMaxRadius() * m_maxScale.m_x;
   return GetBoxMinRadius ();
}


did you change that function, that would be wrong the max radio can not return the min radius, that will be wrong and will make the CCD fail for oblong shaped objects.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: dgCollisionBVH::GetCollidingFaces m_meshData

Postby arkeon » Fri Oct 17, 2014 2:25 pm

No I didn't, this is the code from the today GIT sync.

damn now I get a 0xccccccc on m_closestFeatureStartIndex ...
arkeon
 
Posts: 261
Joined: Sat Sep 13, 2014 5:25 pm

Re: dgCollisionBVH::GetCollidingFaces m_meshData

Postby arkeon » Fri Oct 17, 2014 2:41 pm

In dgCollisionConvexPolygon::CalculateContactToConvexHullDescrete I got a case where m_closestFeatureType value is -1 and m_closestFeatureStartIndex not initialized

this means it didn't call SetFeatureHit or there is a default case missing.
myabe m_closestFeatureType should be initialized to 3 and m_closestFeatureStartIndex to 0 ?
arkeon
 
Posts: 261
Joined: Sat Sep 13, 2014 5:25 pm

Re: dgCollisionBVH::GetCollidingFaces m_meshData

Postby Julio Jerez » Fri Oct 17, 2014 2:57 pm

arkeon wrote:No I didn't, this is the code from the today GIT sync.

damn now I get a 0xccccccc on m_closestFeatureStartIndex ...

I have fix that then. seems like a bug.

only collision shape with vertex list generate closest feature index.
ConvexHull, Box, and collision trees

what are you doing?
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: dgCollisionBVH::GetCollidingFaces m_meshData

Postby arkeon » Fri Oct 17, 2014 3:22 pm

I have not a clue ^^
I have a hand with bodies, joints, and raycasts
and I ran into this when I hit a collision tree with the hand.

but no idea otherwise.. in release I got a virtual call error in the same case but I destroy nothing here.
I'll try to see more in release with debug infos
arkeon
 
Posts: 261
Joined: Sat Sep 13, 2014 5:25 pm

Re: dgCollisionBVH::GetCollidingFaces m_meshData

Postby arkeon » Fri Oct 17, 2014 5:46 pm

the virtual call happen in void dgWorldDynamicUpdate::GetJacobianDerivatives on dof = dgInt32 (constraint->JacobianDerivative (constraintParams));

I don't have much infos in release :/

what I saw is that dgBilateralConstraint do not have the virtual JacobianDerivative defined where it should. but I have no joints using this since I use the customjoint library.
arkeon
 
Posts: 261
Joined: Sat Sep 13, 2014 5:25 pm

Re: dgCollisionBVH::GetCollidingFaces m_meshData

Postby arkeon » Fri Oct 17, 2014 8:11 pm

always on the same case I've got a cell->m_bodyNode and cell->m_joint with both NULL value.
this result of a crash in SpanningTree.
Do you have an idea of which case could make this happen ?
arkeon
 
Posts: 261
Joined: Sat Sep 13, 2014 5:25 pm

Re: dgCollisionBVH::GetCollidingFaces m_meshData

Postby Julio Jerez » Fri Oct 17, 2014 9:24 pm

let's talk tomorrow. meant time do you have a test to reproduce it?
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: dgCollisionBVH::GetCollidingFaces m_meshData

Postby arkeon » Sat Oct 18, 2014 10:00 am

It seems to be a threading issue on contact list.
the contact must have been destroyed and set to null but the list stil contaning it.
so it failed in every function that read this list without testing the null joint value.
arkeon
 
Posts: 261
Joined: Sat Sep 13, 2014 5:25 pm

Re: dgCollisionBVH::GetCollidingFaces m_meshData

Postby arkeon » Sat Oct 18, 2014 12:09 pm

I think I found the source of the bug.

I have no more issue when I remove the collision enable test that make the onAABBOverlap callback return 0;

this must destroy the contact but not update the m_jointsMemory list ?!
Code: Select all
int SMaterialPair::onAABBOverlap(OgreNewt::Body* body0, OgreNewt::Body* body1, int threadIndex)
{
  SNode* nodeScol0 = Ogre::any_cast<SNode*>(body0->getUserData());
   SNode* nodeScol1 = Ogre::any_cast<SNode*>(body1->getUserData());
 
   if((nodeScol0 != NULL) && (nodeScol1 != NULL))
   {
      SBody* b0 = nodeScol0->GetSceneNodeBody();
      SBody* b1 = nodeScol1->GetSceneNodeBody();

    // return no collision if any of the bodies have the ignore state
    if(b0->GetIgnoreCollision() || b1->GetIgnoreCollision())
      return 0;
  }
  return 1;
}
arkeon
 
Posts: 261
Joined: Sat Sep 13, 2014 5:25 pm

Re: dgCollisionBVH::GetCollidingFaces m_meshData

Postby arkeon » Sat Oct 25, 2014 12:44 pm

This is now the last problem I saw :)

But it still here...

I continue searching to reproduce it in a simple demo.
What I have :
- a colision tree
- a compound collision
- hands with sphere collions, joints, and raycast to each finger

all scaled in some ways.

jointNode = jointNode->GetNext() return a valid pointer here but everything in it is set to 0.

Image
arkeon
 
Posts: 261
Joined: Sat Sep 13, 2014 5:25 pm

Re: dgCollisionBVH::GetCollidingFaces m_meshData

Postby Julio Jerez » Sat Oct 25, 2014 12:51 pm

can you make the same demo on the sand box like you did the others?
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Next

Return to Bugs and Fixes

Who is online

Users browsing this forum: No registered users and 10 guests