-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
Terminal process terminates during build task when output is too large #51163
Comments
@joemm1 can you please provide me with a GitHub repository I can clone that demos this. |
It happens in an empty workspace if I eg just create a task to echo incrementing digits:
If I run that multiple times it gives up at varying points but always before 6000. This is with "terminal.integrated.scrollback": 50000. If I reduce my scrollback size to 1000 it completes fine. Whereas if I run that command directly from the integrated terminal, it completes fine whatever the scrollback size. Thanks, |
(Note this is on macOS) |
@Tyriar can you please have a look. I don't do anything special in this case. Simply launching a terminal with the command passed with |
I had a look, it's an interesting bug which I don't fully understand. The process should run completely independently of the UI and it's the UI which appears to be affecting the process. It repro's far less with large scrollbacks when the buffer is full (which means no HTML layouts need to happen to adjust the scroll bar - this slows down the UI significantly). My current guess is it's a race condition related to microsoft/node-pty#85? |
The issue has become more serious recently. I use tasks which cat (or sed) files to terminal, and that gets parsed to problems. Now that output is truncated, effectively for all such tasks, as result not all problems get parsed to Problems window. Issue name is not quite accurate as is:
It is possibly my issue is different, but my original issue #51844 was considered a duplicate and locked so I am reporting here for now. |
Seems to be fixed? |
We closed this issue because we are unable to reproduce the problem with the steps you describe. Chances are we've already fixed your problem in a recent version of VS Code. If not, please ask us to reopen the issue and provide us with more detail. Our issue reporting guidelines might help you with that. Happy Coding! |
I still have this problem in vscode 1.39.2. If my task executes a program that prints many numbers to the console (e.g. numbers from 0 to 4999), then the output in the built in console will sometimes (not always!) stop too soon, sometimes after 4000, sometimes even before 2000. If I execute the same program in my normal console on my system, instead of in the integrated vscode terminal, then this problem never occurs, so it's not a bug in my program. I tested this under Debian 11. |
If I hook up a build task to build my project then it causes the build terminal to exit with "The terminal process terminated with exit code: 1". This seems to be because the output is too long.
If I change build flags to reduce the size of the output then the problem goes away. Similarly, if I reduce the size of "terminal.integrated.scrollback" it seems to happen less.
(Of course both of these workarounds are not ideal).
The exact same build command run in a terminal window inside Visual Studio Code has no such problems.
Thanks in advance. Let me know if there's anything I can provide to help.
Joe
The text was updated successfully, but these errors were encountered: