[TIMOB-560] Downloading large files with Titanium.Network.createHTTPClient crashes
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Medium |
| Status | Closed |
| Resolution | Duplicate |
| Resolution Date | 2011-04-15T02:31:57.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Android |
| Labels | android, files, httpclient, ios, large |
| Reporter | Burggraf |
| Assignee | Don Thorp |
| Created | 2011-04-15T02:31:56.000+0000 |
| Updated | 2017-03-09T21:09:01.000+0000 |
Description
When files are downloaded via Titanium.Network.createHTTPClient(), data is stored in memory before the file is written to "disk". If a file is too large (over a few megs) this causes the app to crash.
See example in Kitchen Sink source code file: xhr_filedownload.js
(To duplicate, simply replace the download filename here with the name of a large, remote file. Start downloading, and wait a few minutes. An out-of-memory error will show up in the trace.)
This issue has been resolved by allowing file chunking on Android and direct download-to-file on iOS. So, a dupe of #2281 (iOS) and #1381 (Android).
Closing ticket as duplicate.