process.nextTick如何抛出“RangeError:无效的数组长度”

时间:2015-06-30 17:43:38

标签: javascript node.js

这是我在Node.js应用程序中开始接收的错误的堆栈跟踪:

"RangeError: Invalid array length",
"    at onwrite (_stream_writable.js:265:15)",
"    at WritableState.onwrite (_stream_writable.js:96:5)",
"    at Socket._write (net.js:653:5)",
"    at doWrite (_stream_writable.js:225:10)",
"    at writeOrBuffer (_stream_writable.js:215:5)",
"    at Writable.write (_stream_writable.js:182:11)",
"    at Socket.write (net.js:615:40)",

(这是longjohn输出)

以下是违规行:https://github.com/joyent/node/blob/v0.10.31/lib/_stream_writable.js#L265

可能导致这种情况的原因是什么?是不是我的应用程序源无法直接导致它,因为调用process.nextTick会引发错误?

1 个答案:

答案 0 :(得分:1)

这是由我们使用longjohn引起的。在https://github.com/mattinsler/longjohn/issues/42提交的问题。修复了https://github.com/mattinsler/longjohn/pull/43