Paste Hangs Terminal (Right Mouse Click) #13872

Closed
opened 2026-01-31 03:54:31 +00:00 by claunia · 12 comments
Owner

Originally created by @thomashcampbell on GitHub (May 23, 2021).

When copying and pasting I use the right mouse click. Highlight text, right mouse click. Then right mouse click to paste. If this is done too quickly it will hang the Windows Terminal to the point where it has to be killed

Originally created by @thomashcampbell on GitHub (May 23, 2021). When copying and pasting I use the right mouse click. Highlight text, right mouse click. Then right mouse click to paste. If this is done too quickly it will hang the Windows Terminal to the point where it has to be killed
claunia added the Needs-TriageNeeds-Tag-FixNeeds-Attention labels 2026-01-31 03:54:31 +00:00
Author
Owner

@skyline75489 commented on GitHub (May 24, 2021):

Are you trying to paste a string with lot of characters? What application are you using as the target of the paste operation? You'll need to give us more information for everyone to better understand the isseue.

@skyline75489 commented on GitHub (May 24, 2021): Are you trying to paste a string with lot of characters? What application are you using as the target of the paste operation? You'll need to give us more information for everyone to better understand the isseue.
Author
Owner

@thomashcampbell commented on GitHub (May 25, 2021):

I could be one character or 100+. I've noticed it for a few weeks.

The only thing I've been able to notice is the speed with which I do it. If I highlight text, and then right click (copy), right click (paste) then it'll freeze.

I just tried it and couldn't make it do it but the terminal was fresh. Possibly has to do with the amount of time the terminal is running.

I'll attach more if I can figure out more conditions.

@thomashcampbell commented on GitHub (May 25, 2021): I could be one character or 100+. I've noticed it for a few weeks. The only thing I've been able to notice is the speed with which I do it. If I highlight text, and then right click (copy), right click (paste) then it'll freeze. I just tried it and couldn't make it do it but the terminal was fresh. Possibly has to do with the amount of time the terminal is running. I'll attach more if I can figure out more conditions.
Author
Owner

@devlie commented on GitHub (May 27, 2021):

I'm reproing this frequently too.

  • No other app is involved. I'm just copying text from previous console output and trying to paste to the same console window.
  • It doesn't have to be a long text.

Would process dump at hanging state help? Watson bucket id e1924ce408e662d8acd60ed4a1a40008 (2077864584485797896)

@devlie commented on GitHub (May 27, 2021): I'm reproing this frequently too. - No other app is involved. I'm just copying text from previous console output and trying to paste to the same console window. - It doesn't have to be a long text. Would process dump at hanging state help? Watson bucket id e1924ce408e662d8acd60ed4a1a40008 (2077864584485797896)
Author
Owner

@DHowett commented on GitHub (May 27, 2021):

Thanks for the watson ID!

@carlos-zamora this is interesting--

During TermnalPage's PasteFromClipboard handler, it's starting to interact with the Windows.DataTransfer APIs to get the clipboard content. During that handling, UIA is servicing a callback to get the selection information.

I thought that this would be easy, like "paste has a lock, and UIA wants the lock" but it doesn't seem to have the lock.

Let me look at the other threads quick ...

@DHowett commented on GitHub (May 27, 2021): Thanks for the watson ID! @carlos-zamora this is interesting-- During TermnalPage's PasteFromClipboard handler, it's starting to interact with the Windows.DataTransfer APIs to get the clipboard content. _During_ that handling, UIA is servicing a callback to get the selection information. I thought that this would be easy, like "paste has a lock, and UIA wants the lock" but it _doesn't_ seem to have the lock. Let me look at the other threads quick ...
Author
Owner

@DHowett commented on GitHub (May 27, 2021):

I can't find a single other thread that would be holding the lock. That's not great.

@DHowett commented on GitHub (May 27, 2021): I can't find a single other thread that would be holding the lock. That's not great.
Author
Owner

@ghost commented on GitHub (May 31, 2021):

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.

@ghost commented on GitHub (May 31, 2021): 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**.
Author
Owner

@devlie commented on GitHub (Jun 1, 2021):

Nudging Bot.

@devlie commented on GitHub (Jun 1, 2021): Nudging Bot.
Author
Owner

@ghost commented on GitHub (Jun 5, 2021):

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.

@ghost commented on GitHub (Jun 5, 2021): 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**.
Author
Owner

@davclark commented on GitHub (Dec 8, 2021):

I'm still experiencing this issue on Windows 11

@davclark commented on GitHub (Dec 8, 2021): I'm still experiencing this issue on Windows 11
Author
Owner

@zadjii-msft commented on GitHub (Dec 8, 2021):

@davclark which version of the Terminal?

IIRC we made some changes recently to how we take the lock for accessibility reasons, which might be fixed in 1.12. Not sure thought - it could be something else entirely.

@zadjii-msft commented on GitHub (Dec 8, 2021): @davclark which version of the Terminal? IIRC we made some changes recently to how we take the lock for accessibility reasons, which might be fixed in 1.12. Not sure thought - it could be something else entirely.
Author
Owner

@thomashcampbell commented on GitHub (Dec 9, 2021):

I haven't had this happen in a long time. Considered it fixed. I'm on Windows 11 too.

@thomashcampbell commented on GitHub (Dec 9, 2021): I haven't had this happen in a long time. Considered it fixed. I'm on Windows 11 too.
Author
Owner

@davclark commented on GitHub (Dec 9, 2021):

I'm on 1.11.2921.0, running Ubuntu-20.04. I guess I'll try the preview and see if my problems go away?

Note that there may be some interaction with neovim (with set clipboard=unnamedplus, and a symbolic link to the win32yank.exe binary in /usr/local/bin). But once the problem starts occurring, it also happens with paste to a command prompt.

Since you mention accessibility, I also use sticky keys (which is a lifesaver for my RSI).

@davclark commented on GitHub (Dec 9, 2021): I'm on 1.11.2921.0, running Ubuntu-20.04. I guess I'll try the preview and see if my problems go away? Note that there may be some interaction with neovim (with `set clipboard=unnamedplus`, and a symbolic link to the `win32yank.exe` binary in `/usr/local/bin`). But once the problem starts occurring, it also happens with paste to a command prompt. Since you mention accessibility, I also use sticky keys (which is a lifesaver for my RSI).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#13872