Valgrind output of Newton

Report any bugs here and we'll post fixes

Moderators: Sascha Willems, Thomas

Valgrind output of Newton

Postby Carli » Thu Apr 22, 2010 12:11 pm

Hi,

i played a bit with valgrind and there was a lot of output that refers to Newton.

I do not post this because i want to blame you but I hope, this could give you some hints.

Code: Select all
==6904== Conditional jump or move depends on uninitialised value(s)
==6904==    at 0x61CFAF6: dgWorld::CalculateConvexToConvexContacts(dgCollisionParamProxi&) const (in /usr/lib/libNewton.so)
==6904==    by 0x61BD71A: dgWorld::ConvexContacts(dgCollidingPairCollector::dgPair*, dgCollisionParamProxi&) const (in /usr/lib/libNewton.so)
==6904==    by 0x61C2B4B: dgWorld::CollideContinue(dgCollision*, dgMatrix const&, dgVector const&, dgVector const&, dgCollision*, dgMatrix const&, dgVector const&, dgVector const&, float&, dgTriplex*, dgTriplex*, float*, int, int) (in /usr/lib/libNewton.so)
==6904==    by 0x61C5457: dgBroadPhaseCollision::ConvexCast(dgCollision*, dgMatrix const&, dgVector const&, float&, unsigned int (*)(dgBody const*, dgCollision const*, void*), void*, dgConvexCastReturnInfo*, int, int) const (in /usr/lib/libNewton.so)
==6904==    by 0x623019B: NewtonWorldConvexCast (in /usr/lib/libNewton.so)
==6904==    by 0x4E72CF: OBJECTORGANIZATION_TWORLDOBJECT_$__PATHFREE$TVEC3$$BOOLEAN (objectorganization.pas:212)
==6904==    by 0x4DF56B: PHYSICSCRIPT_PATHFREE$PEXECCLASS$PDATA$$TDATA (physicscript.pas:414)
==6904==    by 0x4CAE0D: SCRIPTEXECUTION_EXECUTESCRIPT$PEXECCLASS$TEXECCODE$PDATA$PEXECCLASS$TBREAKCALLBACK$$TDATA (scriptexecution.pas:577)
==6904==    by 0x4C9B7E: SCRIPTEXECUTION_SIMPLECALL0$PEXECCLASS$PEXECCLASS$TEXECCODE$$TDATA (scriptexecution.pas:330)
==6904==    by 0x4AE2CC: GAMETEMPLATE_TGAME_$__SIMULATE$SINGLE (gametemplate.pas:235)
==6904==    by 0x4BA30C: TASKS_TTASKPLANER_$__RUN$BOOLEAN (tasks.pas:102)
==6904==    by 0x44C03B: main (gwx.lpr:84)
==6904==
==6904== Conditional jump or move depends on uninitialised value(s)
==6904==    at 0x61CFB0D: dgWorld::CalculateConvexToConvexContacts(dgCollisionParamProxi&) const (in /usr/lib/libNewton.so)
==6904==    by 0x61BD71A: dgWorld::ConvexContacts(dgCollidingPairCollector::dgPair*, dgCollisionParamProxi&) const (in /usr/lib/libNewton.so)
==6904==    by 0x61C2B4B: dgWorld::CollideContinue(dgCollision*, dgMatrix const&, dgVector const&, dgVector const&, dgCollision*, dgMatrix const&, dgVector const&, dgVector const&, float&, dgTriplex*, dgTriplex*, float*, int, int) (in /usr/lib/libNewton.so)
==6904==    by 0x61C5457: dgBroadPhaseCollision::ConvexCast(dgCollision*, dgMatrix const&, dgVector const&, float&, unsigned int (*)(dgBody const*, dgCollision const*, void*), void*, dgConvexCastReturnInfo*, int, int) const (in /usr/lib/libNewton.so)
==6904==    by 0x623019B: NewtonWorldConvexCast (in /usr/lib/libNewton.so)
==6904==    by 0x4E72CF: OBJECTORGANIZATION_TWORLDOBJECT_$__PATHFREE$TVEC3$$BOOLEAN (objectorganization.pas:212)
==6904==    by 0x4DF56B: PHYSICSCRIPT_PATHFREE$PEXECCLASS$PDATA$$TDATA (physicscript.pas:414)
==6904==    by 0x4CAE0D: SCRIPTEXECUTION_EXECUTESCRIPT$PEXECCLASS$TEXECCODE$PDATA$PEXECCLASS$TBREAKCALLBACK$$TDATA (scriptexecution.pas:577)
==6904==    by 0x4C9B7E: SCRIPTEXECUTION_SIMPLECALL0$PEXECCLASS$PEXECCLASS$TEXECCODE$$TDATA (scriptexecution.pas:330)
==6904==    by 0x4AE2CC: GAMETEMPLATE_TGAME_$__SIMULATE$SINGLE (gametemplate.pas:235)
==6904==    by 0x4BA30C: TASKS_TTASKPLANER_$__RUN$BOOLEAN (tasks.pas:102)
==6904==    by 0x44C03B: main (gwx.lpr:84)
==6904==
==6904== Conditional jump or move depends on uninitialised value(s)
==6904==    at 0x61CFAF6: dgWorld::CalculateConvexToConvexContacts(dgCollisionParamProxi&) const (in /usr/lib/libNewton.so)
==6904==    by 0x62275E7: dgCollisionCompound::CalculateContactsToSingle(dgCollidingPairCollector::dgPair*, dgCollisionParamProxi&, int) const (in /usr/lib/libNewton.so)
==6904==    by 0x61C1D14: dgWorld::CompoundContacts(dgCollidingPairCollector::dgPair*, dgCollisionParamProxi&) const (in /usr/lib/libNewton.so)
==6904==    by 0x61C2BB9: dgWorld::CollideContinue(dgCollision*, dgMatrix const&, dgVector const&, dgVector const&, dgCollision*, dgMatrix const&, dgVector const&, dgVector const&, float&, dgTriplex*, dgTriplex*, float*, int, int) (in /usr/lib/libNewton.so)
==6904==    by 0x61C5457: dgBroadPhaseCollision::ConvexCast(dgCollision*, dgMatrix const&, dgVector const&, float&, unsigned int (*)(dgBody const*, dgCollision const*, void*), void*, dgConvexCastReturnInfo*, int, int) const (in /usr/lib/libNewton.so)
==6904==    by 0x623019B: NewtonWorldConvexCast (in /usr/lib/libNewton.so)
==6904==    by 0x4E72CF: OBJECTORGANIZATION_TWORLDOBJECT_$__PATHFREE$TVEC3$$BOOLEAN (objectorganization.pas:212)
==6904==    by 0x4DF56B: PHYSICSCRIPT_PATHFREE$PEXECCLASS$PDATA$$TDATA (physicscript.pas:414)
==6904==    by 0x4CAE0D: SCRIPTEXECUTION_EXECUTESCRIPT$PEXECCLASS$TEXECCODE$PDATA$PEXECCLASS$TBREAKCALLBACK$$TDATA (scriptexecution.pas:577)
==6904==    by 0x4C9B7E: SCRIPTEXECUTION_SIMPLECALL0$PEXECCLASS$PEXECCLASS$TEXECCODE$$TDATA (scriptexecution.pas:330)
==6904==    by 0x4AE2CC: GAMETEMPLATE_TGAME_$__SIMULATE$SINGLE (gametemplate.pas:235)
==6904==    by 0x4BA30C: TASKS_TTASKPLANER_$__RUN$BOOLEAN (tasks.pas:102)
==6904==
==6904== Conditional jump or move depends on uninitialised value(s)
==6904==    at 0x61CFB0D: dgWorld::CalculateConvexToConvexContacts(dgCollisionParamProxi&) const (in /usr/lib/libNewton.so)
==6904==    by 0x62275E7: dgCollisionCompound::CalculateContactsToSingle(dgCollidingPairCollector::dgPair*, dgCollisionParamProxi&, int) const (in /usr/lib/libNewton.so)
==6904==    by 0x61C1D14: dgWorld::CompoundContacts(dgCollidingPairCollector::dgPair*, dgCollisionParamProxi&) const (in /usr/lib/libNewton.so)
==6904==    by 0x61C2BB9: dgWorld::CollideContinue(dgCollision*, dgMatrix const&, dgVector const&, dgVector const&, dgCollision*, dgMatrix const&, dgVector const&, dgVector const&, float&, dgTriplex*, dgTriplex*, float*, int, int) (in /usr/lib/libNewton.so)
==6904==    by 0x61C5457: dgBroadPhaseCollision::ConvexCast(dgCollision*, dgMatrix const&, dgVector const&, float&, unsigned int (*)(dgBody const*, dgCollision const*, void*), void*, dgConvexCastReturnInfo*, int, int) const (in /usr/lib/libNewton.so)
==6904==    by 0x623019B: NewtonWorldConvexCast (in /usr/lib/libNewton.so)
==6904==    by 0x4E72CF: OBJECTORGANIZATION_TWORLDOBJECT_$__PATHFREE$TVEC3$$BOOLEAN (objectorganization.pas:212)
==6904==    by 0x4DF56B: PHYSICSCRIPT_PATHFREE$PEXECCLASS$PDATA$$TDATA (physicscript.pas:414)
==6904==    by 0x4CAE0D: SCRIPTEXECUTION_EXECUTESCRIPT$PEXECCLASS$TEXECCODE$PDATA$PEXECCLASS$TBREAKCALLBACK$$TDATA (scriptexecution.pas:577)
==6904==    by 0x4C9B7E: SCRIPTEXECUTION_SIMPLECALL0$PEXECCLASS$PEXECCLASS$TEXECCODE$$TDATA (scriptexecution.pas:330)
==6904==    by 0x4AE2CC: GAMETEMPLATE_TGAME_$__SIMULATE$SINGLE (gametemplate.pas:235)
==6904==    by 0x4BA30C: TASKS_TTASKPLANER_$__RUN$BOOLEAN (tasks.pas:102)
==6904==


