Re: [PyOpenGL-Users] crash on import on Mac OS X after xml-generation merge explained
Brought to you by:
mcfletch
From: Mike C. F. <mcf...@vr...> - 2014-01-24 20:13:29
|
On 01/21/2014 06:47 AM, rndblnch wrote: > hello, > > i finally managed to get some time to look at the early crash on Mac OS X > that occurs on "from OpenGL import GL" since the xml-generation merge. > it turns out that somehow, the import process triggers a call to glGetString. > and if no opengl context is initialized at this point, it segfaults. > however, if the import is done after a proper context is initialized, the > import works and seams functional (no extensive testing though). > the minimal program below works for me (notice the gl import after the > glutCreateWindow). > > hope this helps, Indeed it did. I tracked down the glGetString() calls, they happened because the image-wrappers do a bool( function ) on various functions which are GL_VERSION_1_2 *on import*, that is, they look at the functions and say "do you exist" and then decide whether to wrap them with convenience code. If you can test out bzr head on your machine it should confirm the fix. I'll start running through the Linux and Windows testing in the meantime to see if there's any regressions caused by it. Thanks, Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |