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

Freeze when pasting large text into vim (WSL) #16921

Open
danielniccoli opened this issue Mar 22, 2024 · 6 comments
Open

Freeze when pasting large text into vim (WSL) #16921

danielniccoli opened this issue Mar 22, 2024 · 6 comments
Labels
Area-Input Related to input processing (key presses, mouse, etc.) Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal.
Milestone

Comments

@danielniccoli
Copy link

Windows Terminal version

1.19.10573.0

Windows build number

10.0.22631.0

Other Software

vim 8.2.2121 (inside WSL Ubuntu 22.04.4 LTS)

Steps to reproduce

  1. Find a large enough text block. You can generate one with 1,000,000 characters at https://www.lipsum.com
  2. Open vim and switch into insert mode.
  3. Paste the sample text into vim using CTRL-v or SHIFT-INS

Expected Behavior

It should paste the text and the terminal / wsl / vim shall remain reactive.

Actual Behavior

The terminal / wsl / vim freezes midst the paste operation and cannot be recovered. The tab must be closed and a new one opened, to continue work in the terminal / wsl / vim.

@danielniccoli danielniccoli added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Mar 22, 2024
Copy link

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@lhecker
Copy link
Member

lhecker commented Mar 25, 2024

Out of 10 tests I did manage to reproduce a freeze once. How often does this happen for you? Is this always reproducible? I did notice that if I SIGTERM vim my original tab still works. So I think it should either be a bug in vim, or we're failing to send some input to it and it's waiting indefinitely on that (for instance the end of the bracketed paste?).

@danielniccoli
Copy link
Author

danielniccoli commented Mar 26, 2024

I can reproduce it reliably, always. SIGTERM ist ctrl-c, no? The terminal does not respond to ctrl-c or ctrl-z. It also freezes at random positions for the same text. I don't know what you mean by bracket.

@lhecker
Copy link
Member

lhecker commented Mar 26, 2024

I can reproduce it reliably, always. SIGTERM ist ctrl-c, no?

No that's SIGINT. What I did is open a new WSL tab in parallel and run killall vim.

I don't know what you mean by bracket.

Bracketed paste is a technique with which the terminal can tell an application that the input comes from the clipboard (or similar) and not keyboard. For instance, in vim you may want automatic indentation when typing, but when pasting you may want it to be preserved as is. You can read more about it here: https://en.wikipedia.org/wiki/Bracketed-paste

@danielniccoli
Copy link
Author

I can run killall vim on a different WSL tab, which kills the process, but it still stays unresponsive. You can't see that in the video, but before and after I run the killall vim command, I'm pressing esc, ctrl-c, ctrl-z, and some other keys in a-z and nothing happens.

After the killall vim you can see that some more text get's pasted into the terminal. I can't reproduce that always. It just happened to happen when I recorded it.

Recording.2024-03-26.232407.mp4

@zadjii-msft zadjii-msft added Area-Input Related to input processing (key presses, mouse, etc.) Product-Terminal The new Windows Terminal. labels Mar 27, 2024
@zadjii-msft zadjii-msft added this to the Backlog milestone Mar 27, 2024
@zadjii-msft
Copy link
Member

Fascinating. That's an interesting repro for sure. Thanks for filing!

@zadjii-msft zadjii-msft removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Input Related to input processing (key presses, mouse, etc.) Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

3 participants