Skip to content

Sometimes REPL cannot display the result #12085

Description

@betimer
  • 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

Activity

  1. added
    replIssues and PRs related to the REPL subsystem.
    on Mar 28, 2017
  2. bnoordhuis commented on Mar 28, 2017

    @bnoordhuis
    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),
  3. added
    windowsIssues and PRs related to the Windows platform.
    on Mar 28, 2017
  4. seishun commented on Mar 28, 2017

    @seishun
    Contributor

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

  5. seishun commented on Mar 28, 2017

    @seishun
    Contributor

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

  6. MylesBorins commented on Mar 28, 2017

    @MylesBorins
    Contributor

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

  7. betimer commented on Mar 28, 2017

    @betimer
    Author

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

  8. Trott commented on Jul 30, 2017

    @Trott
    Member

    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?

  9. bnoordhuis commented on Oct 26, 2017

    @bnoordhuis
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    replIssues and PRs related to the REPL subsystem.windowsIssues and PRs related to the Windows platform.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions