GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — The max length of console.log output is 8275 · Issue #9546 · nodejs/node

The max length of console.log output is 8275 #9546

New issue
Copy link
New issue
Copy link
Closed
Closed
The max length of console.log output is 8275#9546
Copy link
Labels
confirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.libuvIssues and PRs related to the libuv dependency or the uv binding.Issues and PRs related to the libuv dependency or the uv binding.windowsIssues and PRs related to the Windows platform.Issues and PRs related to the Windows platform.

Description

@arthuroy
arthuroy
opened on Nov 10, 2016
Issue body actions
  • Version: 7.1.0
  • Platform: Windows 10 1607 (Redstone) 14393.447 x64
  • Subsystem: console

Using the following codes, the second console.log will be failed without any error message and the program exits; but it worked on 7.0.0.

"use strict";

// length = 8275, Array(8276) is max.
var testString = Array(8277).join('a');
console.log('length = ' + testString.length);
console.log(testString);

Reduce the array size to 8276, the program works as expected.

Activity

  1. vsemozhetbyt commented on Nov 11, 2016

    @vsemozhetbyt
    vsemozhetbyt
    on Nov 11, 2016
    Contributor
    More actions

    Can't reproduce on Windows 7 x64 with cmd or Powershell.

  2. mscdex
    added
    windowsIssues and PRs related to the Windows platform.Issues and PRs related to the Windows platform.
    v7.x
    on Nov 11, 2016
  3. arthuroy commented on Nov 11, 2016

    @arthuroy
    arthuroy
    on Nov 11, 2016
    Author
    More actions
    var testString = Array(8276).join('a');
    console.log('length = ' + testString.length);
    console.log(testString);
    console.log('finished');

    Use the codes above, the second console.log works but the third fails without any error message and the program exits.

    Change to Array(8192).join('a'), the third works.

  4. vsemozhetbyt commented on Nov 11, 2016

    @vsemozhetbyt
    vsemozhetbyt
    on Nov 11, 2016
    Contributor
    More actions

    Can't reproduce as well.

  5. arthuroy commented on Nov 11, 2016

    @arthuroy
    arthuroy
    on Nov 11, 2016
    Author
    More actions

    Start Node.js command prompt, and execute the following command:

    D:\>node -p "process.stdout.write(util.format.apply(null, [Array(8278).join('a')]))"

    Nothing output, but if you change the array size to Array(8277), it works.

  6. vsemozhetbyt commented on Nov 11, 2016

    @vsemozhetbyt
    vsemozhetbyt
    on Nov 11, 2016
    Contributor
    More actions

    For me, it does print all the string even with 8278.

  7. sp90 commented on Nov 11, 2016

    @sp90
    sp90
    on Nov 11, 2016
    More actions

    Irrelevant:
    Just a shot in the Dark Can it be 32bit limit if your running on a 32bit system

  8. bricss commented on Nov 11, 2016

    @bricss
    bricss
    on Nov 11, 2016
    Contributor
    More actions

    Can confirm the same blank output on my machine.

    Windows 10 RS1 x64 + Node.js 7.1.0

  9. ChALkeR commented on Nov 11, 2016

    @ChALkeR
    ChALkeR
    on Nov 11, 2016
    Member
    More actions

    Does anything change if you wait for some time before exiting? E.g. do a setTimeout(()=>{},5000) afterwards. Could be related to #6456.

  10. Fishrock123
    added
    confirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.
    on Nov 11, 2016
  11. Fishrock123 commented on Nov 11, 2016

    @Fishrock123
    Fishrock123
    on Nov 11, 2016
    Contributor
    More actions

    Repro'd.

    As the OP said this appears in 7.1.0. It is probably tangentially related to #6456 but something else must have changed here.

    I bet it was the libuv 1.10.0 upgrade...

    Unfortunately I am unable to bisect on Windows so... @saghul, @cjihrig, @bnoordhuis

    Edit: Adding a timeout does not help, probably not related to #6456.

  12. killroy42 commented on Nov 11, 2016

    @killroy42
    killroy42
    on Nov 11, 2016
    More actions

    Does it work with the patch from issue#9542?

  13. NijiharaTsubasa commented on Nov 12, 2016

    @NijiharaTsubasa
    NijiharaTsubasa
    on Nov 12, 2016
    More actions

    I'm having the same problem on both Windows 10 build 14965 and Windows Server 2016. My app suddenly exited without displaying any error message, at where a very long string should be console.log'd, after upgraded node to 7.1.0.

    @Fishrock123 @killroy42 I took some time to do the bisect and tested out the patch, libuv 1.10.0 upgrade IS the cause of the problem and the patch FIXES it.

    Reacted by Sven Neumann and Sp90
  14. Fishrock123
    added
    duplicateIssues and PRs that are duplicates of other issues or PRs.Issues and PRs that are duplicates of other issues or PRs.
    libuvIssues and PRs related to the libuv dependency or the uv binding.Issues and PRs related to the libuv dependency or the uv binding.
    and removed
    duplicateIssues and PRs that are duplicates of other issues or PRs.Issues and PRs that are duplicates of other issues or PRs.
    on Nov 13, 2016
  15. cjihrig commented on Nov 15, 2016

    @cjihrig
    cjihrig
    on Nov 15, 2016
    Contributor
    More actions

    Closing. #9542 closed via libuv/libuv@d0c2641. Please reopen if that is not correct.

  16. cjihrig
    closed this as completedon Nov 15, 2016
  17. cjihrig
    added a commit that references this issue on Nov 17, 2016

    deps: upgrade libuv to 1.10.1

    1fca11e
  18. Fishrock123
    added a commit that references this issue on Nov 22, 2016

    deps: upgrade libuv to 1.10.1

    786631c
  19. MylesBorins
    added 2 commits that reference this issue on May 16, 2017

    deps: upgrade libuv to 1.10.1

    fcf4751

    deps: upgrade libuv to 1.10.1

    c59370a
  20. andrew749
    added a commit that references this issue on Jul 19, 2017

    deps: upgrade libuv to 1.10.1

    d862c0c
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

    confirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.libuvIssues and PRs related to the libuv dependency or the uv binding.Issues and PRs related to the libuv dependency or the uv binding.windowsIssues and PRs related to the Windows platform.Issues 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

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.