Git Product home page Git Product logo

Comments (7)

stakach avatar stakach commented on August 26, 2024

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.

from js-spark-md5.

satazor avatar satazor commented on August 26, 2024

@stakach I've updated the examples. Is this bug reported to opera?

from js-spark-md5.

stakach avatar stakach commented on August 26, 2024

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.

from js-spark-md5.

satazor avatar satazor commented on August 26, 2024

@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?

from js-spark-md5.

stakach avatar stakach commented on August 26, 2024

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:

[email protected].

Summary: fileReader.readAsArrayBuffer only works once

URL: #9

Steps to reproduce

  1. Instantiate an instance of FileReader
  2. Read a segment of a file using readAsArrayBuffer
  3. Read a different segment of a file using the same instance
  4. You'll notice the results are always the same.
  5. Instantiate a new instance of FileReader
  6. The different segment is now actually different

Expected result

Each call to readAsArrayBuffer should return different results if different parts of a file are being requested

Actual result

The result returned in the first call is always returned no matter the parameters supplied in subsequent calls

from js-spark-md5.

satazor avatar satazor commented on August 26, 2024

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!

from js-spark-md5.

satazor avatar satazor commented on August 26, 2024

@stakach Any news regarding the bug in Opera? Did they fixed it?

from js-spark-md5.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.