[vtkusers] Python 2.2 Core

David Gobbi dgobbi at irus.rri.ca
Sun Mar 17 19:03:38 EST 2002


Hi Prabhu, Brad:

I test VTK 4.x (CVS) with python 2.2 under RedHat every so often and I
haven't seen this problem.  But the error does sound familiar to me,
it can happen if multiple copies of vtkPythonUtil.o are linked into the
final application.  This line of code in particular is where the
problem manifests itself:

vtkPythonUtil.cxx:384-387
int PyVTKObject_Check(PyObject *obj)
{
  return (obj->ob_type == &PyVTKObjectType);
}

My suggestion is to get a fresh copy of VTK 4.x, make sure that
BUILD_SHARED_LIBS:BOOL=ON in CMakeCache.txt, and try again.  Note
that CMake doesn't know about Python 2.2, so after running CMake
the first time you will have to fill in all the miscellaneous
cmake PYTHON variables by hand.

 - David

--
  David Gobbi, MSc                       dgobbi at irus.rri.ca
  Advanced Imaging Research Group
  Robarts Research Institute, University of Western Ontario

On Mon, 18 Mar 2002, Prabhu Ramachandran wrote:

> >>>>> "BH" == Brad Howes <bradhowes at mac.com> writes:
>
>     BH> I've just begun working with VTK and its Python interfaces. I
>     BH> got everything to compile on my RedHat 7.2 Intel box without
>     BH> problems. I can run all of the examples (though the Tcl/Tk
>     BH> ones report a Segmentation Fault upon exiting).  I had no
>
> Thats strange.
>
>     BH> problem converting hello.tcl into a hello.py script, and it
>     BH> too runs. However, when I try to do the same for xyPlot.tcl, I
>     BH> run into a problem with the following snippet:
>
>     BH>   from vtkpython import * a = vtkTransform() b =
>     BH> vtkTransformPolyDataFilter() b.SetTransform( a )
>
> Well, that particular code snippet runs fine for me with Python 2.1.2
> on Debian GNU/Linux with a very recent CVS snapshot of VTK.  Maybe
> something new in Python 2.2 is causing trouble?  I'm not sure the VTK
> Python wrapper code has changed much in the recent past.
>
> Your segmentation fault problem with the Tcl/Tk wrappers are also
> strange.  A bug of that magnitude is very rare.  BTW, you might also
> want to try VTK rpms from here:
>
>      http://www.creatis.insa-lyon.fr/vtk/
>
> prabhu
> _______________________________________________
> 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