Error: Offset is out of bounds
green13 opened this issue · 4 comments
green13 commented
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 commented
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.
dcposch commented
@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 commented
fixed in 1.3.1
feross commented
@mafintosh Nice!