Re: Python 3 crash when running on optimus card

"Mike C. Fletcher" <[email protected]> Wed, 05 Mar 2014 11:11:24 -0500
Newsgroups gmane.comp.python.opengl.user
Message-ID <[email protected]>
On 03/05/2014 05:49 AM, Ákos Tóth wrote:
> The problem appears to have the same symptoms with 2.7 + PyOpenGL 
> 3.1.0b1 - works without Optimus, crashes with Optimus.
>
> I also ran the trace (Optimus, Python 2.7, PyOpenGL 3.1.0b1, file with 
> single line "from OpenGL.GL import *"), the last couple of screens of 
> which is:
> http://pastebin.com/6gicFwsn
> Let me know if you need more context than that.

Okay, that's more than a little weird. Optimus seems to mean that we're 
not getting core functions in the GL dll under Linux... the weird thing 
is that such a condition *should* just raise an Exception on access, it 
shouldn't cause a crash. There's nothing accelerate related at that 
point, so it makes sense that the behaviour is the same with and without 
it. The particular entry point it's looking up is likely the first one 
we're seeing which is core, but not supported on the Optimus driver.  
There were modifications made in the 3.1 loader that means it will 
attempt to resolve *all* core entry points by DLL lookup, where 3.0.2 
was doing a glGet() for the core entry points over 1.1 to see if we had 
that VERSION supported in a particular context.

So it seems we need to revisit how to resolve the entry points without 
blowing up on Optimus yet also without requiring a glGet() during 
import. It seems likely we need to go back to the lazy-resolution code 
that waits until the last possible moment to determine whether the entry 
point is there (i.e. first call or __bool__ check) and only then does 
the resolution under a GL context.

Thanks,
Mike

-- 
________________________________________________
   Mike C. Fletcher
   Designer, VR Plumber, Coder
   http://www.vrplumber.com
   http://blog.vrplumber.com


------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net