Re: crash on import on Mac OS X after xml-generation merge explained

rndblnch <[email protected]> Wed, 22 Jan 2014 08:55:36 +0000 (UTC)
Newsgroups gmane.comp.python.opengl.user
Message-ID <[email protected]>
Mike C. Fletcher <mcfletch <at> vrplumber.com> writes:

> 
> 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).
> Thanks Renaud,
> 
> That gives me an idea how to track it down.  The issue will likely be in 
> the extension handling code, which was modified to support all of the 
> new extension types in GLE, EGL, WGL, etc.  Apparently I wound up moving 
> a call to glGetString before context init.

yes, that was my intuition too.
it is confirmed: if you comment out the 2 calls to glGetString in
OpenGL/extension.py, OpenGL.GL loads (but no extension is available).
however, i could not yet track the code path from import to the call to
glGetString.
i will try to look at it.

renaud

> 
> Appreciated,
> Mike
> 





------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net