[Insight-developers] (no subject)

Lydia Ng lng at insightful . com
Thu, 20 Jun 2002 12:03:38 -0700


Line 128 of itkLevenbergMarquardtOptimizerTest.cxx

    for( int x =3D 0; x<=3DRangeDimension; x++ )=20

it should "<" instead of "<=3D"

BTW - VC++ has this "Memory" watch window=20
(from Debug toolbar - click on the "Memory" icon)

When memory is allocated in Debug mode, the compiler
puts a bunch of "0xFD"'s at the end.
On delete/free it check if these are still 0xFD=20
if not it reports an "Damage block" error.

- Lydia=20

> -----Original Message-----
> From: C. Aaron Cois [mailto:cacst11+@pitt.edu]
> Sent: Thursday, June 20, 2002 11:37 AM
> To: Lydia Ng; insight-developers@public.kitware.com
> Subject: Re: [Insight-developers] (no subject)
>=20
>=20
> Lydia, you are right.  I apologize, and here is our
> itkLevenbergMarquardtOptimizerTest.cxx.
>=20
> ----- Original Message -----
> From: "Lydia Ng" <lng@insightful.com>
> To: "C. Aaron Cois" <cacst11@pitt.edu>;
> <insight-developers@public.kitware.com>
> Sent: Thursday, June 20, 2002 1:32 PM
> Subject: RE: [Insight-developers] (no subject)
>=20
>=20
> Hi Aaron,
>=20
> The error message indicates that something has written
> to memory off the end of some allocation.
>=20
> Could you post your
> itkLevenbergMarquardtOptimizerTest.cxx
> I think you sent out
> itkLevenbergMarquardtOptimizer.cxx
> in error.
>=20
> - Lydia
>=20
> -----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)
>=20
>=20
> We have run across an error that has stumped us for almost a=20
> week.  It seems
> like a good time to see if any other developers have any=20
> 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
>=20
> And a few other changes like prints and const. We used data=20
> generated with
> known parameters from excel and the test will fit the=20
> parameters almost
> perfectly:
>=20
> ----------------
> vnl_levenberg_marquardt: 13 iterations, 66 evaluations, 5=20
> 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
>=20
> Solution        =3D (31.9992,255.022,4.0002,2.00008)
> Test passed.
> ----------------
>=20
> After this solutions is printed out, we get a crash as the=20
> 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=20
> running) and a screen
> capture of the error.
>=20
> Any ideas?
>=20
> Thanks
> _______________________________________________
> Insight-developers mailing list
> Insight-developers@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-developers
>=20