[vtk-developers] X Error of failed request: GLXBadDrawable
Mathieu Malaterre
mathieu.malaterre at gmail.com
Thu Jun 26 10:55:12 EDT 2008
Hello there,
I am currently stuck on the following problem: when creating a lot
of vtkRenderWindow (vtkXOpenGLRenderWindow in my case), there are two
issues:
1. X has a limited number of Display. And you get an error like that:
...
Xlib: connection to ":0.0" refused by server
Xlib: Maximum number of clients reached
ERROR: In /home/mmalaterre/Projects/VTK52/Rendering/vtkXOpenGLRenderWindow.cxx,
line 1592
vtkXOpenGLRenderWindow (0x2494140): bad X server connection. DISPLAY=:0
...
This can easily be worked around by reusing the same DisplayId for
all your vtkRenderWindow (see SetDisplayId/GetDisplayId).
2. Once you get pass the first problem, it seem that OpenGL (or nvidia
implementation in my case) has also a limited number of available
context. So when creating a lot of vtkRenderWindow you get:
...
The error was 'GLXBadDrawable'.
(Details: serial 403 error_code 158 request_code 143 minor_code 5)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
...
I have not been able to work around this issue. Has anyone deal with
this before ? Is there a solution or at least a work around ?
Thanks for suggestions !
--
Mathieu
Ps: at least on my machine it seems opengl context are leaked even
after the process was aborted, I cannot even start glxinfo anymore:
$ glxinfo
name of display: :0.0
X Error of failed request: GLXBadDrawable
Major opcode of failed request: 143 (GLX)
Minor opcode of failed request: 5 (X_GLXMakeCurrent)
Serial number of failed request: 18
Current serial number in output stream: 18
More information about the vtk-developers
mailing list