CalculateInertialMatrix and pure virtual call error

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

CalculateInertialMatrix and pure virtual call error

Postby Sascha Willems » Tue Dec 29, 2009 8:29 am

It has (sadly) been a long time for me in which I wasn't able to do coding, and I'm still having very few moments to do some programming. And today I wanted to upgrade some of my applications to the newest version of NGD but I ran into a problem I can't get my head around. Maybe some of you remember my tracked tank demo using only material callbacks. This is the one I wanted to upgrade to the newest NGD version, and I'm using Stucuk's headers with NGD 2.15. After making the demo compile with NGD 2.15 and the new headers I was able to isolate the problem to this :

Code: Select all
NewtonConvexCollisionCalculateInertialMatrix(Compound[High(Compound)], @Inertia[x], @Origin[x]);

which is giving me a message from the C++ runtime (so I can't actually debug this in Delphi, making it even harder to get rid off) saying "R6205 - pure virtual function call". After some searching around the forums, and browsing the wiki for differences in NGD 2.15 I wasn't able to fix this problem.

So can anyone help me with this? I'm actually baffled why this message appears when using that function as I'm unable to see a connection here.
User avatar
Sascha Willems
Moderator
Moderator
 
Posts: 346
Joined: Fri Aug 27, 2004 10:18 am
Location: Germany

Re: CalculateInertialMatrix and pure virtual call error

Postby JernejL » Tue Dec 29, 2009 8:59 am

A test case app would probably help, since it would let julio debug newton directly.

I can speculate, that CalculateInertialMatrix was broken for compound collisions, the compound collisions code recieved a bunch of changes in latest builds.

Also: glad to see you back, hope you'll find more time for coding :)
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1587
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: CalculateInertialMatrix and pure virtual call error

Postby Sascha Willems » Tue Dec 29, 2009 10:17 am

After a longer session of debugging and isolating the problem I found out that it was a wrong declaration in the header. For the function NewtonConstraintCreateUserJoint it was missing the GetInfo-Callback. After updating that declaration to what it looks like in the C-Header the demo now at least starts without errors. But since this is something that should be discussed in the thread of the pascal headers I think it's better to continue talking over in that thread.
User avatar
Sascha Willems
Moderator
Moderator
 
Posts: 346
Joined: Fri Aug 27, 2004 10:18 am
Location: Germany


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 362 guests

cron