Quentin Gangler created CB-12852:
------------------------------------
Summary: [iOS] App crash after taking 30+ photos (possible memory
leak)
Key: CB-12852
URL: https://issues.apache.org/jira/browse/CB-12852
Project: Apache Cordova
Issue Type: Bug
Components: cordova-plugin-camera
Affects Versions: 2.4.1
Environment: Devices tested:
iPhone 6+ (A1522) - iOS 10.3.1
iPad 3rd Gen (A1430) - iOS 9.3.5
Apple iPad Air 2 (A1566) - iOS 10.3.1
Versions:
Xcode: 7.3.1 & 8.3.2
cordova: 6.5.0
cordova-ios: 4.1.1 & 4.4.0
cordova-camera-plugin: 2.1.0 & 2.4.1
Reporter: Quentin Gangler
To get that out of the way, I know there is already an issue for this bug
(CB-11784), but since the author found a workaround using his own plugin (and
the issue is on an older version of the plugin), I thought I would recreate it
here and give more details on my situation.
Taking photos is a really important part of our app and our clients usually
need to take 100+ photos in one session. Unfortunately, the app seems to crash
after 20-50 photos taken. Looking at the memory usage, I can clearly see the
usage of "other processes" grow like [~modohash] noticed before (even on the
latest version of the plugin).
My team doesn't really want to use his custom plugin because it's not an
official one and neither can we develop our own plugin since we are not
Objective-C developers.
h3. Recreate the issue
*0.* _(Optional)_ Modify [~modohash] [camera leak demo
app|https://github.com/modohash/cordova-camera-leak] to open the camera again
after a successful photo (cancel a photo to get out of the loop)
{code:javascript|title=index.js (onDeviceReady)|borderStyle=solid}
var button = document.getElementById('trigger-camera');
button.addEventListener('click', function () {
takePicture();
}, false);
function takePicture() {
navigator.camera.getPicture(function () {
navigator.camea.cleanup();
takePicture();
}, function () {
console.log('failure');
}
}
{code}
*1.* Build the app with the latest cordova-ios and camera-plugin
*2.* Click on *Trigger Camera*
*3.* Take photo (+ use photo)
*4.* Go to *2.* if *0.* is not implemented and wait for the crash (around 30
photos in on iPhone 6)
h3. Questions
Is there any workaround on this issue using the official plugin or do we *have*
to use another plugin custom to fix it?
Is this really an Apple related issue like [~modohash] suggests?
Thanks in advance for your anwsers
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]