[vtk-developers] Patch for vtkPythonUtil.cxx

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


Prabhu Ramachandran wrote:
> 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.

It would help if I attached the patch. Here it is.

cheers,
prabhu
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: vtkPythonUtil.patch
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20080803/cb41f385/attachment.ksh>


More information about the vtk-developers mailing list