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

Crash when deleteLater() QML Video component in Qt 5.13, but not in Qt.5.12.3

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • None
    • 5.12.4, 5.13.0, 5.13.1
    • Multimedia
    • None
    • Qt Creator 4.10.0,
      Qt 5.13.0 MSVC2017 64bit
      Qt 5.13.1 MSVC2017 64bit
    • Windows

    Description

      I create QML video component from within C++

      QQmlComponent component(qmlEngine, QUrl::fromLocalFile("Video.qml"));
      QQmlContext* rootItemContext = QQmlEngine::contextForObject(rootWindow);
      QQuickItem *video= qobject_cast<QQuickItem*>(component.beginCreate(rootItemContext));
      if(video != nullptr) {
         QQmlEngine::setObjectOwnership(video, QQmlEngine::CppOwnership);
         video->setParentItem(rootWindow->contentItem());
         video->setParent(qmlEngine);
         // set video properties...
      }
      component.completeCreate();
      

      video.qml:

      import QtQuick 2.0
      import QtMultimedia 5.13
      
      Video {
          id: video
      
          source: "video.mp4"
          width: 800
          height: 400
          x: 0
          y: 0
          autoPlay: 1
      }
      

      I remove the video later:

      video->deleteLater();
      

      It works exactly as I expect in Qt 5.12.3. But in Qt 5.13 the application crashes. I can see in Event Viewer that the problem is with Qt5Muldimedia.dll

      [stacktrace|https://ddgobkiprc33d.cloudfront.net/fcefafe8-49e9-4065-8222-42bb65dba634.PNG]

      Attachments

        Issue Links

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

          Activity

            People

              valentyn.doroshchuk Valentyn Doroshchuk
              chris00 Krzysztof Toff
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes