You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Uncaught RangeError: Attempt to access memory outside buffer bounds
at boundsError (ext:deno_node/internal/buffer.mjs:2383:11)
at readUInt24LE (ext:deno_node/internal/buffer.mjs:1872:5)
at Uint8Array.readUIntLE (ext:deno_node/internal/buffer.mjs:1016:12)
at Tap.packLongBytes (file:///home/cyan/.cache/deno/npm/registry.npmjs.org/avsc/5.7.7/lib/utils.js:892:9)
at AbstractLongType._write (file:///home/cyan/.cache/deno/npm/registry.npmjs.org/avsc/5.7.7/lib/types.js:2754:9)
at UnwrappedUnionType._write (file:///home/cyan/.cache/deno/npm/registry.npmjs.org/avsc/5.7.7/lib/types.js:1329:23)
at RecordType.writeObject [as _write] (eval at RecordType._createWriter (file:///home/cyan/.cache/deno/npm/registry.npmjs.org/avsc/5.7.7/lib/types.js:2343:10), <anonymous>:8:6)
at RecordType.Type.toBuffer (file:///home/cyan/.cache/deno/npm/registry.npmjs.org/avsc/5.7.7/lib/types.js:658:8)
at <anonymous>:1:35
The text was updated successfully, but these errors were encountered:
Hi @CyanChanges. avsc currently relies on node's buffers ignoring out-of-bound writes. This is used to optimize buffer size computation when the original buffer is too small. I haven't used deno, but from the stack trace it looks like it behaves differently?
You should be able to work around this by preemptively increasing the size of the underlying buffer:
avro.Type.__reset(1<<20);
Alternatively you can use type.encode and pass in an adequately sized buffer explicitly.
Defintions here: https://github.com/CyanChanges/pastebin_but_github/blob/163d015645f6ef71a2ebd43abd18d91e2d6e9663/avsc_1.ts
trying to serialize with
toBuffer()
that throws following error:
The text was updated successfully, but these errors were encountered: