[vtkusers] TIffReader throws segmentation fault when reading large volume data (> 2GB)

Sean McBride sean at rogue-research.com
Wed Oct 17 10:07:33 EDT 2007


On 10/17/07 10:09 AM, Enkelejda Tafaj said:

>I'm trying to read a 5 GB large stack of .tif images using the 
>TIFFReader on a machine with 8 GB of RAM (64-Bit Processor&Kernel).
>
>Reading stacks < 2 GB works fine, for all larger stacks a segmentation 
>fault is thrown. Does anyone know a reason for this?

Which OS?  Which VTK?

I suspect it is because you have built VTK as a 32 bit library and are
using it within a 32 bit process.  This means your app can use at most 4
GiB of memory, and because of fragmentation usually more like 2 GiB.

Since you have a 64 bit OS and presumably a 64 bit CPU, I suggest you
build VTK as 64 bit.  How depends on your OS.

However, know that VTK is buggy when built as 64 bit.  You can see the
64 bit Vista dashboard is not even able to build without warnings:
<http://www.vtk.org/Testing/Sites/redwall.kitware/Win64-Vista-vs8-
Release/20071017-0300-Nightly/BuildWarning.html>

See also:
<http://www.vtk.org/Wiki/VTK_FAQ#64-bit_System_Issues>

Lastly, the TIFF code specifically is known to have 64 bit issues, see:
<http://public.kitware.com/Bug/view.php?id=5469>

Good luck. :)

-- 
____________________________________________________________
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