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

QML crashes on iOS when using StackView and VideoOutput

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P1: Critical
    • None
    • 6.5.0
    • Multimedia
    • None
    • ios 16.2 on iphone 11
    • iOS/tvOS/watchOS

    Description

      I'm trying to switch to another qml page using StackView but it always crashes on iOS when I use VideoOutput

      error I get:

      program received signal -111, thread:41744;00:a0e5358002000000;01:0000000000000000;02:a0e5a7680d000000;03:00ad348002000000;

      If i remove VideoOutput from my code it switches to the next qml page without issue.

      I'm guessing that iOS doesn't want videooutput processing in the background of the app

      main.qml
       
      {{import QtQuickimport QtQuick.Controls

      ApplicationWindow

      { id: mainWindow visible: true StackView \{ id: stack width: parent.width height: parent.height }

      Component.onCompleted:

      { stack.replace("page2.qml") }

      }}}

      page2.qml
       
      {{import QtQuickimport QtQuick.Controlsimport QtMultimedia

      Item {

      RoundButton {
      id: capture
      text: "CRASHES WHEN I CLICK THIS BUTTON - go to page 3" z: 2 onClicked:

      { stack.replace("page3.qml") }

      }

      Rectangle

      { id: bgRect color: "white" anchors.fill: videoOutput }

      Camera

      { id:camera active: true }

      CaptureSession {
      camera: camera
      videoOutput: videoOutput
      }

      VideoOutput
      {
      id: videoOutput
      width: Screen.width
      height: Screen.height
      }

      }}}

      page3.qml
       
      {{import QtQuickimport QtQuick.Controls

      Item {

      Rectangle

      { anchors.fill: parent }

      Button {
      id: clicky2
      text: "Go back to page2" anchors.centerIn: parent
      onClicked:

      { stack.replace("page2.qml") }

      }

      }}}

      It doesn't crash if I remove VideoOutput

      I have tried to set camera.active: false but this also doesn't work

      Nothing in the manual about being able to disable VideoOutput

      Attachments

        Issue Links

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

          Activity

            People

              laknoll Lars Knoll
              zeroalpha Zero Alpha
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes