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

QVideoWidget in QDialog does not show / crashes (macOS) when shown twice

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • 6.5.5, 6.6.2, 6.7.0 Beta2, 6.8.0 FF
    • 6.5.0
    • Multimedia
    • None
    • macOS Ventura 13.3.1 (a), Apple M1 Max (64GB RAM), Python 3.10.11 (Homebrew)
    • macOS
    • 948b93a84 (dev), b2eb82a42 (6.7), 6e7dd65e0 (6.6), 0fecc9e95 (dev), b24ac60ae (tqtc/lts-6.5), 2acdb75ac (6.7), 425d41dc2 (6.6), 06b2baeba (tqtc/lts-6.5)

    Description

      Steps to reproduce

      • Download test.mp4 and build qtbug113498.zip
      • Run qtbug113498 passing path to test.mp4 on cmd line
      • Press Show
      • Close the dialog
      • Press Show again
      • Expected: Video is playing
      • Actual: Blank window/crash

      In my app, I have a tutorial window based on QDialog which has short, looping video clips demonstrating app features. For video playback, I'm using QMediaPlayer connected to a QVideoWidget. When I first display the tutorial window, everything works correctly, but if I close the tutorial window and try to reopen it, the program crashes with a SIGSEGV. Some notes about the error:

      • Whenever the video is first shown, the following text is printed to the console:
      failed to get textures for frame true
      • If I attach a debugger (PyCharm), it does not halt on the line which causes the error.
      • Occasionally (but not always) I will get a stack trace alongside the segfault (see attached). This indicates an exception inside the private QVideoWindow class that QVideoWidget uses.

      I have attached an example Python script which reproduces the error that I'm experiencing. The included video is just for testing. Changing the video does not change the error.

      I have marked this issue as being in PySide, but I also tested against PyQt6 just to make sure. It shows the same crashing problem. Thinking this might indicate a library issue, I ported my minimal example to C++ (also attached). Curiously, this example does not crash. Instead, the dialog successfully reopens, but is blank until I resize it or move it to another monitor, at which point the video shows up. So I don't know what to make of this.

      Attachments

        1. CMakeLists.txt
          0.5 kB
          Seth Parker
        2. pyside2322.py
          1 kB
          Friedemann Kleint
        3. qtbug113498.zip
          2 kB
          Friedemann Kleint
        4. stack-trace.txt
          5 kB
          Seth Parker
        5. test.mp4
          489 kB
          Seth Parker
        6. TestVideoPopUp.cpp
          0.5 kB
          Seth Parker
        7. VideoPopUp.hpp
          0.9 kB
          Seth Parker
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            dorisverria Doris Verria
            csparker247 Seth Parker
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: