bytebuffer.js icon indicating copy to clipboard operation
bytebuffer.js copied to clipboard

RangeError: Invalid typed array length

Open harter123 opened this issue 10 years ago • 1 comments

RangeError: Illegal offset: 0 <= 2892 (+12) <= 2892 at RangeError (native) at module.exports.ByteBufferPrototype.readUTF8String (d:\interfaceSystem\interfacesystem\node_modules\protobufjs\node_modules\bytebuffer\dist\bytebuffer-node.js:2022:27) at module.exports.ByteBufferPrototype.readVString (d:\interfaceSystem\interfacesystem\node_modules\protobufjs\node_modules\bytebuffer\dist\bytebuffer-node.js:2114:24)

why it throws this error?

harter123 avatar Mar 29 '16 02:03 harter123

It tried to read 12 bytes (here: the contents of a string) starting from offset 2892, but there aren't enough bytes left to read. In such a case, the buffer usually has become truncated somewhere on its way.

dcodeIO avatar Mar 29 '16 03:03 dcodeIO