图形问题

图形问题

我在使用 disco 19-04 时遇到了图形问题。

此 Python 代码可以重现它:

import sys
from PyQt5.QtWidgets import QApplication, QWidget, QGridLayout
from PyQt5.QtMultimediaWidgets import QVideoWidget
from PyQt5.QtMultimedia import QMediaPlayer

class Main(QWidget):
    def __init__(self):
        super().__init__()
        self.gl = QGridLayout(self)
        self.video = QVideoWidget()
        self.gl.addWidget(self.video)
        self.player = QMediaPlayer()
        self.player.setVideoOutput(self.video)
        self.show()

if __name__ == '__main__':
    app = QApplication(sys.argv)
    main = Main()
    sys.exit(app.exec_())

gdb的回溯:

Thread 1 "python3" received signal SIGSEGV, Segmentation fault.
__memcpy_ssse3 () at ../sysdeps/x86_64/multiarch/memcpy-ssse3.S:309
309 ../sysdeps/x86_64/multiarch/memcpy-ssse3.S: Aucun fichier ou dossier de ce type.
(gdb) bt
#0  __memcpy_ssse3 () at ../sysdeps/x86_64/multiarch/memcpy-ssse3.S:309
#1  0x00007fffdb53b78a in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
#2  0x00007fffe808b331 in ?? () from /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvaapi.so
#3  0x00007fffe805590a in ?? () from /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvaapi.so
#4  0x00007fffe805721f in ?? () from /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvaapi.so
#5  0x00007fffe80614c8 in ?? () from /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvaapi.so
#6  0x00007fffe830d87e in ?? () from /lib/x86_64-linux-gnu/libgstbase-1.0.so.0
#7  0x00007fffe862592e in gst_element_change_state () from /lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#8  0x00007fffe862604e in ?? () from /lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#9  0x00007fffe873729d in ?? () from /lib/x86_64-linux-gnu/libQt5MultimediaGstTools.so.5
#10 0x00007fffe873647f in QGstreamerVideoWindow::QGstreamerVideoWindow(QObject*, QByteArray const&) ()
   from /lib/x86_64-linux-gnu/libQt5MultimediaGstTools.so.5
#11 0x00007fffe8779823 in ?? () from /usr/lib/x86_64-linux-gnu/qt5/plugins/mediaservice/libgstmediaplayer.so
#12 0x00007fffe8785471 in ?? () from /usr/lib/x86_64-linux-gnu/qt5/plugins/mediaservice/libgstmediaplayer.so
#13 0x00007ffff2c3b567 in ?? () from /lib/x86_64-linux-gnu/libQt5Multimedia.so.5
#14 0x00007ffff2c7c0f9 in QMediaPlayer::QMediaPlayer(QObject*, QFlags<QMediaPlayer::Flag>) () from /lib/x86_64-linux-gnu/libQt5Multimedia.so.5
#15 0x00007ffff1d20079 in ?? () from /usr/lib/python3/dist-packages/PyQt5/QtMultimedia.cpython-37m-x86_64-linux-gnu.so
#16 0x00007ffff1d20163 in ?? () from /usr/lib/python3/dist-packages/PyQt5/QtMultimedia.cpython-37m-x86_64-linux-gnu.so
#17 0x00007ffff34f16f4 in ?? () from /usr/lib/python3/dist-packages/sip.cpython-37m-x86_64-linux-gnu.so
...

我认为这不是 gstreamer 中的错误,而是视频驱动程序问题。

我的配置:

$ vainfo
libva info: VA-API version 1.4.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_4
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.4 (libva 2.4.0)
vainfo: Driver version: Intel i965 driver for Intel(R) GM45 Express Chipset - 2.3.0
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
$ glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Intel Open Source Technology Center (0x8086)
    Device: Mesa DRI Mobile Intel® GM45 Express Chipset  (0x2a42)
    Version: 19.0.8
    Accelerated: yes
    Video memory: 1536MB
    Unified memory: yes
    Preferred profile: compat (0x2)
    Max core profile version: 0.0
    Max compat profile version: 2.1
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 2.0
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Mobile Intel® GM45 Express Chipset 
OpenGL version string: 2.1 Mesa 19.0.8
OpenGL shading language version string: 1.20

OpenGL ES profile version string: OpenGL ES 2.0 Mesa 19.0.8
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 1.0.16

我知道这个错误: https://bugs.launchpad.net/ubuntu/+source/intel-vaapi-driver/+bug/1813131

但是他们说这个错误已经通过软件包 intel-vaapi-driver - 2.3.0-0ubuntu2 解决了,而且我已更新此驱动程序:

$ apt-cache policy i965-va-driver
i965-va-driver:
  Installé : 2.3.0-0ubuntu2
  Candidat : 2.3.0-0ubuntu2
 Table de version :
 *** 2.3.0-0ubuntu2 500
        500 http://be.archive.ubuntu.com/ubuntu disco/universe amd64 Packages
        100 /var/lib/dpkg/status

相关内容