cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Barton (JIRA)" <>
Subject [jira] [Commented] (CB-4004) FileWriter fails to write large binary files
Date Thu, 27 Jun 2013 20:33:20 GMT


Chris Barton commented on CB-4004:

On the Nexus 7 (with memory permitting), I've successfully written 6mb (~12mb encoded string)
at one time using the patched base64 method. 

That said, maybe chunking the array buffer into smaller segments reducing the size of that
string might be better, but then you have the overhead of the bridge and write each time,
plus the encoding.

Nonetheless, the call stack using String.fromCharCode will always result in going too deep
even on a 130kb array buffer (tested using Chrome 27), hence the patch to soothe that exception.
> FileWriter fails to write large binary files
> --------------------------------------------
>                 Key: CB-4004
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>         Environment: Android (tested on Nexus 7, Android 4.2)
>            Reporter: Chris Barton
>            Assignee: Ian Clelland
>            Priority: Minor
> When attempting to write a file or blob (let's say a 5MB zip archive) to disk via FileWriter#write,
I receive a "RangeError, Maximum call stack size exceeded" when trying to turn the ArrayBuffer
into a Base64 string in #exec.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message