Skip to content

Error: Offset is out of bounds #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
green13 opened this issue Apr 22, 2016 · 4 comments
Closed

Error: Offset is out of bounds #4

green13 opened this issue Apr 22, 2016 · 4 comments

Comments

@green13
Copy link

green13 commented Apr 22, 2016

Hello.
I use webtorrent in node, os windows 8.1 and got error:

fs.js:620 Uncaught Error: Offset is out of bounds
    fs.read @ fs.js:620
    onread  @ C:\Projects\launcher\src\main_app\node_modules\random-access-file\index.js:84
    wrapper @ fs.js:614

I can wrap fs.read in try/catch and it solves the problem:

try {
  fs.read(self.fd, buf, buf.length - offset, length, offset, onread)
}
catch (e) {
  onread(e)
}

How better to solve this problem?

@feross
Copy link
Collaborator

feross commented Apr 22, 2016

This is probably an issue with WebTorrent. Can you open an issue at https://github.com/feross/webtorrent with more info about how you're using WebTorrent? What methods are you calling to read the data?

Thanks.

@feross feross closed this as completed Apr 22, 2016
@dcposch
Copy link

dcposch commented Sep 2, 2016

@feross this is showing up in WebTorrent Desktop telemetry, too.

Stacktrace:

Processes: webtorrent, platforms: linux win32, versions: pre-0.12 0.13.1 
Error: Offset is out of bounds
    at Error (native)
    at Object.fs.read (fs.js:687:11)
    at onread (.../node_modules/random-access-file/index.js:86:8)
    at FSReqWrap.wrapper [as oncomplete] (fs.js:681:17)

@mafintosh
Copy link
Collaborator

fixed in 1.3.1

@feross
Copy link
Collaborator

feross commented Sep 4, 2016

@mafintosh Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants