[vtkusers] problem with multi-component arrays

David Doria daviddoria at gmail.com
Thu Feb 9 09:27:43 EST 2012


On Thu, Feb 9, 2012 at 9:26 AM, Dominik Szczerba <dominik at itis.ethz.ch> wrote:
> I am doing something as simple as:
>
> nbs->SetName("MyName");
> nbs->SetNumberOfComponents(NC);
> nbs->SetNumberOfValues(NV);
> output->GetCellData()->AddArray(nbs);
> output->Squeeze();
>
> in my vtkUnstructuredGridAlgorithm class. I am not even filling it,
> nor accessing it, just appending to output. It only works for NC=1,
> anything more leads to crashes of the type listed below.
> Looks like VTK has a problem with multicomponent arrays - or did I
> miss something?
>
>
> #0  0x00007ffff62b3430 in
> vtkDataArrayTemplate<int>::ComputeVectorRange() () from
> /home/dsz/build/vtk-5.8.0/bin/libvtkCommon.so.5.8
> #1  0x00007ffff625cb19 in vtkDataArray::ComputeRange(int) () from
> /home/dsz/build/vtk-5.8.0/bin/libvtkCommon.so.5.8
> #2  0x00007ffff6abadd7 in
> vtkXMLWriter::WriteCellDataAppendedData(vtkCellData*, int,
> OffsetsManagerGroup*) () from
> /home/dsz/build/vtk-5.8.0/bin/libvtkIO.so.5.8
> #3  0x00007ffff6aa53d5 in
> vtkXMLUnstructuredDataWriter::WriteAppendedPieceData(int) () from
> /home/dsz/build/vtk-5.8.0/bin/libvtkIO.so.5.8
> #4  0x00007ffff6aacbb7 in
> vtkXMLUnstructuredGridWriter::WriteAppendedPieceData(int) () from
> /home/dsz/build/vtk-5.8.0/bin/libvtkIO.so.5.8
> #5  0x00007ffff6aa3f52 in vtkXMLUnstructuredDataWriter::WriteAPiece()
> () from /home/dsz/build/vtk-5.8.0/bin/libvtkIO.so.5.8
> #6  0x00007ffff6aa3eac in
> vtkXMLUnstructuredDataWriter::ProcessRequest(vtkInformation*,
> vtkInformationVector**, vtkInformationVector*) () from
> /home/dsz/build/vtk-5.8.0/bin/libvtkIO.so.5.8
> #7  0x00007ffff56e3004 in vtkExecutive::CallAlgorithm(vtkInformation*,
> int, vtkInformationVector**, vtkInformationVector*) () from
> /home/dsz/build/vtk-5.8.0/bin/libvtkFiltering.so.5.8
> #8  0x00007ffff56d68ac in
> vtkDemandDrivenPipeline::ExecuteData(vtkInformation*,
> vtkInformationVector**, vtkInformationVector*) () from
> /home/dsz/build/vtk-5.8.0/bin/libvtkFiltering.so.5.8
> #9  0x00007ffff56d98cd in
> vtkDemandDrivenPipeline::ProcessRequest(vtkInformation*,
> vtkInformationVector**, vtkInformationVector*) () from
> /home/dsz/build/vtk-5.8.0/bin/libvtkFiltering.so.5.8
> #10 0x00007ffff584d28c in
> vtkStreamingDemandDrivenPipeline::ProcessRequest(vtkInformation*,
> vtkInformationVector**, vtkInformationVector*) () from
> /home/dsz/build/vtk-5.8.0/bin/libvtkFiltering.so.5.8
> #11 0x00007ffff56d83f7 in vtkDemandDrivenPipeline::UpdateData(int) ()
> from /home/dsz/build/vtk-5.8.0/bin/libvtkFiltering.so.5.8
> #12 0x00007ffff584ea95 in
> vtkStreamingDemandDrivenPipeline::Update(int) () from
> /home/dsz/build/vtk-5.8.0/bin/libvtkFiltering.so.5.8
> #13 0x00007ffff6ab6cec in vtkXMLWriter::Write() () from
> /home/dsz/build/vtk-5.8.0/bin/libvtkIO.so.5.8

Try SetNumberOfTuples instead of SetNumberOfValues.

David



More information about the vtkusers mailing list