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

When using Android arm64-v8a, the app freezes after launching the camera and navigating to another screen.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.5.5
    • Multimedia
    • - Qt 6.5.5
      - Clang arm64-v8a
      - Android 9 ~ 14
    • Android

    Description

      Steps to Reproduce

      1. Launch the camera.
      2. Navigate to another screen (pop() or push() with StackView).

       

      Hypothesis

      • It is assumed that the camera component cannot terminate properly when navigating to another screen.

       

      Request

      • Ensure that the camera component terminates properly.
      • On Android armeabi-v7a, it works correctly with just active: true, so please align the behavior accordingly.

       

      Snippet

      Rectangle { 
          id: cameraArea 
          anchors.horizontalCenter: parent.horizontalCenter 
          width: appWidth >= tabletWidth ? appWidth * 0.45 : useNameArea.width  // Use the width of the sibling
          height: width 
          color: "transparent" 
          MediaDevices { 
              id: mediaDevices 
          } 
          CaptureSession { 
              camera: Camera {
                  id: camera 
                  cameraDevice: mediaDevices.defaultVideoInput 
                  whiteBalanceMode: Camera.WhiteBalanceFlash 
                  exposureMode: "ExposureBarcode" 
                  focusMode: Camera.FocusModeAuto 
              } 
              imageCapture: ImageCapture { 
                  id: imageCapture 
                  onPreviewChanged: { 
                      decoder.decodeImageQML(imageCapture.preview);  // Decode from QR code 
                  } 
              } 
              videoOutput: videoOutput 
          } 
          VideoOutput { 
              id: videoOutput 
              anchors.fill: parent 
              fillMode: VideoOutput.PreserveAspectCrop 
          } 
      }

       
      Workaround

      • The screen does not freeze when stopping the camera when the depth of the StackView is changed.

       

      Connections { 
          target: stack        
          function onDepthChanged () { 
              if (camera.active) { 
                  camera.stop() 
              } 
          } 
      }

       

      Supplement

      • When active: true is set, the following errors and warnings are displayed

       

      E CameraCaptureSession: Session 0: Failed to create capture session; configuration failed
      W QtCamera2: Failed to create a capture session:android.hardware.camera2.CameraAccessException: CAMERA_DISCONNECTED (2): checkPidStatus:2212: The camera device has been disconnected
      • When zoomFactor is set, the following warning occurs:

       

      W QtCamera2: Cannot set zoom on invalid camera 

       

       

       
       

      Attachments

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

        Activity

          People

            npskalerud Nils Petter Skålerud
            dfree Atsushi Nakanishi
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes