When I try to run the OpenGL demo GLUT/gears.py, I get the following traceback:
OpenGL Warning: XGetVisualInfo returned 0 visuals for 0x98cb2a8
OpenGL Warning: Retry with 0xd4 returned 1 visuals
OpenGL Warning: XGetVisualInfo returned 0 visuals for 0x98cb2a8
OpenGL Warning: Retry with 0xd4 returned 1 visuals
Traceback (most recent call last):
File "gears.py", line 264, in <module>
init()
File "gears.py", line 234, in init
glEndList()
File "errorchecker.pyx", line 50, in OpenGL_accelerate.errorchecker._ErrorChecker.glCheckError (src/errorchecker.c:1050)
OpenGL.error.GLError: GLError(
err = 1280,
description = 'invalid enumerant',
baseOperation = glEndList,
cArguments = ()
)
I get the same error in my own code, but this is probably a better example to track the bug.
Any idea what is causing this?
glxinfo from the virtual machine.
A call to glIsList(gear1) just after line 230 returns GL_FALSE, if that helps at all.
Adding:
OpenGL.ERROR_CHECKING = False
fixed the problem and the code runs fine. I suspect a bug in the error checking code, maybe a type conversion?
It *appears* to be VirtualBox error:
https://www.virtualbox.org/ticket/6848
with the last comment implying using:
LIBGL_ALWAYS_INDIRECT=1 python gears.py
to test if this is the same issue (if it is, then that should cause it to work).
Hmm, ERROR_CHECKING turned off working likely means we're having an error suppressed slightly earlier in the code.
Setting LIBGL_ALWAYS_INDIRECT=1 in the shell does indeed make the code work no problems.
I am slightly worried about the error suppressed as my code *appears* to run fine otherwise. I wonder if it runs fine by luck rather than design, then there's something needing fixing.
However, running my own code with the option LIBGL_ALWAYS_INDIRECT=1 gives me another error. If I run my code with OpenGL.ERROR_CHECKING = False, it appears to do the things I intended it to do. So, this bug could be different from the virtual box one. Sorry. :(