[vtk-developers] bug in Marching Cubes

Bill Lorensen bill.lorensen at gmail.com
Wed Mar 30 10:30:19 EDT 2011


It is certainly possible that we never tested the code with multi-component
data.

On Wed, Mar 30, 2011 at 8:32 AM, Eduardo Suarez-Santana <
esuarez at itccanarias.org> wrote:

>  El 30/03/11 13:14, Eduardo Suarez-Santana escribió:
>
> El 30/03/11 12:46, David Doria escribió:
>
>  Why do you think that? Do you have a test that fails the old way and
> passes the new way?
>
>  2) it is getting tuples beyond inScalars range (502).
>
> inScalars are the Scalars of the vtkImageData input, of size dataSize, so
> dataSize tuples are expected. Accessing vtkIdType number dataSize is out of
> range.
>
>
> I forgot. Valgrind reports "Invalid read of size 4" when running line 502
> as well.
>
> ==1676== Invalid read of size 4
> ==1676==    at 0x73EF2A9: void vtkCopyTuples<float, double>(float*,
> double*, int, long long, long long) (vtkDataArray.cxx:854)
> ==1676==    by 0x73DCCE5: void vtkCopyTuples1<float>(float*, vtkDataArray*,
> long long, long long) (vtkDataArray.cxx:866)
> ==1676==    by 0x73D24E3: vtkDataArray::GetTuples(long long, long long,
> vtkAbstractArray*) (vtkDataArray.cxx:896)
> ==1676==    by 0x4CE85E:
> vtkMarchingCubesMultiple::RequestData(vtkInformation*,
> vtkInformationVector**, vtkInformationVector*)
> (vtkMarchingCubesMultiple.cxx:502)
> ==1676==    by 0x6576EB7:
> vtkPolyDataAlgorithm::ProcessRequest(vtkInformation*,
> vtkInformationVector**, vtkInformationVector*) (vtkPolyDataAlgorithm.cxx:91)
> ==1676==    by 0x6456532: vtkExecutive::CallAlgorithm(vtkInformation*, int,
> vtkInformationVector**, vtkInformationVector*) (vtkExecutive.cxx:747)
> ==1676==    by 0x643D6B1:
> vtkDemandDrivenPipeline::ExecuteData(vtkInformation*,
> vtkInformationVector**, vtkInformationVector*)
> (vtkDemandDrivenPipeline.cxx:507)
> ==1676==    by 0x643CD67:
> vtkDemandDrivenPipeline::ProcessRequest(vtkInformation*,
> vtkInformationVector**, vtkInformationVector*)
> (vtkDemandDrivenPipeline.cxx:279)
> ==1676==    by 0x65D3D1E:
> vtkStreamingDemandDrivenPipeline::ProcessRequest(vtkInformation*,
> vtkInformationVector**, vtkInformationVector*)
> (vtkStreamingDemandDrivenPipeline.cxx:202)
> ==1676==    by 0x643D47A: vtkDemandDrivenPipeline::UpdateData(int)
> (vtkDemandDrivenPipeline.cxx:449)
> ==1676==    by 0x65D3EFB: vtkStreamingDemandDrivenPipeline::Update(int)
> (vtkStreamingDemandDrivenPipeline.cxx:246)
> ==1676==    by 0x6454718: vtkExecutive::Update() (vtkExecutive.cxx:315)
> ==1676==  Address 0xeb0a85c is 0 bytes after a block of size 1,500 alloc'd
> ==1676==    at 0x4C267CE: malloc (vg_replace_malloc.c:236)
> ==1676==    by 0x7411595: vtkDataArrayTemplate<float>::Allocate(long long,
> long long) (vtkDataArrayTemplate.txx:136)
> ==1676==    by 0x7412EA7:
> vtkDataArrayTemplate<float>::SetNumberOfValues(long long)
> (vtkDataArrayTemplate.txx:849)
> ==1676==    by 0x7411809:
> vtkDataArrayTemplate<float>::SetNumberOfTuples(long long)
> (vtkDataArrayTemplate.txx:405)
> ==1676==    by 0x64B88C1: vtkImageData::AllocateScalars()
> (vtkImageData.cxx:1574)
> ==1676==    by 0x4653F4: main (AntialiasVector.cxx:286)
> ==1676==
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20110330/b9cd255f/attachment.html>


More information about the vtk-developers mailing list