Math.log is defined in v8, not node, so I'd say build v8 from source on that machine and see if it repros. https://chromium.googlesource.com/v8/v8.git/+/master/src/math.js On Thu, Sep 3, 2015 at 11:09 AM JF Robichaud <[email protected]> wrote:
> I've compiled my own version with vcbuild debug nosign x64 using the > binary from that I get no errors and get the expected results. > > I initially installed Node using Chocolatey so I thought it could be > related to my strange result, I've uninstalled that one and re-installed > Node using the official installer but the issue remain. For now I can use > the debug version I've compiled, but not sure exactly what is different in > that one. If anyone is interested in seeing the binary or have ideas as to > what could cause this I can provide the binary if you wish. > > Cheers! > > -- > JF > > > > On Wednesday, 2 September 2015 18:29:27 UTC-4, JF Robichaud wrote: >> >> 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/7e1054a9-b9d6-473f-b141-ce5ab4b6c73b%40googlegroups.com > <https://groups.google.com/d/msgid/nodejs/7e1054a9-b9d6-473f-b141-ce5ab4b6c73b%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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/CAHfnhfoFF%3DmKB98pqPxo6ybYC%2BD%2BosG%3DzB92jOBkn4Httj-niw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
