[PyQt] Fwd: [Bug 1241988] [NEW] All pyqt5 quick examples fails with shader program link error

Hans-Peter Jansen hpj at urpla.net
Thu Jan 9 13:35:44 GMT 2014


On Donnerstag, 9. Januar 2014 04:24:58 pwuertz wrote:
> Phil Thompson-5 wrote
> 
> > I'm still stuck for suggestions. The examples are trivial. They don't even
> > contain OpenGL code - the shaders causing the problems are all created
> > internally by Qt.
> 
> I'm pretty sure this is the exact same problem I have since 2012:
> http://www.riverbankcomputing.com/pipermail/pyqt/2012-January/031009.html
> 
> Back then the OpenGL graphics backend in Qt was an optional feature hardly
> anyone cared about, unfortunately. Now with QML/Qt5 it is pretty much the
> default.
> 
> This puzzeling shader compilation error only affects the Qt/Python bindings
> (PyQt as well as PySide) running on a system with the Ubuntu-packaged Nvidia
> driver.  Installing the Nvidia driver manually did fix the problem for me
> once but completely messed up my system when I tried to switch back to the
> packaged driver.

You should contact some person responsible for the ubuntu nvidia build.

Packaging nvidia drivers is an awful task - and mixing them with self built 
ones is a recipe for desaster. Guaranteed. 

My humble guess: it's something related to using the "right" library version. 
IIRC, GL libs are loaded dynamically, and distributions usually have a update 
directory with preferred libs (similar to kernel modules). Hence, some load 
order issue might arise. Python does its own lib handling, too, which might 
interfere and explain the difference with the C++ version..

For the record: openSUSE 13.1/x86_64 with nvidia 331.20 drivers from 
home:Lord_LT:drivers work fine, but trigger

QGLContext::makeCurrent(): Cannot make invalid context current.
QGLContext::makeCurrent(): Cannot make invalid context current.
QGLContext::makeCurrent(): Cannot make invalid context current.

messages on exit.

python: 2.7.5
sip: 4.15.1
qt4: 4.8.5
pyqt4: 4.10.2

Pete


More information about the PyQt mailing list