[Insight-developers] (no subject)

Lydia Ng lng at insightful . com
Thu, 20 Jun 2002 10:32:32 -0700


Hi Aaron,

The error message indicates that something has written=20
to memory off the end of some allocation.

Could you post your=20
itkLevenbergMarquardtOptimizerTest.cxx
I think you sent out
itkLevenbergMarquardtOptimizer.cxx
in error.

- Lydia

-----Original Message-----
From: C. Aaron Cois [mailto:cacst11+@pitt.edu]
Sent: Thursday, June 20, 2002 10:28 AM
To: insight-developers@public.kitware.com
Subject: [Insight-developers] (no subject)


We have run across an error that has stumped us for almost a week.  It =
seems like a good time to see if any other developers have any thoughts =
or similar experiences. =20

We modified itkLevenbergMarquardtOptimizerTest.cxx to operate on our
particular cost function.  The major modifications were:
1. GetValue() modified
2. GetDerivative() modified
3. Added ERF function
4. Changed Max_Iterations to 100

And a few other changes like prints and const. We used data generated =
with
known parameters from excel and the test will fit the parameters almost
perfectly:

----------------
vnl_levenberg_marquardt: 13 iterations, 66 evaluations, 5 residuals.  =
RMS
error
start/end 60.749/0.000208907
End condition   =3D  Failed X Tolerance too small
Number of iters =3D 13
Number of evals =3D 66

Solution        =3D (31.9992,255.022,4.0002,2.00008)
Test passed.
----------------

After this solutions is printed out, we get a crash as the smart pointer =
for the cost function goes out of scope...some kind of crash on cleanup. =
=20

I've included the source file (replace
itkLevenbergMarquardtOptimizerTest.cxx and hit 4 when running) and a =
screen
capture of the error.

Any ideas?

Thanks