A place to discuss everything related to Newton Dynamics.
Moderators: Sascha Willems, walaber
by tanzfisch » Thu Jun 09, 2016 4:35 pm
Hi,
I get an assertion in CalculateIntersectingPlane and I don't understand how I triggered it.
the assertion triggered ist that one: dgAssert((err % err) > dgFloat32(0.0f));
And this is the context.
- Code: Select all
dgInt32 dgContactSolver::CalculateIntersectingPlane(dgInt32 count)
{
dgAssert(count >= 1);
if (count == 1) {
SupportVertex(m_proxy->m_contactJoint->m_separtingVector.Scale4(dgFloat32(-1.0f)), 1);
#ifdef _DEBUG
dgVector err(m_hullDiff[1] - m_hullDiff[0]);
dgAssert((err % err) > dgFloat32(0.0f));
#endif
count = 2;
}
So cout equals 1 and all entries their members in m_hullDiff are zero
Under which circumstances can that happen?
-
tanzfisch
-
- Posts: 34
- Joined: Fri Feb 05, 2016 5:17 am
by Julio Jerez » Thu Jun 09, 2016 6:08 pm
It means that something that should not happen did happened, in his case two colliding objects do not intersect the closest distant test report that the are intersecting.
usually nothing happened the code will do the calculation and report no intersection plane.
can it be reproduced?
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by tanzfisch » Fri Jun 10, 2016 2:43 am
I can reproduce it but it takes more than 20min running in debug mode.
I also was not able to isolate the objects that cause this yet. I will look deepter in to it and come back to you.
-
tanzfisch
-
- Posts: 34
- Joined: Fri Feb 05, 2016 5:17 am
by tanzfisch » Fri Jun 10, 2016 3:07 am
Hi,
I found out that this happens when I create two bodys at the exact same spot at the same time.
I guess I can prevent this on my side.
Thanks
Martin
-
tanzfisch
-
- Posts: 34
- Joined: Fri Feb 05, 2016 5:17 am
by Julio Jerez » Fri Jun 10, 2016 8:13 am
Ha, yes that make sence. if two bodies are created in the exact same position. then it will fail just like that because the different between any two points on those two objects will always be zero.
The minskowy theorem count on the two convex objects having different location and to have different than zero volume.
In reality that situation should never happens so it is not real a big deal.
however I will debug it and see how I can fix it, the engine should recover from special cases like that.
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Julio Jerez » Fri Jun 10, 2016 1:05 pm
ok it is fixed now.
Thanks for the repro report.
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by tanzfisch » Sat Jun 11, 2016 9:57 am
Thank you too.
-
tanzfisch
-
- Posts: 34
- Joined: Fri Feb 05, 2016 5:17 am
Return to General Discussion
Who is online
Users browsing this forum: No registered users and 2 guests