Package: python-vtk
Version: 5.6.1-6
Tags: patch

Dear Maintainer,

at work I ran into a nasty problem with vtk 5.6: Using the
wxVTKRenderWindowInteractor lead to segmentation faults. I did not use
the Debian package, but it seems this problem is unpatched at
git://git.debian.org/git/collab-maint/vtk.git
fa252a51fff63986d69bcdd6b1c6659353ee47df

The attached patch is from upstream's git repository but was not
included in 5.6 as it seems. Please consider applying it.

Greetings, Torsten

commit 24696342385db581cfcabb79eb90164bdd045267
Author: Prabhu Ramachandran <pra...@aero.iitb.ac.in>
Date:   Tue May 25 15:12:55 2010 -0700

    Fix crashing wxVTKRenderWindowInteractor on Linux
    
    BUG: Fixing a segfault with recent versions of VTK after Feb 5, 2010.
    The specific checkin that caused this is
    cc83e73b7f0efff98441d8b9640d34c86321578c.  This patch changed the way
    swig mangled pointers were checked from Python and that broke the
    GetDisplayId method of wxVTKRenderWindowInteractor which caused the
    segfault.

diff --git a/Wrapping/Python/vtk/wx/wxVTKRenderWindowInteractor.py b/Wrapping/Python/vtk/wx/wxVTKRenderWindowInteractor.py
index d3807cb..69c1ee7 100644
--- a/Wrapping/Python/vtk/wx/wxVTKRenderWindowInteractor.py
+++ b/Wrapping/Python/vtk/wx/wxVTKRenderWindowInteractor.py
@@ -347,7 +347,7 @@ class wxVTKRenderWindowInteractor(baseClass):
                 
                 # we now have 0xdeadbeef
                 # VTK wants it as: _deadbeef_void_p (pre-SWIG-1.3 style)
-                d = '_%s_%s' % (d[2:], 'void_p')
+                d = '_%s_%s\0' % (d[2:], 'void_p')
 
         return d
 

Reply via email to