Skip to content
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

Error: Offset is out of bounds (like #773) #850

Closed
aksenofo opened this issue Jul 2, 2016 · 4 comments
Closed

Error: Offset is out of bounds (like #773) #850

aksenofo opened this issue Jul 2, 2016 · 4 comments
Labels

Comments

@aksenofo
Copy link

@aksenofo aksenofo commented Jul 2, 2016

  • WebTorrent version:???
  • Node.js version: v4.4.5
  • Browser name/version (if using WebTorrent in the browser): console

the case #773 still exist

After I aborted downloading and restart my demo application I have got an error:
Error: Offset is out of bounds
at Error (native)
at Object.fs.read (fs.js:582:11)
at onread (/home/aksenofo/node_modules/webtorrent/node_modules/fs-chunk-store/node_modules/random-access-file/index.js:84:8)
at FSReqWrap.wrapper as oncomplete

I attached tar file with my code and partly downloaded files. I believe, the error for sure linked with files.
Error_Offset_is_out_of_bounds.tar.gz

@aksenofo

This comment has been minimized.

Copy link
Author

@aksenofo aksenofo commented Jul 2, 2016

in the line index.js:84:
fs.write(self.fd, buf, buf.length - offset, length, offset, onwrite)
where buf.length - offset is a huge negative value

@aksenofo

This comment has been minimized.

Copy link
Author

@aksenofo aksenofo commented Jul 2, 2016

this issue even can be reproduced with follow script and /tmp folder

var WebTorrent = require('webtorrent')
var fs = require('fs')
var client = new WebTorrent({tracker:true})
var torrentId = 'magnet:?xt=urn:btih:bd165a3cf662ddbe358039b018d210c3cf0bd608'
client.add(torrentId, function (torrent) {})


Here is the tmp folder( the bug is 100% reproduced with it )
concatenate xaa and xab

http://wikisend.com/download/552204/xaa
http://wikisend.com/download/579098/xab

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Jul 27, 2016

@aksenofo Your links expired before I had the chance to download them. Can you re-upload so that I can attempt to reproduce this bug?

@stale

This comment has been minimized.

Copy link

@stale stale bot commented May 3, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label May 3, 2018
@stale stale bot closed this May 10, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Aug 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.