[vtkusers] Segmentation Fault

donna at v1.wustl.edu donna at v1.wustl.edu
Wed Jan 15 10:19:59 EST 2003


Sorry Andy,

I'm in digest mode and I was trying to respond to this thread:

http://public.kitware.com/pipermail/vtkusers/2003-January/015384.html

I ended up using vtkpython on Linux, too.  The problem with python on
Linux was bizarre: It seg faulted while writing vtk files (using shared
gcc libs) -- specifically while executing this line in
VTK/IO/vtkDataWriter.cxx:

  *fp << "POINTS " << numPts << " ";

Switching to vtkpython made the problem go away. (???)

Donna
Clueless but glad it works

Andy Cedilnik wrote:
> 
> Hi Donna,
> 
> Who is Dingrong?
> 
> Anyway, the reason why vtkpython works is because when python loads
> shared libraries, on some platforms it does not initialize c++ classess
> correctly. On platforms such as windows or linux, these classes are
> initialized, while on Suns, HPs, SGIs, they are not.
> 
> The trick of vtkpython is that it is actually a C++ program which is
> linked to python library. Since it is a C++ program, it does initialize
> c++ classes.
> 
>                                 Andy Cedilnik
>                                 Kitware Inc.
> 
> On Wed, 2003-01-15 at 09:46, donna at v1.wustl.edu wrote:
> > Hi Dingrong,
> >
> > As David suggested, I have had seg faults with python/tcl/tk/vtk due to
> > a mismatch between the header files (e.g., tk.h) found by vtk while
> > building tk-dependent classes and the actual libraries (e.g., tk.so)
> > linked at run-time.
> >
> > But also I have had luck using the vtkpython executable (see
> > Wrapping/Python subdirectory in your VTK build tree) in lieu of the
> > python executable built in my Python build tree.
> >
> > I don't understand why vtkpython works when python doesn't, but such is
> > the case for me.



More information about the vtkusers mailing list