[vtkusers] segv when creating and deleting render windows

Joe Miller lpe540 at yahoo.com
Fri Jul 25 15:01:51 EDT 2008


MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

Hi,

I'm getting a segv when I try to create a render window,
delete that window and then create a new one. The issue seems to be
specific to my machine (Fedora Core 7 running a integrated graphics
card with Mesa 6.5.2 (version 13)), as I have no problems running this
on a number of other machines. The issue also goes away when I turn
direct rendering off, either by remote logging into the computer or
setting the LIBGL_ALWAYS_INDIRECT env variable.

I'm convinced
this is probably an issue with mesa, but I wanted to check with you
first to make there wasn't something I was doing wrong, or to see if this is a known issue. When I run it
through the debugger it crashes in glxChooseVisual, when trying to
create the second window.


#0  0x037bc390 in ?? ()
#1  0x00775808 in ?? () from /usr/lib/libGL.so.1
#2  0x007712fd in ?? () from /usr/lib/libGL.so.1
#3  0x00772fea in glXChooseVisual () from /usr/lib/libGL.so.1
#4  0x003bb288 in vtkXOpenGLRenderWindowTryForVisual (DisplayId=0x97c2940, 
    doublebuff=1, stereo=0, multisamples=8, alphaBitPlanes=0, stencil=0)
    at /soft/test/VTK_530/VTK/Rendering/vtkXOpenGLRenderWindow.cxx:253
#5  0x003bb543 in vtkXOpenGLRenderWindow::GetDesiredVisualInfo (this=0x97c22f0)
    at /soft/test/VTK_530/VTK/Rendering/vtkXOpenGLRenderWindow.cxx:360
#6  0x003b9bf7 in vtkXOpenGLRenderWindow::CreateAWindow (this=0x97c22f0)
    at /soft/test/VTK_530/VTK/Rendering/vtkXOpenGLRenderWindow.cxx:550
#7  0x003b87a6 in vtkXOpenGLRenderWindow::WindowInitialize (this=0x97c22f0)
    at /soft/test/VTK_530/VTK/Rendering/vtkXOpenGLRenderWindow.cxx:1022
#8  0x003b91c7 in vtkXOpenGLRenderWindow::Initialize (this=0x97c22f0)
    at /soft/test/VTK_530/VTK/Rendering/vtkXOpenGLRenderWindow.cxx:1044
...

I've tested this with VTK 5.0.2 and the nightly build as of 7/24/08

The progam is simple so I've included it below. Please let me know if you need any more information from me.

Thanks

-joe

#include "vtkRenderWindow.h"
#include "vtkRenderer.h"
#include <iostream>
#include <GL/gl.h>

using namespace std;

int main ()
{
   // create the first window
   vtkRenderWindow *renWin = vtkRenderWindow::New ();
   vtkRenderer *ren = vtkRenderer::New ();
   renWin->AddRenderer(ren);
   renWin->Render ();

   if ((glGetString(GL_VENDOR) != NULL) &&  (glGetString(GL_VERSION) != NULL))
      cerr << "VERSION: " << glGetString(GL_VENDOR) << " " << glGetString(GL_VERSION) << endl;
   else
      cerr << "NO VERSION\n";

   // delete the first window
   renWin->Delete ();

   // create a second window
   vtkRenderWindow *renWin2 = vtkRenderWindow::New ();
   vtkRenderer *ren2 = vtkRenderer::New ();
   renWin2->AddRenderer(ren);
   renWin2->Render ();

   cerr << "FINISH\n";

}



      



More information about the vtkusers mailing list