I hope, there were some helpful things in it, if not, no problem. ;)
Carli
 
Posts: 245
Joined: Fri Oct 02, 2009 5:28 am

Re: Valgrind output of Newton

Postby Julio Jerez » Thu Apr 22, 2010 1:30 pm

I will try to run Valgrin in my linux box and see what those are.
I had run many tool in netwon an dtehy seem to come clean, but It will be good to see what Valgrinn seay.
are you doing thsi in the 32 bit build, I suppose it does not makes any difference.

are those all the problems?
Thnak you for the report.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Valgrind output of Newton

Postby Carli » Thu Apr 22, 2010 1:49 pm

I don't know if those are problems - everything is working fine and i cannot detect mem lecks.

i ran with linux64.
Carli
 
Posts: 245
Joined: Fri Oct 02, 2009 5:28 am

Re: Valgrind output of Newton

Postby Julio Jerez » Thu Apr 22, 2010 2:10 pm

I do not think there are leaks in Newton, I am very careful about that.
There could be leak if some one forget to relase and a shape, but ususally total memory use soub be zero after a wordl is desttoiue

Code: Select all
==6904== Conditional jump or move depends on uninitialised value(s)
==6904==    at 0x61CFAF6: dgWorld::CalculateConvexToConvexContacts(dgCollisionParamProxi


it coudl be a petecial bug is for example and class do not initilize teh member and the is is inililize in a conditional dor exampel soem code liek this


Code: Select all
int test;
for (i =- 0; i < n; i ++)
{
   if (myfuntion(i)) {
       test = 1;
       break;
   }
}

if (test == 1) {
 // do somethong;
}


I debug tool may see that test may be unintialized. a solution will be to inilialize test to some default value.
Of course this is not always efficienct, say for example this is in a critical loop and test is a class,
it may be slow to always initialized local varibles just to keep the compiler happy.
so it is worth checking it out.

I have being lokking for some instrumenting tool to check teh code for some time.
VS 2010 since to have one called refactoring, but is buggy as help and actually intrude bug in the code.
Some one recomend one call AQtime but it is too expensive and I codul not get the trial version to integrate with Visual studio 2008 and windows 7.
I will try Valgin in Linux since it is free. The code can only get better.
I wish Valgrin run on windows too.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Valgrind output of Newton

Postby Julio Jerez » Thu Apr 22, 2010 2:44 pm

I read a bit of Valgrin doc and I see there is only one error reported many time.

Basically it is a pentcial error in funtion cause by a convex cast call.
at 0x61CFAF6: dgWorld::CalculateConvexToConvexContacts(dgCollisionParamProxi&) const (in /usr/lib/libNewton.so


were you running your own program using newton or the SDK?

one of the problem with running Valgrin is the it will reports tousand of error in many o fteh external libraries I am using.
xWidget, Collada, Tinyxml, and many o fteh other oen needed for support of those.
any way I will chek it out and see what it is.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Valgrind output of Newton

Postby Carli » Fri Apr 23, 2010 3:03 am

Julio Jerez wrote:were you running your own program using newton or the SDK?

As you can see in the stack traces, it was my own program.
Carli
 
Posts: 245
Joined: Fri Oct 02, 2009 5:28 am


Return to Bugs and Fixes

Who is online

Users browsing this forum: No registered users and 5 guests

cron