[vtk-developers] Patch for vtkPythonUtil.cxx

Prabhu Ramachandran prabhu at aero.iitb.ac.in
Sun Aug 3 07:09:39 EDT 2008


Hi,

I ran into a bug that causes a crash on some VTK-Python apps at exit. 
It is hard to reproduce with a small test case but reproducible in some 
TVTK scripts I have.  Basically, what seems to happen is that if there 
is a VTK object on which you have a Python callback via an event 
notification, say "ModifiedEvent" or "DeleteEvent", then it is possible 
(with VTK 5.2/5.3) for the callback to be called *after* PyFinalize is 
called.  This will cause a segfault.  The patch just checks to see if 
the interpreter is initialized and if not return.  This avoids the problem.

I'm going to check it into CVS.  Please let me know if there are any 
objections and I'll revert my changes.

cheers,
prabhu




More information about the vtk-developers mailing list