FileSystem API fails on big file (> 500MB)

689 views
Skip to first unread message

Christophe Balestra

unread,
Aug 18, 2014, 6:54:00 PM8/18/14
to chromiu...@chromium.org
I'm trying to save big files from chrome but I'm getting trouble with the writer from createWriter. After writing more than 500MB the writer gives the same error indefinitely and can't resume. The error I'm getting is 'An operation that depends on state cached in an interface object was made but the state had changed since it was read from disk.' and it's happening 100% of the time. I'm writing the file in 4MB chunks sequentially with a seek before each write. This issue happens with persistent, temporary or fileSystem.

Is this a known limitation? And if yes is there a work around?

Taiju Tsuiki

unread,
Aug 18, 2014, 9:30:04 PM8/18/14
to Christophe Balestra, chromiu...@chromium.org
Sounds like it's due to the blob size limitation.
If you create 500MB on-memory blobs in total at once, following blob creation will fail, and causes INVALID_STATE_ERR.


2014-08-19 7:53 GMT+09:00 Christophe Balestra <christoph...@gmail.com>:
I'm trying to save big files from chrome but I'm getting trouble with the writer from createWriter. After writing more than 500MB the writer gives the same error indefinitely and can't resume. The error I'm getting is 'An operation that depends on state cached in an interface object was made but the state had changed since it was read from disk.' and it's happening 100% of the time. I'm writing the file in 4MB chunks sequentially with a seek before each write. This issue happens with persistent, temporary or fileSystem.

Is this a known limitation? And if yes is there a work around?

--
You received this message because you are subscribed to the Google Groups "Chromium HTML5" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-html...@chromium.org.
To post to this group, send email to chromiu...@chromium.org.
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-html5/.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.

Christophe Balestra

unread,
Aug 18, 2014, 9:38:37 PM8/18/14
to chromiu...@chromium.org, christoph...@gmail.com, tz...@chromium.org
I'm already calling delete on the blobs. Does it take time to re-use the memory? 

Taiju Tsuiki

unread,
Aug 18, 2014, 10:06:20 PM8/18/14
to Christophe Balestra, chromiu...@chromium.org
It'll be freed as soon as GC collect it. I think a leaked reference prevents a blob from getting GCed.
Can you take a look to chrome://blob-internals to confirm? It contains all living blobs.

Christophe Balestra

unread,
Aug 19, 2014, 2:13:04 PM8/19/14
to chromiu...@chromium.org, christoph...@gmail.com, tz...@chromium.org
It looks like that is the problem but I'm still having a hard time freeing up the memory on time. When you pass a blob to FileWriter.write(), does it remove the reference to the passed blob after on writeend?  

Taiju Tsuiki

unread,
Aug 20, 2014, 12:17:08 AM8/20/14
to Christophe Balestra, chromiu...@chromium.org
FileWriter doesn't/shouldn't keep the reference to Blob. But references to a object tend to be held by local variables and closures. :/
Reply all
Reply to author
Forward
0 new messages