-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Windows terminal randomly freezes with Neovim 0.6 in debian Bullseye when using MCTRL>-<SHIFT>C or <CTRL-SHIFT>V #11945
Comments
#10157 looks related, but that never got driven to a resolution. Any chance you're using any accessibility software of any sort? (Narrator, Magnifier, NVDA, JAWS, etc?) Since the Terminal isn't pegging a CPU, it's not an infinite loop, nor is it a stack overflow of some sort (that would eventually crash the Terminal). I'm suspecting the UI thread is waiting on the buffer lock, which some other thread forgot to unlock. ninja edit: leaving this open so that we can actually confirm that this is the accessibility fix from before the holidays, the one with the locking |
I am not using accessibility software nor is Autohotkey or something similar installed. Is there a log or dump file I can look at or force create? Annoying is that I just editted a lot and then just did not save ;). copy/paste and .... |
Update: I now also have it when 'yanking' a line in Neovim using |
I experience similar issues. I usually get about a dozen copy/paste actions per session. Then any subsequent attempts proceed to completely lock the UI of windows terminal. I can hear a bell notification when trying to interact, but I'm forced to end task + reopen. Luckily i'm using tmux, so it's not too bad. I'm happy to provide any additional information if it'll help :) |
I figure I should chime in here also. I think I'm only getting the occasional hang in neovim, and maybe only with I'm also using sticky keys. I had chimed in on #10157 but this feels like a more suitable place to discuss this problem, and it's finding a few folks with similar issues. Note also that I tried using the preview version of terminal, and that didn't resolve the problem. Worth noting that I'm on Ubuntu-20.04, not bullseye. |
im also facing issue, but different keys being stroke that freeze my current session in vim I have 2 neovim installed one on windows that is working fine, and one on wsl2 ubuntu my macos and artix linux works just fine even if there is g:vscode check in my config.. i can confirm this only happens in windows terminal since im also using alacritty and for some reason it always happen when my laptop is plugged in |
You know, that sounds exactly like the sort of thing that would cause this. Otherwise I don't have any idea how contents from the vim inside WSL would be able to set the Windows clipboard with |
I'm experiencing the same hang in the VS Code terminal, so I don't think this is a Terminal issue per se? Or does VS Code share code with this project? |
Still quite curious in finding a solution for this. I'm on bare-metal Ubuntu for now, and genuinely missing the WSL2 experience apart from this critical issue for me. Is there anything I can do to help test? |
I'm assuming that removing The Terminal and the VsCode terminal share code in the sense that they both share the ConPTY underpinnings, but the version VsCode uses would likely be months/years behind the version shipped with the Terminal, and would also rule out "the accessibility fix from before the holidays", whichever that might have been... |
Exactly. Sorry, I should've been more clear about that, but i did remove the win32yank link from the Ubuntu side and continued to experience sporadic freezes. |
Did remove win32yank too. I completely removed the windows version of Neovim. I had both the Windows as well as the Linux version of Neovim. Actually only using the Linux version. Removing of win32yank did not help. |
I have several freezes per hour in neovim or the commandline now using the release version. This issue is a productivity blocker! |
Honestly, I'm not even sure where to begin investigating next. Maybe share your whole settings.json file? If it repros outside of neovim, then great, we can remove that from the problem space. Does it happen regardless of shell in WSL? Like, if your default shell is Maybe there's something else that's got the clipboard locked for some reason, so the Terminal hangs attempting to open the clipboard. I might be able to whip up a powershell script that calls user32!GetOpenClipboardWindow to try and figure out who's got the clipboard locked |
I am using Debian with bash. I also use zsh. Same problem. |
I tried xclip, and of course that just worked for now but might random freeze in the future. Not sure if it is related. After trying xclip with pasting into notepad, dmesg showed this: |
The xsel equivalent of the xclip command is: echo "I am sorry but it does not freeze from xsel" | xsel -i -b For testing would it help to run this with while true with another while true loop pasting from PowerShell not running in not a Windows Terminal using a timestamps and sequence numbers? |
@nicenemo I'll say go ahead and run the command, it might reveal some pattern for these random freezing. As of now its difficult to reproduce it on our own. |
I may have found the root cause. The issue seems to be that xclip prematurely exits without waiting for paste events. This can be seen every time wsl is booted from shutdown, but it also happens when xclip is not working in the background for a long time. $ echo "hello" | xclip -verbose -selection c
Connected to X server.
Using selection: XA_CLIPBOARD
Using UTF8_STRING.
Waiting for selection requests, Control-C to quit
Waiting for selection request number 1 It exits right after printing this output. If I now try to paste on any windows application, it would freeze. Now terminate wsl with |
@tusharsnn I have uninstalled xclip and installed xsel and since then for the last few days I have not experienced this annoying problem. I didn't want to reply before I was sure. Thanks a lot! |
Not using accessibility features. Thank you for asking. |
This issue is windows terminal blocks forever for the paste content, and the reason is wsl unable to provide it. |
That's a nice, concise summary. We should guard reading the clipboard with a timeout so that we don't just hang if the application on the other end (producing the clipboard content) is acting up. |
I just updated my WSL and started experiencing this error on yank. I was also using Neovim, but v0.4.4 app image. Using xsel made neovim freeze on open, but updating my neovim app image to v0.8.2 made everything run fine. |
Huh, this is an interesting thread: neovim/neovim#19204 |
Started happening again today. Following the link you sent, I then found this and then added the following to my nvim config (along with the comment to use if has("wsl")
augroup Yank
autocmd!
autocmd TextYankPost * :call system('clip.exe ',@")
augroup END
endif Which still yields freezing |
Hi, just to add my viewpoint. I've noticed it's very easy to crash neovim running inside WSL if I |
All inside WSL, doing
Specifically for those using neovim, using the clipboard took about 500ms after this, so I had to set |
@nicenemo Did the above solve the issue for you? |
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. |
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. |
1 similar comment
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. |
Windows Terminal version
1.11.2921.0
Windows build number
10.0.22000.348
Other Software
https://github.com/nicenemo/wsl-debian-boxes
SauceCode PRO NF
fonthttps://github.com/nicenemo/win-dev-playbook
Only The Debian stuff. Calling chocolatey is not working perfect yet and therefore commented out.
Then I have a bash shell. However the same also happens without having distrod enabling systemd.
10 System Thinkpad T480 with 32Gb of memory.
(But also have this on a HP Prodesk 400 G4.) And can test it on a T450s with Windows 10.
fragments of my config
Use color scheme:
Linux config:
Steps to reproduce
Happens in Windows 10 as well as Windows 11. With Release and preview version.
Expected Behavior
Copy and Paste just works in a Debian terminal.
Actual Behavior
Terminal freezes sometimes when trying to copy or paste with Control Shift-C or Control-Shift V.
I experience it more often in NeoVIM with LunarVIM. Also had this in Windows 10 in the past.
The text was updated successfully, but these errors were encountered: