hello Julio.
I get the latest svn version of Newton. I had to make some changes to source code for compatibility with linux32. please, check this files and add changes to svn.
Moderators: Sascha Willems, walaber
physicsdveserver: ../../source/core/dgGoogol.cpp:305: dgGoogol dgGoogol::operator*(const dgGoogol&) const: Assertion `dgInt64 (A.m_mantissa[0]) >= 0' failed.
KATO2 wrote:Julio i ran simulation and got following error message:
- Code: Select all
physicsdveserver: ../../source/core/dgGoogol.cpp:305: dgGoogol dgGoogol::operator*(const dgGoogol&) const: Assertion `dgInt64 (A.m_mantissa[0]) >= 0' failed.
dgInt32 i;
dgInt32 j;
_ASSERTE (m_curCount < m_maxCount);
dgInt32 i, cc=dgHeapBase<OBJECT,KEY>::m_curCount;
dgInt32 j, cm=dgHeapBase<OBJECT,KEY>::m_maxCount;
_ASSERTE (cc < cm);
physicsdveserver: ../../source/core/dgGoogol.cpp:305: dgGoogol dgGoogol::operator*(const dgGoogol&) const: Assertion `dgInt64 (A.m_mantissa[0]) >= 0' failed.
KATO2 wrote:well, i sync to head revision. and build Newton whitout any error. later, i ran the simulation and that gave me next exception:
- Code: Select all
physicsdveserver: ../../source/core/dgGoogol.cpp:305: dgGoogol dgGoogol::operator*(const dgGoogol&) const: Assertion `dgInt64 (A.m_mantissa[0]) >= 0' failed.
Julio Jerez wrote: you have to post the trace stack so taht I can see what is casing the bug.
My guess is that you are passing convex hull calculation on a degenerate gemetry and the engine is trying to calculate some distance on a degenedated plane.
The convex hull uses adaptive arithmetic and only in the cases of extreme degenerated cases will call of those arbitrary extended precision floats operations.
please print the trace stack, I am almost sure that it comes from a call to create convex hull with a vertex clould that is almost flat.
In the abcent of any assert it will probably create a convex hull with almost zero volume and that is what is making the contact solver generate Nans.
#0 0x0012e416 in __kernel_vsyscall ()
#1 0x00cbbe71 in raise () from /lib/i386-linux-gnu/libc.so.6
#2 0x00cbf34e in abort () from /lib/i386-linux-gnu/libc.so.6
#3 0x00cb4888 in __assert_fail () from /lib/i386-linux-gnu/libc.so.6
#4 0x0078f4d5 in dgGoogol::operator* (this=0xb6fced58, A=...) at ../../source/core/dgGoogol.cpp:305
#5 0x007e3983 in Determinant3x3 (matrix=0xb6fcedfc) at ../../source/core/dgSmallDeterminant.cpp:98
#6 0x007b6a12 in dgConvexHull3DFace::Evalue (this=0x81abca4, pointArray=0xb20851c0, point=...) at ../../source/core/dgConvexHull3d.cpp:98
#7 0x007baa42 in dgConvexHull3d::CalculateConvexHull (this=0x81abb80, vertexTree=0xb2c4cb60, points=0xb2b85080, count=105,
distTol=<value optimized out>, maxVertexCount=2147483640) at ../../source/core/dgConvexHull3d.cpp:751
#8 0x007bb1e0 in dgConvexHull3d::BuildHull (this=0x81abb80, vertexCloud=0xb2b81b60, strideInBytes=24, count=112, distTol=0.0010000000474974513,
maxVertexCount=2147483647) at ../../source/core/dgConvexHull3d.cpp:148
#9 0x007bb2ba in dgConvexHull3d::dgConvexHull3d (this=0x81abb80, allocator=0x811c2a0, vertexCloud=0xb2b81b60, strideInBytes=24, count=564,
distTol=0.0010000000474974513, maxVertexCount=2147483647) at ../../source/core/dgConvexHull3d.cpp:123
#10 0x00904f8b in dgCollisionConvexHull::Create (this=0x81a3b80, count=564, strideInBytes=12, vertexArray=0xb2c01858, tolerance=0.00100000005)
at ../../source/physics/dgCollisionConvexHull.cpp:428
#11 0x0090699c in dgCollisionConvexHull::dgCollisionConvexHull (this=0x81a3b80, allocator=0x811c2a0, signature=707270999, count=564,
strideInBytes=12, tolerance=<value optimized out>, vertexArray=0xb2c01858, matrix=...) at ../../source/physics/dgCollisionConvexHull.cpp:53
#12 0x0085f528 in dgWorld::CreateConvexHull (this=0x80fd660, count=564, vertexArray=0xb2c01858, strideInBytes=12, tolerance=<value optimized out>,
shapeID=0, offsetMatrix=...) at ../../source/physics/dgNarrowPhaseCollision.cpp:322
#13 0x0098924a in NewtonCreateConvexHull (newtonWorld=0x80fd660, count=564, vertexCloud=0xb2c01858, strideInBytes=12,
tolerance=<value optimized out>, shapeID=0, offsetMatrix=0xb6fd7fe8) at ../../source/newton/Newton.cpp:2781
#14 0x00a40b69 in OgreNewt::CollisionPrimitives::ConvexHull::ConvexHull(OgreNewt::World const*, Ogre::Entity*, int, Ogre::Quaternion const&, Ogre::Vector3 const&, float, Ogre::Vector3 const&) () from /usr/local/lib/libOgreNewt.so.2
#15 0x0808f5a5 in PhysicalObject::createCollisionBody (this=0xb2ce63a8)
at /home/mbsanchez/Tesis/code/Ogre3D/PhysicsDVEServer/src/PhysicalObject.cpp:64
#16 0x0808ee2d in PhysicalObject::PhysicalObject (this=0xb2ce63a8, mesh=0x811bef8)
at /home/mbsanchez/Tesis/code/Ogre3D/PhysicsDVEServer/src/PhysicalObject.cpp:15
#17 0x080573c1 in PhysicalControlAgent::createPhysicalEntity (this=0x811c0c8, mesh=0x811bef8)
at /home/mbsanchez/Tesis/code/Ogre3D/PhysicsDVEServer/src/PhysicalControlAgent.cpp:264
#18 0x08057c2d in PhysicalControlAgent::beginPhysicsWorld (this=0x811c0c8)
at /home/mbsanchez/Tesis/code/Ogre3D/PhysicsDVEServer/src/PhysicalControlAgent.cpp:396
#19 0x080578f2 in PhysicalControlAgent::run (this=0x811c0c8) at /home/mbsanchez/Tesis/code/Ogre3D/PhysicsDVEServer/src/PhysicalControlAgent.cpp:355
#20 0x080690d2 in _THKERNEL (lpvData=0x811c0c8) at ../../useful_libraries/othread/src/Thread.cpp:39
#21 0x00af6e99 in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
#22 0x00d6173e in clone () from /lib/i386-linux-gnu/libc.so.6
dgFloat64 dgConvexHull3DFace::Evalue (const dgBigVector* const pointArray, const dgBigVector& point) const
{
const dgBigVector& p0 = pointArray[m_index[0]];
const dgBigVector& p1 = pointArray[m_index[1]];
const dgBigVector& p2 = pointArray[m_index[2]];
dgFloat64 matrix[3][3];
for (dgInt32 i = 0; i < 3; i ++) {
matrix[0][i] = p2[i] - p0[i];
matrix[1][i] = p1[i] - p0[i];
matrix[2][i] = point[i] - p0[i];
}
dgFloat64 error;
dgFloat64 det = Determinant3x3 (matrix, &error);
dgFloat64 precision = dgFloat64 (1.0f) / dgFloat64 (1<<24);
dgFloat64 errbound = error * precision;
if (fabs(det) > errbound) {
return det;
}
dgGoogol exactMatrix[3][3];
for (dgInt32 i = 0; i < 3; i ++) {
exactMatrix[0][i] = dgGoogol(p2[i]) - dgGoogol(p0[i]);
exactMatrix[1][i] = dgGoogol(p1[i]) - dgGoogol(p0[i]);
exactMatrix[2][i] = dgGoogol(point[i]) - dgGoogol(p0[i]);
}
dgGoogol exactDet (Determinant3x3(exactMatrix));
det = exactDet.GetAproximateValue();
return det;
}
0x0098924a in NewtonCreateConvexHull (newtonWorld=0x80fd660, count=564, vertexCloud=0xb2c01858, strideInBytes=12, tolerance=<value optimized out>, shapeID=0, offsetMatrix=0xb6fd7fe8) at ../../source/newton/Newton.cpp:2781
Users browsing this forum: No registered users and 3 guests