Hi, I originally posted this issue on stackoverflow here <http://stackoverflow.com/questions/32360962/node-js-issue-with-math-log-exiting-immediately> After following up through comments over there I was able to discover that my %errorlevel% is set to a negative value. The only reference to this I have found in reference to node was because of node segfaulting so I decided to post here to perhaps get more traction.
I was doing some work with Gulp and pushed my tasks to our Windows 2008 R2 server where they strangely stopped working. The tasks are just exiting at a certain point and return me to prompt. Everything is working fine on my Windows 7 dev machine and on one Windows 2008 R2 server, so far the issue is only occuring on our development Windows 2008 R2 server Through isolation, I was able to narrow it down to the module Pretty bytes <https://www.npmjs.com/package/pretty-bytes> which uses Math.log in its calculation. I tried to use Math.log directly from node and I get the same result on that one server. It looks like Math.log is broken, however other Math functions work just fine. Reproduction steps below: Details: 2 different Windows 2008 R2 running in a VM (if that's important) node v0.12.7 //nodemathtest.js console.log(process.versions); console.log("before"); console.log(Math.floor(2.2)); console.log(Math.log(10)); console.log("after"); Running node mathlogtest.js On one my machine and on one Windows 2008 R2 server I get the expected result: C:\>node mathlogtest.js { http_parser: '2.3', node: '0.12.7', v8: '3.28.71.19', uv: '1.6.1', zlib: '1.2.8', modules: '14', openssl: '1.0.1p' } before 2 2.302585092994046 after On our development Windows server where the Gulp tasks are exiting prematurely I get this: C:\>node mathlogtest.js { http_parser: '2.3', node: '0.12.7', v8: '3.28.71.19', uv: '1.6.1', zlib: '1.2.8', modules: '14', openssl: '1.0.1p' } before 2 C:\> I can see that Math.log is causing Node to exit immediately back to prompt which is also what's happening from Gulp, I get kicked back to my prompt and the task is interrupted. After this running echo %ERRORLEVEL% returns -1073741795 on the faulty server, 0 where it's successful. I'm not exactly sure where to look as I'm fairly new to Node. From my understanding Node is using Chrome's V8 JS engine and `process.version` is returning exactly the same on each server. I've tried to install .NET 4.5.1 and various C++ redistributable package to no avail. -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/03eb7430-e194-49bd-8112-88d4a21a79f4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
