Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-560] Downloading large files with Titanium.Network.createHTTPClient crashes

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionDuplicate
Resolution Date2011-04-15T02:31:57.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsandroid, files, httpclient, ios, large
ReporterBurggraf
AssigneeDon Thorp
Created2011-04-15T02:31:56.000+0000
Updated2017-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.)

Comments

  1. Stephen Tramer 2011-04-15

    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).

  2. Lee Morris 2017-03-09

    Closing ticket as duplicate.

JSON Source