[vtkusers] Weird Segfault
Joel Schaerer
joel.schaerer at insa-lyon.fr
Fri Oct 19 05:57:25 EDT 2007
Hi all,
I experience a very weird segfault. It all boils down to the following minimal
program:
#include <vtkRenderWindow.h>
#include <iostream>
using namespace std;
int main(int argc,char * argv[])
{
for (int i=0;i < 3;i++)
{
vtkRenderWindow * a = vtkRenderWindow::New();
a->Render();
a->Delete();
}
}
It crashes when calling Render() the second time. Here is a backtrace:
(gdb) bt
#0 0x00e1e080 in ?? ()
#1 0x003017e8 in ?? () from /usr/lib/libGL.so.1
#2 0x002fd2dd in ?? () from /usr/lib/libGL.so.1
#3 0x002fefca in glXChooseVisual () from /usr/lib/libGL.so.1
#4 0x0217885a in vtkXOpenGLRenderWindowTryForVisual () from
/usr/lib/libvtkRendering.so.5.0
#5 0x0217a740 in vtkXOpenGLRenderWindow::GetDesiredVisualInfo () from
/usr/lib/libvtkRendering.so.5.0
#6 0x0217af4d in vtkXOpenGLRenderWindow::WindowInitialize () from
/usr/lib/libvtkRendering.so.5.0
#7 0x02177819 in vtkXOpenGLRenderWindow::Initialize () from
/usr/lib/libvtkRendering.so.5.0
#8 0x02177909 in vtkXOpenGLRenderWindow::Start () from
/usr/lib/libvtkRendering.so.5.0
#9 0x020fd095 in vtkRenderWindow::DoStereoRender () from
/usr/lib/libvtkRendering.so.5.0
#10 0x020ff57d in vtkRenderWindow::DoFDRender () from
/usr/lib/libvtkRendering.so.5.0
#11 0x02100357 in vtkRenderWindow::DoAARender () from
/usr/lib/libvtkRendering.so.5.0
#12 0x020fe72b in vtkRenderWindow::Render () from /usr/lib/libvtkRendering.so.5.0
#13 0x02177ed4 in vtkXOpenGLRenderWindow::Render () from
/usr/lib/libvtkRendering.so.5.0
#14 0x0804892c in main ()
vtk version is vtk-5.0.3-18.2.fc7 on Fedora 7. Will somebody please tell me why
this happens and if there is a workaround?
Thanks,
--
Joël Schaerer
PhD. Student
Advisors: Patrick Clarysse, Isabelle Magnin
CREATIS-LRMN, UMR CNRS 5220, Inserm U630
INSA de Lyon
7 rue Jean Capelle bat. Blaise Pascal, 4ème étage
F-69621 Villeurbanne CEDEX
France
Tel (+33) 4 72 43 89 17
Fax (+33) 4 72 43 85 26
http://www.creatis.insa-lyon.fr
More information about the vtkusers
mailing list