PyGLUT 1.43 segfaults if one tries to call glutDisplayFunc, glutOverlayDisplay, glutKeyboardFunc, glutSpecialFunc, glutMouseFunc, glutMotionFunc, glutPassiveMotionFunc, glutVisibilityFunc before calling glutCreateWindow. glutIdleFunc succeeds, though. I haven't tested the other callbacks, but I'd imagine the ones which have to do with X Window interaction would crash.
I imagine this has to do with uninitialized X Window-related variables, and has a simple workaround: not making the mistake of not creating the window.
This isn't a particularly severe bug, but I imagine PyGLUT could raise an exception, which is much more developer-friendly than just segfaulting.
The following code crashes:
from OpenGL.GLUT import *
def display(): pass
swapping the last two lines of the script obviously fixes it, but as I said above, I don't believe this is a proper solution.
Log in to post a comment.