Thank you for making newton open source. I have been experiencing a strange bug that I hope there is a fix for. Currently VS2010 debugger throws the following error when in debug mode:
Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.
Now usually this error is caused by the wrong calling conventions, as the message states, but sometimes it is caused by sending the wrong pointer or not sending one as well. I've isolated exactly where the compiled crashes and that is when *this is sent. Does anyone have any ideas? Surely someone else has experienced this. Whenever I run NewtonUpdate(NWorld_, StepTime); this happens! I know I am sending all of the right parameters.
- Code: Select all
inline void dgBody::ApplyExtenalForces (dgFloat32 timestep, dgInt32 threadIndex)
{
m_accel = dgVector (dgFloat32 (0.0f), dgFloat32 (0.0f), dgFloat32 (0.0f), dgFloat32 (0.0f));
m_alpha = dgVector (dgFloat32 (0.0f), dgFloat32 (0.0f), dgFloat32 (0.0f), dgFloat32 (0.0f));
if (m_applyExtForces) {
m_applyExtForces([b]*this[/b], timestep, threadIndex);
}
}