[vtkusers] VTK apparent memory problems?
Tim Raupach
tim at timq.com
Tue May 25 21:26:52 EDT 2004
Hi all,
I'm new to VTK (and ITK) and just trying to get some very basic code
working. I've been looking at the examples on vtk.org and have some code
that should open a 3d image file and display it.
It seems to run properly once - but then not again until I reboot my
computer. On subsequent runs I get a window with a white background, but
no graphics ever appear in it.
I downloaded the sphere example (in C++) that's available at
http://vtk.org/example-code.php, and it seems to run properly as many
times as I like, until I run the imageviewer code that I'm trying to
write. After I've run that code, the sphere example also gives a blank
white window all the time, until I reboot.
Both my code and the sphere code give this kind of error when I run them
through valgrind:
,----
| ==6914== Source and destination overlap in memcpy(0x3DC4DD30, 0x3DC4DD30, 4)
| ==6914== at 0x3C0210FE: memcpy (mac_replace_strmem.c:113)
| ==6914== by 0x3D9EC0E7: (within /usr/X11R6/lib/libXt.so.6.0)
| ==6914== by 0x3D9ECA11: _XtGetResources (in /usr/X11R6/lib/libXt.so.6.0)
| ==6914== by 0x3D9D5EE2: (within /usr/X11R6/lib/libXt.so.6.0)
| ==6914==
| ==6914== Syscall param writev(vector[...]) contains uninitialised or unaddressable byte(s)
| ==6914== at 0x3DBA86DE: (within /lib/libc-2.3.2.so)
| ==6914== by 0x3D7EAE8F: (within /usr/X11R6/lib/libX11.so.6.2)
| ==6914== by 0x3D7EBA5E: _X11TransWritev (in /usr/X11R6/lib/libX11.so.6.2)
| ==6914== by 0x3D7CC176: _XSend (in /usr/X11R6/lib/libX11.so.6.2)
| ==6914== Address 0x3DC4F1A1 is 825 bytes inside a block of size 262140 alloc'd
| ==6914== at 0x3C02140D: malloc (vg_replace_malloc.c:105)
| ==6914== by 0x3D94706D: (within /usr/X11R6/lib/libGL.so.1.2)
| ==6914== by 0x3D9472EB: glXCreateContext (in /usr/X11R6/lib/libGL.so.1.2)
| ==6914== by 0x3D0096A9: vtkXOpenGLRenderWindow::WindowInitialize() (in /usr/local/lib/vtk/libvtkRendering.so)
`----
Just to continue bombarding you all with details, the VTK pipeline I'm
trying to run is:
bridge(created with ImageToVTKImageFilter) -> vtkContourFilter ->
vtkSmoothPolyDataFilter -> vtkPolyDataNormals -> vtkStripper ->
vtkPolyDataMapper
The mapper object is then assigned to a vtkActor and
vtkRenderer/vtkRenderWindow/vtkRenderWindowInteractor are set up as in
the sphere example.
I run debian linux and I've just upgraded all my packages to the latest
versions available in the unstable distribution. I'm running VTK version
4.2 from source.
Has anyone else come across similar problems? I'd really appreciate
hearing from you if you have.
Thanks in advance,
Tim
More information about the vtkusers
mailing list