[vtkusers] SetFilePrefix crashes application

Ken Martin ken.martin at kitware.com
Thu Nov 8 10:01:52 EST 2001


Hello Rene,

>From a quick look your code seems fine. My first guess would be that
somehow some old object files, headers or libraries are getting mixed
into the VTK 3.2 build (or execution in the case of shared libs) of
your application. Volume16Reader was pretty much unchanged between 2.3
and 3.2.

Ken


> -----Original Message-----
> From: vtkusers-admin at public.kitware.com
> [mailto:vtkusers-admin at public.kitware.com]On Behalf Of Rene
> Tschirley
> Sent: Thursday, November 08, 2001 8:21 AM
> To: VTK-List
> Subject: [vtkusers] SetFilePrefix crashes application
>
>
> Dear all,
>
>
> Now I decided that it is time to go on visualising with
> vtk3.2 and tried
> to upgrade some applications from 2.3 to 3.2. I'm quite
> worried about a
> problem with vtkVolume16Reader. My application uses:
>
>   if (!reader)
>     {
>       reader = vtkVolume16Reader::New();
>       reader->SetDataDimensions(size_x,size_y);
>       reader->SetDataByteOrderToLittleEndian();
>       reader->SetFilePrefix(inputfilename);
>       reader->SetImageRange(from, to);
>       reader->SetDataSpacing (spacing_x, spacing_y, spacing_z);
>       reader->Update();
>     }
>
> and runs perfectly with vtk2.3. Using vtk3.2 it crashes
> with a segv in
> either SetFilePrefix or SetImageRange. The gdb stack trace shows
>
>   #0  0x403ca586 in
> vtkPointSetToPointSetFilter::~vtkPointSetToPointSetFilter (
>       this=0x8058970, __in_chrg=0) at
> vtkPointSetToPointSetFilter.cxx:63
>   #1  0x40525e71 in vtkWarpLens::~vtkWarpLens
> (this=0x8058970, __in_chrg=0)
>       at vtkWarpLens.cxx:112
>   #2  0x804cd1b in ReadVolume () at vol_analyse.cxx:1131
>   #3  0x804aaa5 in main () at vol_analyse.cxx:232
>   #4  0x40c196ef in __libc_start_main () from /lib/libc.so.6
>
> when SetImageRange crashes the application and
>
>   #0  0x0 in ?? ()
>   #1  0x804cd0a in ReadVolume () at vol_analyse.cxx:1130
>   #2  0x804aaa5 in main () at vol_analyse.cxx:232
>   #3  0x40c196ef in __libc_start_main () from /lib/libc.so.6
>
> if SetFilePrefix crashes it.
>
> I'm unsure if I missed something obvious or if I should patch the
> destructor in vtkPointSetToPointSetFilter.cxx.
>
>
> Thanks in advance,
>        René
>
> --
> Dipl.-Inform. René Tschirley
> http://www.cs.tu-berlin.de/~pooh
> TU Berlin, Computer Graphics and Computer Assisted Medicine
> research group
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers




More information about the vtkusers mailing list