Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.6.0
-
Android < 6.x
-
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 |
160272,2 | Android: Fix crash in AndroidCamere::open() | 5.6 | qt/qtmultimedia | Status: MERGED | +2 | 0 |