[Paraview] Particle attributes in vtkPolyData
Berk Geveci
berk.geveci at gmail.com
Mon Apr 10 15:41:51 EDT 2006
It is supposed to. It works everywhere else. Is varname deleted before
it is being used by any chance? This would explain the weird
behaviour. I suggest running this in valgrind (if you are using
Linux).
-Berk
On 4/10/06, Randy Hudson <hudson at mcs.anl.gov> wrote:
>
>
> This code
>
> cout << "[VTKPolyDataSetup::CreateScalarArray_1Part] - 0 - varname:
> " << varname << endl;
> variable_color1->SetName(varname);
> cout << "[VTKPolyDataSetup::CreateScalarArray_1Part] - 0 -
> variable_color1->GetName(): " << variable_color1->GetName() << endl;
>
> gives me
>
> [VTKPolyDataSetup::CreateScalarArray_1Part] - 0 - varname: p_dens
> [VTKPolyDataSetup::CreateScalarArray_1Part] - 0 -
> variable_color1->GetName(): ƒÄƒ‹ƒ´
> Process id: 0 >> ERROR: In
> /home/hudson/Software/ParaView.2.4.2/src_visprep/VTK/Common/vtkDataArrayTemplate.txx,
> line 241
> vtkDoubleArray (0xe90f568): Unable to allocate 2147468465 elements
> of size 8: St9bad_alloc
>
> Process id: 0 >> ERROR: In
> /home/hudson/Software/ParaView.2.4.2/src_visprep/VTK/Common/vtkDataArrayTemplate.txx,
> line 241
> vtkDoubleArray (0xe90f568): Unable to allocate 2147468466 elements
> of size 8: St9bad_alloc
>
> Process id: 0 >> ERROR: In
> /home/hudson/Software/ParaView.2.4.2/src_visprep/VTK/Common/vtkDataArrayTemplate.txx,
> line 241
> vtkDoubleArray (0xe90f568): Unable to allocate 2147468467 elements
> of size 8: St9bad_alloc
>
> Process id: 0 >> ERROR: In
> /home/hudson/Software/ParaView.2.4.2/src_visprep/VTK/Common/vtkDataArrayTemplate.txx,
> line 241
> vtkDoubleArray (0xe90f568): Unable to allocate 2147468468 elements
> of size 8: St9bad_alloc
>
> almost ad infinitum.
>
> Cf. the garbage at the end of the second line.
>
> So, the name must not be being set.
>
> "varname" is a char*, which, as you can see from the first line of
> output, contains a valid char string.
>
> This should work, right?
>
>
> Berk Geveci wrote:
> > The fact that it assigned Scalars_ makes me thing that the array is
> > not getting a name. Can you verify in your code that SetName() is not
> > null or empty?
> >
> > -Berk
> >
> >
> >
>
> --
>
> Randy.
>
> "Just imagine if chutzpah destabilized the space-time continuum. Then imagine Ted Kennedy taking to the floor of the Senate to denounce Cheney's accident reporting protocols. Space and time would fold in on themselves in the well of the Senate and while Ted would vanish in a fzzztt...spork! and a burst of ozone, maybe a cool pterodactyl or woolly mammoth would escape through the rip in existence and terrorize the capitol.
>
> Jonah Goldberg.
>
>
More information about the ParaView
mailing list