Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sometimes REPL cannot display the result #12085

Closed
betimer opened this issue Mar 28, 2017 · 9 comments
Closed

Sometimes REPL cannot display the result #12085

betimer opened this issue Mar 28, 2017 · 9 comments
Labels
repl Issues and PRs related to the REPL subsystem. windows Issues and PRs related to the Windows platform.

Comments

@betimer
Copy link

betimer commented Mar 28, 2017

  • Version: 6.10.1
  • Platform: Windows 10 x64
  • Subsystem: happens both cmd.exe and powershell

In node REPL mode, when I execute a function, sometimes the result cannot be displayed. Refer as the below screenshot:
image

@ghost
Copy link

ghost commented Mar 28, 2017

I also met for this problem since 6.10.0
Memory leaks may be the main infuential factor of this problem,I guess.
And it just happen in Windows 10 platform,I don`t why?

@hiroppy hiroppy added the repl Issues and PRs related to the REPL subsystem. label Mar 28, 2017
@bnoordhuis
Copy link
Member

It sounds like GetVersionEx() is failing but I can't fathom why. Can you try building from source with the patch below applied?

diff --git a/src/node_os.cc b/src/node_os.cc
index d7be909..e31578b 100644
--- a/src/node_os.cc
+++ b/src/node_os.cc
@@ -125,8 +125,13 @@ static void GetOSRelease(const FunctionCallbackInfo<Value>& args) {
 
   // Don't complain that GetVersionEx is deprecated; there is no alternative.
   #pragma warning(suppress : 4996)
-  if (GetVersionExW(&info) == 0)
+  if (GetVersionExW(&info) == 0) {
+    auto isolate = args.GetIsolate();
+    auto exception =
+        WinapiErrnoException(isolate, GetLastError(), "GetVersionEx");
+    isolate->ThrowException(exception);
     return;
+  }
 
   snprintf(release,
            sizeof(release),

@bnoordhuis bnoordhuis added the windows Issues and PRs related to the Windows platform. label Mar 28, 2017
@seishun
Copy link
Contributor

seishun commented Mar 28, 2017

Seems to be a duplicate of #7837. Please try with the latest node.js version.

@ghost
Copy link

ghost commented Mar 28, 2017

It is the latest version of 6.x.x already.

@seishun
Copy link
Contributor

seishun commented Mar 28, 2017

It seems #8645 got backported to 6.x, but the libuv upgrade (#9267 and #9647) wasn't. cc @nodejs/lts

@MylesBorins
Copy link
Contributor

I've reverted the offending commit in 1978911, this should be fixed in the next v6.x LTS release

@betimer
Copy link
Author

betimer commented Mar 28, 2017

@seishun my node version is 6.10.1 which is latest version of LTS already

MylesBorins added a commit to MylesBorins/node that referenced this issue Mar 29, 2017
Full original message:

  Revert "repl: disable Ctrl+C support on win32 for now"

This reverts commit 1d400ea.

Fixes: nodejs#12085
Refs: nodejs#8645

PR-URL: nodejs#12123
Reviewed-By: Anna Henningsen <[email protected]>
MylesBorins added a commit that referenced this issue Mar 29, 2017
Full original message:

  Revert "repl: disable Ctrl+C support on win32 for now"

The original fix was a stop gap until a libuv update landed.
As the libuv update has not yet landed on v6.x the revert should
not have landed. This commit reverts 1d400ea reapplying the
stopgap fix until we update libuv.

Fixes: #12085
Refs: #8645

PR-URL: #12123
Reviewed-By: Anna Henningsen <[email protected]>
MylesBorins added a commit that referenced this issue Mar 29, 2017
Full original message:

  Revert "repl: disable Ctrl+C support on win32 for now"

The original fix was a stop gap until a libuv update landed.
As the libuv update has not yet landed on v6.x the revert should
not have landed. This commit reverts 1d400ea reapplying the
stopgap fix until we update libuv.

Fixes: #12085
Refs: #8645

PR-URL: #12123
Reviewed-By: Anna Henningsen <[email protected]>
@Trott
Copy link
Member

Trott commented Jul 30, 2017

I can't tell if this was fixed in 6.10.2 or if it's expected to be fixed in 6.11.2. Can someone confirm the bug on Windows in 6.10.2 or later?

@bnoordhuis
Copy link
Member

No follow-up and no one complained so I'll go ahead and assume this is fixed. If not, please leave a comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
repl Issues and PRs related to the REPL subsystem. windows Issues and PRs related to the Windows platform.
Projects
None yet
Development

No branches or pull requests

6 participants