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
Run the above code with node 12+, it will hang forever.
node 10 or below is fine though.
However, when run with a debugger (vscode), it will crash with the following error.
Waiting for the debugger to disconnect...
internal/util/inspect.js:1249
throw err;
^
SyntaxError: Invalid regular expression: /(.{2})/: Stack overflow
at String.replace (<anonymous>)
at Buffer.inspect (buffer.js:814:41)
at formatValue (internal/util/inspect.js:693:31)
at formatProperty (internal/util/inspect.js:1558:11)
at formatRaw (internal/util/inspect.js:933:9)
at formatValue (internal/util/inspect.js:721:10)
at inspect (internal/util/inspect.js:264:10)
at Buffer.inspect (buffer.js:831:14)
at formatValue (internal/util/inspect.js:693:31)
at formatProperty (internal/util/inspect.js:1558:11)
Process exited with code 1
It could be fixed by commentting out a line in the gennerated js:
js_node_buffer__$Buffer_Helper.bytesOfBuffer=function(b){varo=Object.create(haxe_io_Bytes.prototype);o.length=b.byteLength;// o.b = b; <-- commentting this line will fix the hangb.bufferValue=b;b.hxBytes=o;b.bytes=b;returno;};
The text was updated successfully, but these errors were encountered:
I wonder why hxToBytes has to generate so many recursive references?
I think this comes from haxe.io.Bytes, but I'm not sure why these references are there either, maybe this could be cleaned up. Probably it has something to do with re-using the underlying bytes somehow.
Run the above code with node 12+, it will hang forever.
node 10 or below is fine though.
However, when run with a debugger (vscode), it will crash with the following error.
It could be fixed by commentting out a line in the gennerated js:
The text was updated successfully, but these errors were encountered: