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

qml CaptureSession freezes Android app when unloaded

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P1: Critical
    • 6.4.3, 6.5.0
    • 6.4.2, 6.5.0 Beta2
    • None
    • Tested on Android 11 & 13 compiled with Clang arm64-v8a
      Also on Android emulator with Clang x86_64
    • Android
    • 2023wk04FOQtforAndroid

    Description

      This works fine on Windows Desktop, the freezes only occurs on Android.

      Here is the minimal code that provokes the freeze : 

      import QtQuick 6.4
      import QtQuick.Window 6.4
      import QtQuick.Controls 6.4
      import QtMultimedia 
      
      ApplicationWindow {    
      id: window    
      visible: true    
      width: Screen.desktopAvailableWidth    
      height: Screen.desktopAvailableHeight     
      Loader {        
      id: loader        
      anchors.fill: parent        
      active: activeBtn.checked        
      sourceComponent: Component {            
      Item {                
      id: item                 
      Camera {                    
      id: camera                    
      active: true                    
      focusMode: Camera.FocusModeAutoNear                
      }                 
      CaptureSession {                    
      camera: camera                    
      videoOutput: videoOutput                
      }                 
      VideoOutput {                 
         id: videoOutput                    
      anchors.fill: parent                     
      fillMode: VideoOutput.Stretch                
      }            
      }        
      }    
      }      
      Button {        
      id : activeBtn        
      text: "Active CAM"        
      checkable: true        
      anchors {            
      right: parent.right            
      bottom: parent.bottom        
      }    
      }
      } 

      When you release the button to unload the CaptureSession, the app freezes and crashes.

      Error message just before the freeze is :

      "D Camera  : app passed NULL surface"

      Attachments

        Issue Links

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

          Activity

            People

              bartlomiejmoskal Bartlomiej Moskal
              assyrion A Es
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes