[vtkusers] paraview crashes in VTK with > 2^31 points
Sean McBride
sean at rogue-research.com
Thu Nov 22 11:19:39 EST 2007
On 11/22/07 2:14 PM, Marco Ehlert said:
>does paraview (resp. VTK) support data sets of
>more than 2^31 points on 64bit x86 ?
Which OS and which compiler are you on? Does it use LP64, ILP64, LLP64.
etc? See:
<http://en.wikipedia.org/wiki/ILP64#64-bit_data_models>
>I am using a raw file with dimension
>1630x1250x1520 of 8bit-points.
>
>During file reading paraview crashes with SIGFAULT.
>The crash seems based on a wrong 'int' calculation in
>
> vtkImageData::AllocateScalars().
>
>After first attempt of fixing it roughly
>
>/*
> scalars->SetNumberOfTuples((extent[1] - extent[0] + 1)*
> (extent[3] - extent[2] + 1)*
> (extent[5] - extent[4] + 1));
>*/
> scalars->SetNumberOfTuples((long)(extent[1] - extent[0] + 1)*
> (long)(extent[3] - extent[2] + 1)*
> (long)(extent[5] - extent[4] + 1));
If that fixes it, then I'm guessing that on your system int and long are
a different size. Probably Linux or Mac OS X?
You seem to have found a genuine overflow, but casting to long is not
the best fix, since in an LLP64 system both are 32 bit.
>the file is read fine now, but paraview does not display
>any points. On the other hand arrays of 400x400x400
>are displayed perfectly. Maybe there are more such bugs
>in paraview components. At least the above bug is still
>present in current CVS VTK tree.
>
>Any idea how to debug this situation and fix it completely
>is appreciated.
I have looked briefly at the state of VTK wrt 64 bit, and in my opinion
there is a lot of work to be done. How to fix it completely? I don't
know how much kitware has investigated the whole thing, but maybe
something should be started here:
<http://www.vtk.org/Wiki/Proposed_Changes_to_VTK>
--
____________________________________________________________
Sean McBride, B. Eng sean at rogue-research.com
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
More information about the vtkusers
mailing list