Closed satazor closed 11 years ago
Solved the issue - opera requires you to instantiate a new FileReader for every call to readAsArrayBuffer otherwise it returns the same results as the first call for every subsequent call.
So really the issue is with the tests / a bug in opera.
I'll request a pull a bit later in the week.
@stakach I've updated the examples. Is this bug reported to opera?
Yeah, sent a report. Took forever to find, I often forget to test things against Opera. Crashed every time I tried to inspect any ArrayBuffer.
In fact, line 93 e.target.result.byteLength;
of file_reader.html is how I confirmed the bug. (Could be removed)
The only inspect-able difference between Chrome and Opera was that the _length variable was a different size in the final state.
@stakach My only concern with the current example code is that a FileReader
is being instantiated in each iteration for every browser. Is there a way for us to test if the bug exists and provide different loadNext()
functions (one that instantiates, and other that does not)? Maybe by analyzing the e.target.result.byteLength
?
If not, we will need to wait until we see the Opera release that fixes the issue and provide the slower loadNext()
only for Opera's older than that release.
Can you please provide me the link of the report?
Not sure if it is the most detectable behaviour. Very surprising. They don't really give you a link:
Dear Opera User,
This is to acknowledge that we have received your bug report, with the ID: DSK-379396. You may wish to keep this ID for future reference.
All bug reports are read and handled by our staff. However, please note that you will not receive a personal reply to the bug report, unless we need more information to investigate the bug.
We are not able to respond to questions and queries through the bug tracking system. To get help with Opera, please visit http://www.opera.com/support/.
You can use this e-mail address (or reply to this e-mail) to update your report with more information, such as screenshots, crash logs, code examples, and so on:
DSK-379396@bugs.opera.com.
Summary: fileReader.readAsArrayBuffer only works once
URL: https://github.com/satazor/SparkMD5/pull/9
Each call to readAsArrayBuffer should return different results if different parts of a file are being requested
The result returned in the first call is always returned no matter the parameters supplied in subsequent calls
Really? Nice one opera..
I might update the example code to provide the slower loadNext() only for Opera.. Going to create a separate issue for this.
Thanks a lot!
@stakach Any news regarding the bug in Opera? Did they fixed it?
Investigate this issue.