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

[Android] QML Camera crashes if the camera is already in use

    XMLWordPrintable

Details

    • b3af8f65fcaef66504f5640ccaa2972e17af1af0

    Description

      If the Android camera object is already in use, QML Camera crashes when it tries to connect to the Android camera. The warning from Android varies based on Android version (either open or connect fails), and for example 4.4.2 gives:
      W/CameraBase(14202): An error occurred while connecting to camera: 0

      Android camera should be released immediately if it is not used, but unfortunately there are applications, which don't do it. QML Camera should not crash in those cases.

      The attached example can be used to test this with Android < 6.0 where the native camera application doesn't release camera when the active application is switched while recording a video.

      Steps to reproduce:
      1. Open the example
      2. Switch to native camera application and start recording.
      3. Switch back to example application (don't stop recording)

      Reproduced with Samsung Galaxy S3 (Android 4.1.1), Galaxy Tab Pro (Android 4.4.1), and Nexus7 (Android 5.1.1). But not with Nexus7 (Android 6.0.1).

      Attachments

        For Gerrit Dashboard: QTBUG-53536
        # Subject Branch Project Status CR V

        Activity

          People

            stromme Christian
            qtcomsupport Qt Support
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes