cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shazron Abdullah (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-8332) Memory leak in loading files from disk with file plugin
Date Tue, 27 Jan 2015 18:52:36 GMT

    [ https://issues.apache.org/jira/browse/CB-8332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14293955#comment-14293955
] 

Shazron Abdullah commented on CB-8332:
--------------------------------------

I profiled your sample app using the Activity Monitor and Allocations templates, and added
code to refresh the iframe once, controlled by a button press. When doing so, I could see
if each iteration significantly increased real memory without releasing it (by marking generations),
and it doesn't seem to do so. 

I'm thinking perhaps it's a virtual memory problem, and running your iframe reload tests does
not crash the app for me, even after a significant amount of time. I'm thinking that this
might be because I'm using a 128GB iOS device, and your tests might have been on devices with
less storage space. In any case, that's the progress I've had on this so far, will let you
know what I find out regarding the VM thing.

> Memory leak in loading files from disk with file plugin
> -------------------------------------------------------
>
>                 Key: CB-8332
>                 URL: https://issues.apache.org/jira/browse/CB-8332
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin File
>    Affects Versions: 3.5.0
>         Environment: iOS
>            Reporter: Patrick Richards
>            Assignee: Shazron Abdullah
>
> When loading files from disk, the file plugin appears to leak memory. Using instruments
it can be narrowed down to -[CDVFilesystemURLProtocol startLoading], which is in CDVFile.m
on line 150.
> (https://github.com/apache/cordova-plugin-file/blob/967ca4d848d6bea0bad5a0d334b8d9f1ea2c4680/src/ios/CDVFile.m#L150)
> To reproduce:
> • have the iOS app download a file using plugin-file-transfer
> • store that file to persistent storage
> • load that file from disk and the app will leak
> We have a very simple proof of concept that downloads a large photo, then constantly
refreshes an iFrame which triggers loading the photo from persistent storage. The memory usage
of the app climbs over time (with various dips at memory warnings), then crashes due to memory
pressure. We can upload this sample project/provide a link if needed – there doesn’t appear
to be a way to attach files.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message