All pyqt5 quick examples fails with shader program link error

Bug #1241988 reported by Hogne Håskjold
40
This bug affects 9 people
Affects Status Importance Assigned to Milestone
nvidia-graphics-drivers-319-updates (Ubuntu)
Triaged
Undecided
Unassigned

Bug Description

$ lsb_release -rd
Description: Ubuntu 13.10
Release: 13.10

$ apt-cache policy pyqt5-doc
pyqt5-doc:
  Installed: 5.0.1-1ubuntu1
  Candidate: 5.0.1-1ubuntu1
  Version table:
 *** 5.0.1-1ubuntu1 0
        500 http://no.archive.ubuntu.com/ubuntu/ saucy/universe amd64 Packages
        100 /var/lib/dpkg/status

Graphics driver:
$ apt-cache policy nvidia-319-updates
nvidia-319-updates:
  Installed: 319.60-0ubuntu1
  Candidate: 319.60-0ubuntu1
  Version table:
 *** 319.60-0ubuntu1 0
        500 http://no.archive.ubuntu.com/ubuntu/ saucy/restricted amd64 Packages
        100 /var/lib/dpkg/status

All examples under /usr/share/doc/pyqt5-doc/examples/quick/ fails on shader compilation, example:

/usr/share/doc/pyqt5-doc/examples/quick/tutorials/extending/chapter1-basics$ python3 chapter1-basics.py
QOpenGLShaderProgram: could not create shader program
QOpenGLShader: could not create shader
QSGMaterialShader: Shader compilation failed:
""
QOpenGLShaderProgram::uniformLocation( qt_Matrix ): shader program is not linked
QOpenGLShaderProgram: could not create shader program
QOpenGLShader: could not create shader
QSGMaterialShader: Shader compilation failed:
""
QOpenGLShaderProgram::uniformLocation( matrix ): shader program is not linked
QOpenGLShaderProgram::uniformLocation( textureScale ): shader program is not linked
QOpenGLShaderProgram::uniformLocation( color ): shader program is not linked
QOpenGLShaderProgram::uniformLocation( alphaMin ): shader program is not linked
QOpenGLShaderProgram::uniformLocation( alphaMax ): shader program is not linked
QOpenGLShaderProgram::uniformLocation( fontScale ): shader program is not linked
QOpenGLShaderProgram::uniformLocation( vecDelta ): shader program is not linked
Segmentation fault (core dumped)
$

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

This is not a bug in pyqt5. If you run some examples from qtdeclarative5-examples, you'll probably get the same errors.
It probably means that you have incomplete OpenGL drivers. Output of these commands may be helpful:

glxinfo | head
lspci | egrep 'VGA|Graphics'

affects: pyqt5 (Ubuntu) → qtdeclarative-opensource-src (Ubuntu)
Changed in qtdeclarative-opensource-src (Ubuntu):
status: New → Incomplete
Revision history for this message
Hogne Håskjold (haskjold) wrote :

Hi

OpenGL works fine on my system outside of pyqt5. It also works with the qtdeclarative5-examples (tested with dynamicscene.qml)

$ glxinfo | head
name of display: :0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: NVIDIA Corporation
server glx version string: 1.4
server glx extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_profile,
    GLX_ARB_create_context_robustness, GLX_ARB_fbconfig_float,
    GLX_ARB_multisample, GLX_EXT_buffer_age,
    GLX_EXT_create_context_es2_profile, GLX_EXT_create_context_es_profile,
$ lspci | egrep 'VGA|Graphics'
01:00.0 VGA compatible controller: NVIDIA Corporation GF104 [GeForce GTX 460] (rev a1)
$

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Can you install PyQt 5.1.1 from ppa:mitya57/ppa and see if the issue is fixed there?

Revision history for this message
Hogne Håskjold (haskjold) wrote :

Hi

I tested with PyQt 5.1.1 from ppa:mitya57/ppa and get the same errors as before.

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Thanks for testing, I've now forwarded your report to upstream PyQt authors.

Changed in qtdeclarative-opensource-src (Ubuntu):
status: Incomplete → Triaged
Revision history for this message
Dmitry Shachnev (mitya57) wrote :
Revision history for this message
Hogne Håskjold (haskjold) wrote :

There seem to be another user on nvidia binary driver also with issues:
http://www.riverbankcomputing.com/pipermail/pyqt/2013-October/033379.html

And he got it working with nouveau driver.
http://www.riverbankcomputing.com/pipermail/pyqt/2013-November/033384.html

So the commonality might seem to be the nvidia binary driver.

Revision history for this message
Dmitry Shachnev (mitya57) wrote : Re: [PyQt] Fwd: [Bug 1241988] [NEW] All pyqt5 quick examples fails with shader program link error

On Sun, Nov 17, 2013 at 4:17 PM, Phil Thompson
<email address hidden> 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.

OK. I'm reassigning the LP bug to Nvidia drivers, maybe the
maintainers have a clue.

--
Dmitry Shachnev

affects: qtdeclarative-opensource-src (Ubuntu) → nvidia-graphics-drivers-304-updates (Ubuntu)
affects: nvidia-graphics-drivers-304-updates (Ubuntu) → nvidia-graphics-drivers-319-updates (Ubuntu)
Revision history for this message
Peter Würtz (pwuertz) wrote :

I already reported this problem years ago when I tried running PyQt4 applications on OpenGl.
https://bugs.launchpad.net/ubuntu/+source/python-qt4/+bug/941826

Some Ubuntu specific modification in the nvidia driver package causes shader compilation errors in PyQt and PySide.

Revision history for this message
John Galt (johngalt2600) wrote :

Many years later. Same problem exists with PyQt5. I reinstall linux without installing nvidia drivers and the program works. Then I install nvidia drivers and the program crashes. On a side note. Even with out nvidia drivers installed if I run it in a su shell it crashes in a slightly different way.

Revision history for this message
Mikhail Novosyolov (mikhailnov) wrote :

Yes, the problem exists, I am using MAUI (mauilinux.org), Ubuntu 16.04 with Qt 5.7, I get this error only in deepin-screenshot from https://launchpad.net/~leaeasy/+archive/ubuntu/dde
I tried to rebuild the package (because it was build with another version of Qt), the rebuild was successfull, but the error resists.

Get this with both nvidia-375 and nvidia-381. When I switch to Intel Graphics on the same machine, deepin-screenshot works well,not OpenGL errors occur.

I did not have this issue beforehand with nvidia.

I will try to conact Nvidia...

Revision history for this message
Mikhail Novosyolov (mikhailnov) wrote :

The newer version of deepin-screenshot does not have this problem on Ubuntu 16.04, 17.04 and 17.10

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.