cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher McCabe (JIRA)" <>
Subject [jira] [Commented] (CB-11784) Memory leak on iOS when opening and closing camera
Date Wed, 14 Sep 2016 09:42:20 GMT


Christopher McCabe commented on CB-11784:

A quick update on this, I ended up writing a custom camera plugin that mimics the pieces of
functionality in the cordova camera plugin that I'm using, but used AVFoundation rather than
the built in camera picker. I think this is still an issue that needs to be addressed, and
I think the fault probably lies with Apple on this one. Saying that, there's nothing to stop
you guys implementing an AVFoundation camera plugin which looks/feels like the native picker
which would solve the issue for users of the cordova camera plugin.

> Memory leak on iOS when opening and closing camera
> --------------------------------------------------
>                 Key: CB-11784
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: Plugin Camera
>    Affects Versions: 2.2.0
>         Environment: Cordova CLI version 6.3.0
> cordova-plugin-camera 2.2.0
> cordova-ios 4.2.0
> iOS 9.3.5
> iPad Mini 1
>            Reporter: Christopher McCabe
> When opening and closing the camera plugin without taking an image, the memory allocated
under 'Other Resources' grows without ever being cleaned up.
> Testing on an iPad mini 1, when I open and close the camera plugin without taking a picture
I can crash the app. This usually takes about 130-150 times opening and closing the camera
to cause a crash. The leak is present on newer devices but the app is harder to crash due
to the much larger device memory.
> Steps to reproduce:
> 1. create an app with the camera plugin
> 2. run the app on an iPad mini 1
> 3. open the camera plugin to take a picture, not from the gallery
> 4. click cancel
> 5. repeat 3 + 4 until the app crashes
> It appears that Jetsam kills the app for not being a good memory citizen.
> EDIT: I've tested this further and it appears on my iPad mini 3 as well although it's
harder to trigger. I've included a sample app that can be used to view the problem
> By clicking the 'trigger camera' button and then clicking cancel and repeating the process
you can see that while the app memory usage stays steady, the other processes accumulate memory.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message