Doesn't work on node v0.9.x/v0.10.x
Closed this issue · 3 comments
TooTallNate commented
It most likely has something to do with a V8 API change...
Note that it works with v0.8.21, but both v0.9.9 and v0.9.10 have strange, different results:
☮ ~/cloudup-local (add/unlink-page) ∴ n use 0.8.20 t
timers.js:103
if (!process.listeners('uncaughtException').length) throw e;
^
Error: uncaught
at Object.c (/Users/nrajlich/cloudup-local/t.js:15:9)
at Timer.list.ontimeout [as ontimeout] (timers.js:101:19)
---------------------------------------------
at Object.b (/Users/nrajlich/cloudup-local/t.js:11:3)
at Timer.list.ontimeout [as ontimeout] (timers.js:101:19)
---------------------------------------------
at Object.a (/Users/nrajlich/cloudup-local/t.js:7:3)
at Timer.list.ontimeout [as ontimeout] (timers.js:101:19)
---------------------------------------------
at Object.<anonymous> (/Users/nrajlich/cloudup-local/t.js:4:1)
at Module.Module._compile [as _compile] (module.js:449:26)
at Object.Module._extensions..js [as .js] (module.js:467:10)
at Module.Module.load [as load] (module.js:356:32)
at Function.Module._load [as _load] (module.js:312:12)
at Module.runMain (module.js:492:10)
at process.startup.processNextTick.process._tickCallback [as _tickCallback] (node.js:244:9)
☮ ~/cloudup-local (add/unlink-page) ∴ n use 0.9.10 t
Array.filter (native)
☮ ~/cloudup-local (add/unlink-page) ∴ n use 0.9.9 t
CallSiteGetFileName (native),Array.filter (native)
mattinsler commented
Do you have a snippet of code that was running when this happened?
TooTallNate commented
Oh whoops, duh.
require('longjohn');
function a(){
b();
}
function b(){
throw new Error('this is uncaught!');
}
setTimeout(a, 0);
mattinsler commented
Thanks!
I fixed this on master, but a variant of this is now causing a "Maximum call stack size exceeded". This is happening for multiple async calls within each other. Looks like there have been some minor changes to the way Errors and stack traces work. I'll keep you in the loop.