Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.4.3, 6.5.0
-
None
-
Tested on Samsung Galaxy Tab S5e with arm64-v8a & armeabi-v7a.
-
-
7d53ccf26 (dev)
-
2023wk30FOQtforAndroid, 2023wk32FOQtforAndroid, 2023wk36FOQtforAndroid
Description
By using in qml a CaptureSession, every time we change the Camera active property, whether by start/stop methods or by changing directly the property, the memory usage is not totally freed. This causes a crash after a certain number of iterations.
It seems to come from the VideoOutput. When no VideoOutput is bound to the CaptureSession, the memory remains stable.
Here is a qml code to test it out:
import QtQuick import QtQuick.Controls import QtQuick.Window import QtMultimedia Window { width: 640 height: 480 visible: true property int timerEntry: 0 CaptureSession { id: captureSessionId camera: Camera { id: cameraId onErrorOccurred: function(error, message) { console.log("Error occurred", error, message); } } videoOutput: videoOutputId // Commenting this line stabilise the memory usage } VideoOutput { id: videoOutputId anchors.fill: parent Button { id: startButtonId anchors.bottom: parent.bottom anchors.horizontalCenter: parent.horizontalCenter width: 50 height: width onPressed: { cameraId.start() timerId.start() } } } Timer { id: timerId repeat: true interval: 2000 onTriggered: { timerEntry += 1 console.log("Timer Entry", timerEntry) if(cameraId.active) { console.log("Stopping camera") cameraId.stop() } else { console.log("Starting camera") cameraId.start() } console.log("Timer Exit") } } }
Attachments
Issue Links
- covers
-
QTBUG-115275 VideoOutput - Memory leak with Android Camera source
-
- Closed
-