-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
REPL sometimes prints no output on Windows #7837
Comments
I’ve been trying some stuff in a VM, can either of you confirm that commenting out both |
@addaleax I can confirm that. Deleting those lines fixed the problem. I wonder if libuv/libuv#866 makes any difference here, this might be some race condition due to the succession of enter keypresses. (Not related to speed though, this happens both when typing fast and slow.) |
@joaocgreis Sorry, my access to practical Windows testing (and knowledge of how the Windows console works) is quite limited… that surely seems like something that could be related to me. Do you think you (or @nodejs/platform-windows in general?) could look at what’s causing this? If not, I think disabling the Ctrl+C feature for Windows might be a good idea for now, that’s certainly less important than working REPL output. |
I'm seeing REPL weirdness on Windows 10 (64-bit), could this be related?
Note: explicitly calling console.log() rather than simply evaluating expressions results in normal-looking output. |
Seems like a timing issue related to the escape sequences readline.js is using to manipulate cursor position. One some occasions I see missing output on a line below the active prompt. This is a tough bug, as doesn't reproduce while single-stepping under the debugger even though I have a generally reproducible test case. It also looks like libuv/libuv#889 implements a change under Windows 10 which uses the new Windows-native escape sequence support, rather than emulating VT-100 in libuv! |
OK, I finally caught this in the debugger by placing a breakpoint on the call to self.displayPrompt(); in function finish(). Somehow, the output from the command is split into two lines, and displaying the prompt is overwriting the missing output. The strange thing is that the two lines seem to be out-of-order: e.g the cursor is on the first opening bracket on bottom line below just before the prompt is displayed:
I don't fully understand how the output line is getting split like this, but I'm guessing it has something to do with _setRawMode() and the timing of echoing the newline. Hope that helps @addaleax, is there a way for me to comment this out without rebuilding Node? |
@BurtHarris Thanks for taking a look at this! What you’re saying makes sense, but I don’t know where this line splitting could possibly come from, either.
I wish there were… I mean, I guess you can try overriding |
I've been looking into this, but so far haven't been able to make much progress. Windows 7 does not reproduce this bug, so this might be caused by the same changes in Windows console that motivated libuv/libuv#866 , but I haven't been able to pinpoint the problem yet. @addaleax since this is not likely to be an easy fix, can you disable the Ctrl-C feature for Windows for now? |
Disable Windows support for interrupting REPL commands using Ctrl+C by default, because the switches from console raw mode and back have been interfering with printing the results of evaluated expressions. This is a temporary measure, since the underlying problem is very likely not related to this specific feature. Ref: nodejs#7837
Disable Windows support for interrupting REPL commands using Ctrl+C by default, because the switches from console raw mode and back have been interfering with printing the results of evaluated expressions. This is a temporary measure, since the underlying problem is very likely not related to this specific feature. Ref: #7837 PR-URL: #7977 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Nikolai Vavilov <vvnicholas@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: João Reis <reis@janeasystems.com>
Disable Windows support for interrupting REPL commands using Ctrl+C by default, because the switches from console raw mode and back have been interfering with printing the results of evaluated expressions. This is a temporary measure, since the underlying problem is very likely not related to this specific feature. Ref: #7837 PR-URL: #7977 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Nikolai Vavilov <vvnicholas@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: João Reis <reis@janeasystems.com>
This reverts commit f59b888 now that the libuv update containing the proper fix has landed in 63243bc. Ref: libuv/libuv#1054 Ref: nodejs#7837
This reverts commit f59b888 now that the libuv update containing the proper fix has landed in 63243bc. Ref: libuv/libuv#1054 Ref: #7837 PR-URL: #8645 Reviewed-By: Nikolai Vavilov <vvnicholas@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This reverts commit f59b888 now that the libuv update containing the proper fix has landed in 63243bc. Ref: libuv/libuv#1054 Ref: nodejs#7837 PR-URL: nodejs#8645 Reviewed-By: Nikolai Vavilov <vvnicholas@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This reverts commit f59b888 now that the libuv update containing the proper fix has landed in 63243bc. Ref: libuv/libuv#1054 Ref: #7837 PR-URL: #8645 Reviewed-By: Nikolai Vavilov <vvnicholas@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This reverts commit f59b888 now that the libuv update containing the proper fix has landed in 63243bc. Ref: libuv/libuv#1054 Ref: #7837 PR-URL: #8645 Reviewed-By: Nikolai Vavilov <vvnicholas@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This reverts commit f59b888 now that the libuv update containing the proper fix has landed in 63243bc. Ref: libuv/libuv#1054 Ref: nodejs#7837 PR-URL: nodejs#8645 Reviewed-By: Nikolai Vavilov <vvnicholas@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This reverts commit f59b888 now that the libuv update containing the proper fix has landed in 63243bc. Ref: libuv/libuv#1054 Ref: nodejs#7837 PR-URL: nodejs#8645 Reviewed-By: Nikolai Vavilov <vvnicholas@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This reverts commit f59b888 now that the libuv update containing the proper fix has landed in 63243bc. Ref: libuv/libuv#1054 Ref: #7837 PR-URL: #8645 Reviewed-By: Nikolai Vavilov <vvnicholas@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This reverts commit f59b888 now that the libuv update containing the proper fix has landed in 63243bc. Ref: libuv/libuv#1054 Ref: #7837 PR-URL: #8645 Reviewed-By: Nikolai Vavilov <vvnicholas@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This reverts commit f59b888 now that the libuv update containing the proper fix has landed in 63243bc. Ref: libuv/libuv#1054 Ref: #7837 PR-URL: #8645 Reviewed-By: Nikolai Vavilov <vvnicholas@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This reverts commit f59b888 now that the libuv update containing the proper fix has landed in 63243bc. Ref: libuv/libuv#1054 Ref: nodejs/node#7837 PR-URL: nodejs/node#8645 Reviewed-By: Nikolai Vavilov <vvnicholas@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
REPL randomly prints no output when evaluating an expression.
The text was updated successfully, but these errors were encountered: