[ODE] ODE debugging dSolveLCP
Marcello Cirillo
marcello at pointest.com
Tue Feb 8 18:01:54 MST 2005
Hi.
I'm a new subscriber and I have some problems that I hope somebody could
solve.
I was doing some memory debugging with valgrind on my program, and I've
got a strange warning / error coming from a ODE library.
Could somebody please explain me if it's a really dangerous problem? It
seems to come from the dSolveLCP function.
I attach the lines I received from valgrind and GDB.
Thanks
M.
Valgrind Output during normal execution (no segmentation fault yet):
==21128== Use of uninitialised value of size 8
==21128== at 0x80AA15D: swapProblem(double**, double*, double*,
double*, double*, double*, int*, int*, int*, int, int, int, int, int)
(lcp.cpp:240)
==21128== by 0x80AAA6C: dLCP::dLCP(int, int, double*, double*,
double*, double*, double*, double*, double*, double*, double*, double*,
double*, int*, int*, int*, int*, double**) (lcp.cpp:792)
==21128== by 0x80AC3CF: dSolveLCP(int, double*, double*, double*,
double*, int, double*, double*, int*) (lcp.cpp:1137)
==21128== by 0x80A5CD8: dInternalStepIsland_x2(dxWorld*, dxBody*
const*, int, dxJoint* const*, int, double) (step.cpp:835)
The problem recognised by valgrind is then passed to gdb, that gives the
following lines:
0x080aa15d in swapProblem (A=0x52be9830, x=0x52bf14e0, b=0x52bf16d0,
w=0x52bf12f0, lo=0x52bfc800, hi=0x52bfc610, p=0x52be9730, state=0x52be9530,
findex=0x52bfc514, n=59, i1=5, i2=6, nskip=60, do_fast_row_swaps=0)
at ode/src/lcp.cpp:240
240 tmp = w[i1];
When a Segmentation Fault occurs in my program, most of the time this is
the gdb output:
#0 0x080ac35f in dSolveLCP(int, double*, double*, double*, double*,
int, double*, double*, int*) (n=353, A=0xbfeeced0, x=0xbfeeae00,
b=0xbfeeb920,
w=0xbfeea2e0, nub=15, lo=0xbfff97d0, hi=0xbfff8cb0,
findex=0xbfff8714) at ode/src/lcp.cpp:1137
1137 dLCP lcp
(n,nub,A,x,b,w,lo,hi,L,d,Dell,ell,delta_w,state,findex,p,C,Arows);
#1 0x080a5cf1 in dInternalStepIsland_x2(dxWorld*, dxBody* const*, int,
dxJoint* const*, int, double) (world=0x8146890, body=0xbffff030, nb=42,
_joint=0xbfffebd0, nj=85, stepsize=0.0025000000000000001) at
ode/src/step.cpp:835
835 dSolveLCP (m,A,lambda,rhs,residual,nub,lo,hi,findex);
More information about the ODE
mailing list