Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-129994

Video QML component crashes with "Cannot make QOpenGLContext current in a different thread"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • 6.8.2, 6.9
    • 6.7.2
    • Multimedia
    • AMD Ryzen 5 7600 6-Core Processor, GPU comes with the CPU

      Gentoo GNU/Linux, ffmpeg 4.4.4-r11
    • Linux/Wayland
    • 92a90b20f43e8de9c5e1975ab7efecb6f286f49f
    • Multimedia wk 43-44, Multimedia wk 47-48, Multimedia wk 49-50, Multimedia wk 51-2

    Description

      With the following code:

      import QtQuick 2.15
      import QtQuick.Controls 2.15
      import QtQuick.Layouts 1.15
      import QtMultimedia
      import org.kde.kirigami 2.13 as Kirigami

      Kirigami.ApplicationWindow {
          id: root

          title: i18n("kirigamitest6")

          pageStack.initialPage: page

          Kirigami.ScrollablePage {
              id: page

              title: i18n("Main Page")
            ListView {
              model: 100
              delegate: ColumnLayout {
                id: listItem
                required property int index
                Label {
                  text: `test ${listItem.index}`
                }
                Video {
                  source: `file:///home/test/testvideos/${listItem.index % 10}.webm`
                  Component.onCompleted: console.log('video loaded:', source, autoPlay, playbackState, errorString);
                  autoPlay: true
                  loops: MediaPlayer.Infinite
                  Layout.preferredWidth: Kirigami.Units.gridUnit * 5
                  Layout.preferredHeight: Kirigami.Units.gridUnit * 5
                  TapHandler {
                    onSingleTapped:

      {                 video.playOrPause();               }

                  }
                }
              }
            }
          }
      }

       

      Put 10 identical webm files as /home/test/testvideos/{0..9}.webm . Run this, and drag the scroll bar quickly and repeatedly. It crashes with the error and backtrace attached below.

      Attachments

        1. OpenGLCrashRepro.7z
          2 kB
        2. typescript
          181 kB

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              lars.sutterud Lars Sutterud
              tusooa tusooa tusooa
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: