[ 
https://issues.apache.org/jira/browse/CB-6870?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-6870:
---------------------------------
    Labels: WP8  (was: )

> Windows8 - trying to write large binary files throws a stack space exceeded 
> exception on 
> -----------------------------------------------------------------------------------------
>
>                 Key: CB-6870
>                 URL: https://issues.apache.org/jira/browse/CB-6870
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin File
>    Affects Versions: 3.5.0
>            Reporter: Cristian Badila
>              Labels: WP8
>
> When trying to write to disk large files using binary mode (tested with files 
> with sizes greater than 100KB) an exception would occur on Windows 8/8.1 - 
> stack space exceeded. This is due to a change introduced in commit 
> #ef636d93cba502a0881bd22abe744d0b9540424c - can be seen easier here: 
> https://github.com/apache/cordova-plugin-file/commit/ef636d93cba502a0881bd22abe744d0b9540424c.
> To be more exact the line where the exception would be raised is this one:
> bq. data = Array.apply(null, new Uint8Array(data));
> Replacing the above line with the following code fixes the issue:
> {quote}
>         var uint8ArrayView = new Uint8Array(data);
>         var plainArray = new Array();
>         for (var byteIndex = 0; byteIndex < uint8ArrayView.length; 
> byteIndex++) \{
>             plainArray.push(uint8ArrayView\[byteIndex\]);
>         \}
>         data = plainArray;
> {quote}



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

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

Reply via email to