[vtkusers] wx python scripts segfault

Paulo Henrique Junqueira Amorim paulojamorim at gmail.com
Fri Apr 23 14:54:23 EDT 2010


On 1 March 2010 23:55, David Doria
<daviddoria+vtk at gmail.com<daviddoria%2Bvtk at gmail.com>
> wrote:

> I will have to build VTK CVS to be able to test this (I currently have
>>  5.4.2 on all platforms).  Hopefully I can reproduce the crash, in
>> which case I have a better chance of being able to diagnose it.  I'm
>> currently swamped, so this is not going to happen very soon.
>>
>> Please continue with your own debugging in the meanwhile.  First thing
>> you could try, is to modify the attribList to contain only
>> wx.glcanvas.WX_GL_DOUBLEBUFFER bringing it more in linux with
>> wxVTKRenderWindow.
>>
>> Good luck,
>> Charl
>>
>
> I tried modifying attribList - there was no change. I believe the crash
> happens in the Render function. I put a
> print "before"
> and
> print "after"
> in the function:
>
>     def Render(self):
>         """Actually renders the VTK scene on screen.
>         """
>         RenderAllowed = 1
>        print "before"
>         if not self.__RenderWhenDisabled:
>             # the user doesn't want us to render when the toplevel frame
>             # is disabled - first find the top level parent
>             topParent = wx.GetTopLevelParent(self)
>             if topParent:
>                 # if it exists, check whether it's enabled
>                 # if it's not enabeld, RenderAllowed will be false
>                 RenderAllowed = topParent.IsEnabled()
>
>         if RenderAllowed:
>             if self.__handle and self.__handle == self.GetHandle():
>                 self._Iren.GetRenderWindow().Render()
>
>             elif self.GetHandle() and self.__has_painted:
>                 # this means the user has reparented us; let's adapt to the
>                 # new situation by doing the WindowRemap dance
>                 self._Iren.GetRenderWindow().SetNextWindowInfo(
>                     str(self.GetHandle()))
>
>                 # make sure the DisplayId is also set correctly
>                 d = self.GetDisplayId()
>                 if d:
>                     self._Iren.GetRenderWindow().SetDisplayId(d)
>
>                 # do the actual remap with the new parent information
>                 self._Iren.GetRenderWindow().WindowRemap()
>
>                 # store the new situation
>                 self.__handle = self.GetHandle()
>                 self._Iren.GetRenderWindow().Render()
>  print "after"
>
> The output is:
> [doriad at davedesktop wx]$ python wxVTKRenderWindowInteractor.py
>  before
> after
> before
> Segmentation fault
>
> I am not at all a python guru so I don't know how the buffers work/flush,
> so maybe this is misleading because the buffer is not flushed - but if not,
> I think it indicates that the crash happens in this function (the second
> time it is called)?
>
> Thanks,
>
> David
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>

Hi,

I tried the last cvs version ( 1.556 ) and wxRenderWindowInteractor is still
crashing with a segmentation fault in 64 bit Ubuntu 10.04, gcc 4.4.3,
wxPython 2.8.10.1.

I tried in Windows XP 32 bit too and it worked.

Regards,
Paulo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100423/d263ce9f/attachment.htm>


More information about the vtkusers mailing list