[vtkusers] Bug in vtkRenderer with BackingStoreOn when resizing window
Vladan Bato
vbato at ieee.org
Thu Nov 6 09:46:14 EST 2003
Hi,
there is a bug in vtkRenderer that makes the program crash when you
resize the window (by making it bigger) if the renderer has backing
store activated.
The attached example (modified Cone5.tcl) reproduces the problem.
The only difference is the
ren1 BackingStoreOn
line.
If you resize the window by making it bigger (e.g. dragging the right
border to the right), the program will crash with a segmentation fault.
Upon investigation I think the problem is in the vtkRenderer::Render()
function. When you resize the window, the Render() function thinks that
the backing store is still valid and tries to copy the saved image.
However, it queries the RenderWindow for the *current* size (now bigger)
and then tries to transfer more data than what was saved, thus reading
past the end of the BackingImage buffer.
Note that sometimes the program won't crash. If it doesn't, try resizing
the window more rapidly several times. If the memory after the
BackingImage buffer is valid, it will just copy garbage to the screen
and not crash, so it all depends on the memory environment. It also does
a real render afterwards (if it doeasn't crash) so you often don't see
the garbage.
I tried this with VTK 4.2.2 on RedHat 8, it might not work on other
platforms, but I think the bug is still there.
--
Vladan Bato
vbato at ieee.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Cone5.tcl
Type: application/x-tcl
Size: 710 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20031106/13f90b6c/attachment.tcl>
More information about the vtkusers
mailing list