[vtkusers] Xorg/VTK Memory leak

Johannes Strecha j.strecha at gmail.com
Mon Oct 22 05:04:50 EDT 2012


Hi everybody,

When rendering a lot of images from unstructured grid data I
experience that the process Xorg uses a lot of memory, which is not
being freed after the rendering is complete.

My python-script looks like this:
> set up a vtkXMLUnstructuredGridReader
> ... set up the pipeline
> set up a vtkOpenGLRenderer
> set up a vtkXOpenGLRenderWindow (using the OpenGLRenderer)
> ... render and save image
> ... change reader filename, render & save again. Do so for all specified files.

During execution the filename the reader reads is changed, then the
image is being re-rendered and saved to disk. After 30 or so rendered
images the memory consumed by the process Xorg goes up gradually. The
python process uses only a moderate, approximately constant amount of
memory. After rendering is complete Xorg does not free all of the
memory it uses. After 200 rendered images the Xorg-process still uses
2GB RAM, freeing about 500MB when finished.

Is this a problem in VTK or OpenGL or the nv-glx module or the python-script?

OS: Debian wheezy up-to-date
>From Xorg -version:
> X.Org X Server 1.12.4
> Release Date: 2012-08-27
> Build Operating System: Linux 3.2.0-4-amd64 x86_64 Debian

>From glxinfo | grep version
> server glx version string: 1.4
> client glx version string: 1.4
> GLX version: 1.4
> OpenGL version string: 4.2.0 NVIDIA 304.48
> OpenGL shading language version string: 4.20 NVIDIA via Cg compiler

>From  python -c 'import vtk; print(vtk.vtkVersion.GetVTKSourceVersion())'
> vtk version 5.8.0

>From python --version
> Python 2.7.3rc2

Kind Regards,
Johannes Strecha.



More information about the vtkusers mailing list