[vtkusers] wxVTKRenderWindow: magic --sync

Mathieu Malaterre Mathieu.Malaterre at creatis.insa-lyon.fr
Wed Apr 9 13:09:39 EDT 2003


Charl,
	Thanks for taking the time to try my crappy code.
	This bug is really killing me I have been trying to reproduce it with 
standard wx componennt (wxFrame, wxGLCanvas, wxWindow, wxPanel) but with 
no luck.

	BTW I am a bit suprised that you managed to freeze your X session 
without moving your mouse.

---
	I don't know if a lot of people feel concerned about it except you, 
anyway in case I have CC vtk mailing list.
	I have removed a *lot* of stuff from wxVTKRenderWindowInteractor to 
make it more readable. And I have written a small app that use it:

http://www.creatis.insa-lyon.fr/~malaterre/wxVTK/MyApp.tgz

Then start it like this:
$ py wxMyApp.py --sync

IMPORTANT: *To use it, you should first resize the window !*

Then to make it failed or not you can play with the '--sync' option. All 
you have to do then is to drag/drop the mouse on the status bar.

Furthermore if you want to compare to a custom window (from standard wx 
distro) go to wxMyFrame.py and change nobug=1 to nobug=0.

---

Now I can say that commenting line 55 (wxVTKRenderWindow.py):

         #self._Iren.LeftButtonPressEvent()

make a lots of differences. Even if you don't see anymore the cone 
moving at last when you drop the mouse on the status bar, you'll see the 
print "up" works ! And without the '--sync' option.

---
Finally you can also try commenting line 21:
         #parent.Show()

You'll see that the vtkXOpenGLRenderWindow will display outside of the 
wxWindow and if you play with the mouse on the wxWindow, the cone is 
moving. It shows that the vtkXOpenGLRenderWindow doesn't 'hide' the 
wxWindow/wxGLCanvas it's derived from.


I'll still try to track this bug, but honestly I am really fed up with 
my X session freezing all the time...

mathieu


Charl P. Botha wrote:
> On Wed, 2003-04-09 at 15:39, Mathieu Malaterre wrote:
> 
>>if you click *without* moving the mouse, everything should go smoothly.
>>But then, try again and drag the mouse to the status bar...
>>yeah you lost the mouse event! You need to kill this app from a ssh
>>session !
> 
> 
> Without --sync, this did indeed prevent my X from reacting to any
> further interaction.  I had to switch to a VT and kill the Python
> process.  One click was all it took.
> 
> Have you _really_ not been able to reduce this to a simpler
> wxPython-only example?  What happens if you replace the
> wxVTKRenderWindowInteractor by a panel? 
> 


-- 
Mathieu Malaterre
CREATIS
28 Avenue du Doyen LEPINE
B.P. Lyon-Montchat
69394 Lyon Cedex 03
http://www.creatis.insa-lyon.fr/~malaterre/




More information about the vtkusers mailing list