[vtkusers] Crash with subsequent creation of vtkRenderWindow in Python

Pearu Peterson vtk at cens.ioc.ee
Sat Apr 5 10:28:07 EST 2003


Hi,

The following Pyhton code

"""
from vtk import vtkRenderWindow
win = vtkRenderWindow()
win.SetSize((400,400))
win.Render()
raw_input('Press any key to close window: ')
del win
raw_input('Press any key to create a new window: ')
win = vtkRenderWindow()
win.DebugOn()
win.SetSize((400,400))
win.Render()
raw_input('Press any key to exit: ')
"""

crashes with the following output:

"""
MMX cpu detected.
Mesa: Mesa DEBUG build Apr  5 2003 11:45:16
Press any key to close window: 
Press any key to create new window: 
Debug: In /home/users/pearu/cvs/VTK/Rendering/vtkRenderWindow.cxx, line
219 vtkXOpenGLRenderWindow (0x821a2b0): Starting Render Method.


Debug: In /home/users/pearu/cvs/VTK/Rendering/vtkXOpenGLRenderWindow.cxx,
line 494 vtkXOpenGLRenderWindow (0x821a2b0): Resizing the xwindow


X Error of failed request:  BadValue (integer parameter out of range for
operation)
  Major opcode of failed request:  78 (X_CreateColormap)
  Value in failed request:  0x401a1d54
  Serial number of failed request:  8
  Current serial number in output stream:  13
vtkDebugLeaks has detected LEAKS!
Class vtkXOpenGLRenderWindow has 1 instance still around.
Class vtkIdList has 1 instance still around.
Class vtkRendererCollection has 1 instance still around.
"""

I am using VTK from its CVS and Mesa 5.0.1, both built
with gcc-2.95.4 on Debian woody.

Is the above Python code buggy or is it VTK or Mesa bug?
What is the correct way to close a RenderWindow and open another one?

I have noticed that there is no problem if to create several
subsequent RenderWindows but whenever one is closed before opening
another RenderWindow, this crash occures. Any ideas?

Thanks,
	Pearu




More information about the vtkusers mailing list