[vtkusers] valgrind question - uninitialized values?

Berk Geveci berk.geveci at kitware.com
Mon Oct 12 19:51:27 EDT 2009


Did you initialize it in the constructor with

this->MajorAxisLength = <some double value>;

If you didn't, the comparison with the previous value that is inside
the set macro would cause that error.

-berk

On Mon, Oct 12, 2009 at 7:15 PM, David Doria <daviddoria+vtk at gmail.com> wrote:
> I am trying to use valgrind to find some memory leaks. I see several things
> like this:
>
> ==32112== Conditional jump or move depends on uninitialised
> value(s)
> ==32112==    at 0x8050971: vtkEllipsoidSource::SetMajorAxisLength(double)
> (vtkEllipsoidSource.h:38)
> ==32112==    by 0x804C7B9: EllipsoidDemo()
> (VisualizeEllipsoid.cpp:23)
> ==32112==    by 0x804C75E: main (VisualizeEllipsoid.cpp:14)
>
> SetMajorAxisLength is created by a set macro:
> vtkSetMacro(MajorAxisLength, double);
>
> and called with:
> ellipsoid->SetMajorAxisLength(5.0);
>
> What is the problem with this?
>
> Thanks,
>
> David
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>



More information about the vtkusers mailing list