Unexplained crash while copying with the terminal #2808

Closed
opened 2026-01-30 23:05:39 +00:00 by claunia · 27 comments
Owner

Originally created by @zhangyuyaoyy on GitHub (Jul 17, 2019).

You can't copy and paste with windows terminal. Normally you can paste and copy with the right mouse button, but at some point it will cause terminal to crash.

Originally created by @zhangyuyaoyy on GitHub (Jul 17, 2019). You can't copy and paste with windows terminal. Normally you can paste and copy with the right mouse button, but at some point it will cause terminal to crash.
claunia added the Issue-BugNeeds-Author-FeedbackArea-InteractionProduct-Terminal labels 2026-01-30 23:05:39 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Jul 17, 2019):

There were a couple bugfixes in this area recently. What build of Windows Terminal are you running?

What steps are you taking to get the terminal to crash while selecting?

@carlos-zamora may be interested.

@zadjii-msft commented on GitHub (Jul 17, 2019): There were a couple bugfixes in this area recently. What build of Windows Terminal are you running? What steps are you taking to get the terminal to crash while selecting? @carlos-zamora may be interested.
Author
Owner

@QuantumZain commented on GitHub (Jul 17, 2019):

I also have the same issue unable to copy from cmd nor paste to it, but instead of crashing, it outputs:
^V
for Ctrl + V.
where as for Ctrl + C (when selecting text) it performs the same behavior when text isn't selected

@QuantumZain commented on GitHub (Jul 17, 2019): I also have the same issue unable to copy from cmd nor paste to it, but instead of crashing, it outputs: `^V` for Ctrl + V. where as for Ctrl + C (when selecting text) it performs the same behavior when text isn't selected
Author
Owner

@rv32ima commented on GitHub (Jul 18, 2019):

@QuantumZain I believe that's done intentionally see:
9b92986b49/src/host/input.cpp (L112-L129)

A simple check if IsSelectionActive() would fix this, but in most cases you would prefer NOT to break interrupting (since Ctrl+C is effectively sending a SIGINT). Try rebinding to Ctrl+Shift+C/Ctrl+Shift+V instead.

@rv32ima commented on GitHub (Jul 18, 2019): @QuantumZain I believe that's done intentionally see: https://github.com/microsoft/terminal/blob/9b92986b49bed8cc41fde4d6ef080921c41e6d9e/src/host/input.cpp#L112-L129 A simple check if IsSelectionActive() would fix this, but in most cases you would prefer NOT to break interrupting (since Ctrl+C is effectively sending a SIGINT). Try rebinding to Ctrl+Shift+C/Ctrl+Shift+V instead.
Author
Owner

@breakid commented on GitHub (Jul 21, 2019):

Copy/paste works in the version currently on the Windows Store (as of 2019-07-21; 0.2.1831.0), you just don't use CTRL+C/V. Highlight the text you want to copy, then right click; it will automatically copy. Then right-click again to paste in the Terminal or CTRL+V in your other application of choice.

I assume this was done intentionally as PuTTY and various other Linux terminals use the same mechanic.

@breakid commented on GitHub (Jul 21, 2019): Copy/paste works in the version currently on the Windows Store (as of 2019-07-21; 0.2.1831.0), you just don't use CTRL+C/V. Highlight the text you want to copy, then right click; it will automatically copy. Then right-click again to paste in the Terminal or CTRL+V in your other application of choice. I assume this was done intentionally as PuTTY and various other Linux terminals use the same mechanic.
Author
Owner

@ghost commented on GitHub (Jul 25, 2019):

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 (Jul 25, 2019): 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

@LongLiveCHIEF commented on GitHub (Jul 27, 2019):

I'm experiencing this issue as well, running 0.2.1831.0. I'll try to update to latest build and see if it resolves issue.

@LongLiveCHIEF commented on GitHub (Jul 27, 2019): I'm experiencing this issue as well, running `0.2.1831.0`. I'll try to update to latest build and see if it resolves issue.
Author
Owner

@LongLiveCHIEF commented on GitHub (Jul 27, 2019):

n/m, 1831 is the latest build.

@LongLiveCHIEF commented on GitHub (Jul 27, 2019): n/m, 1831 _is_ the latest build.
Author
Owner

@LongLiveCHIEF commented on GitHub (Jul 27, 2019):

specific action I'm trying to do is copy from system clipboard into vim that's open in WSL2 Ubuntu.

@LongLiveCHIEF commented on GitHub (Jul 27, 2019): specific action I'm trying to do is copy from system clipboard into vim that's open in WSL2 Ubuntu.
Author
Owner

@DHowett-MSFT commented on GitHub (Jul 29, 2019):

You can do that with right click. Is it crashing? Do you have any events about "Windows Error Reporting" in your event log? If so, please share: they contain vital information that we can use to find your crash.

@DHowett-MSFT commented on GitHub (Jul 29, 2019): You can do that with _right click._ Is it crashing? Do you have any events about "Windows Error Reporting" in your event log? If so, please share: they contain vital information that we can use to find your crash.
Author
Owner

@mdx0111 commented on GitHub (Jul 30, 2019):

Would CTRL+Shift+C and CTRL+Shift+V be good candidates to be added to perform Copy and Paste please?

@mdx0111 commented on GitHub (Jul 30, 2019): Would CTRL+Shift+C and CTRL+Shift+V be good candidates to be added to perform Copy and Paste please?
Author
Owner

@zadjii-msft commented on GitHub (Jul 30, 2019):

They already are the keybindings, as of #1093.

I'd really like to see a stack or some info to help us track down the source of the crash reported in OP. Without more info,there's nothing more we can really do with this issue.

@zadjii-msft commented on GitHub (Jul 30, 2019): They already are the keybindings, as of #1093. I'd really like to see a stack or some info to help us track down the source of the crash reported in OP. Without more info,there's nothing more we can really do with this issue.
Author
Owner

@mdx0111 commented on GitHub (Jul 31, 2019):

Thanks for your reply.

I'm on the latest release but the CTRL+Shift+C and CTRL+Shift+V don't work for me at all to do copy/paste. Having said that, I tried copy/paste via mouse clicks a lot and never encountered any issues.

@mdx0111 commented on GitHub (Jul 31, 2019): Thanks for your reply. I'm on the latest release but the CTRL+Shift+C and CTRL+Shift+V don't work for me at all to do copy/paste. Having said that, I tried copy/paste via mouse clicks a lot and never encountered any issues.
Author
Owner

@miniksa commented on GitHub (Aug 1, 2019):

The only part here we're actively still looking for is information on the crash that @zyyBjtu experienced.

The issues with the keybindings are getting resolved in other PRs and in the upcoming 0.3 release.

We want to know more about this crash.

@miniksa commented on GitHub (Aug 1, 2019): The only part here we're actively still looking for is information on the crash that @zyyBjtu experienced. The issues with the keybindings are getting resolved in other PRs and in the upcoming 0.3 release. We want to know more about this crash.
Author
Owner

@darkmacheken commented on GitHub (Aug 2, 2019):

Just to know, currently, is there any keybinding to copy and paste using the terminal? Will it be possible to change the keybindings to copy and paste text in the profiles.json?
Also, I've randomly been experiencing some crashes using the windows clipboard using tmux and vim, where clip.exe crashes with error code 0xc0000142. As it is random I didn't find any probable cause, so, haven't open an issue yet.

@darkmacheken commented on GitHub (Aug 2, 2019): Just to know, currently, is there any keybinding to copy and paste using the terminal? Will it be possible to change the keybindings to copy and paste text in the profiles.json? Also, I've randomly been experiencing some crashes using the windows clipboard using tmux and vim, where clip.exe crashes with error code 0xc0000142. As it is random I didn't find any probable cause, so, haven't open an issue yet.
Author
Owner

@mikeymop commented on GitHub (Aug 3, 2019):

Ctrl+C is problematic because ^c is an interrupt signal.

However I also observed that selection is copy, and right click is paste. I believe here having the native windows right click context menu would be nice.

@mikeymop commented on GitHub (Aug 3, 2019): `Ctrl+C` is problematic because `^c` is an [interrupt](http://homepages.math.uic.edu/~hanson/UNIX/UnixDictionary.html#UNIX-CTRL) signal. However I also observed that selection is copy, and right click is paste. I believe here having the native windows right click context menu would be nice.
Author
Owner

@duydao commented on GitHub (Aug 4, 2019):

@pedrodaniel10 Ctrl+Chift+C / Ctrl+Chift+V works for me

@duydao commented on GitHub (Aug 4, 2019): @pedrodaniel10 Ctrl+Chift+C / Ctrl+Chift+V works for me
Author
Owner

@darkmacheken commented on GitHub (Aug 4, 2019):

@pedrodaniel10 Ctrl+Chift+C / Ctrl+Chift+V works for me

Yes, that got into v0.3

@darkmacheken commented on GitHub (Aug 4, 2019): > > > @pedrodaniel10 Ctrl+Chift+C / Ctrl+Chift+V works for me Yes, that got into v0.3
Author
Owner

@devstu commented on GitHub (Aug 6, 2019):

I would like to see customizable key commands for copy and paste.
GitBash uses Ctrl+Ins and Shift+Ins and it seems pretty universal in a lot of apps.

@devstu commented on GitHub (Aug 6, 2019): I would like to see customizable key commands for copy and paste. GitBash uses Ctrl+Ins and Shift+Ins and it seems pretty universal in a lot of apps.
Author
Owner

@DHowett-MSFT commented on GitHub (Aug 6, 2019):

@devstu you must mean the new customizable key bindings for copy and paste that went into v0.3?

@DHowett-MSFT commented on GitHub (Aug 6, 2019): @devstu you must mean the new customizable key bindings for copy and paste that went into v0.3?
Author
Owner

@devstu commented on GitHub (Aug 6, 2019):

I am sorry I found it now, it wasn't in the default keybindinds, but I added one for copy and paste and it worked. Thank you, sorry.

@devstu commented on GitHub (Aug 6, 2019): I am sorry I found it now, it wasn't in the default keybindinds, but I added one for copy and paste and it worked. Thank you, sorry.
Author
Owner

@ghost commented on GitHub (Aug 10, 2019):

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 (Aug 10, 2019): 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

@visceralfield commented on GitHub (Sep 9, 2019):

I am still experiencing this crash. When I right-click to copy text from a Powershell instance in Windows Terminal, I get the loading ring cursor for a few seconds, the window closes, and nothing is copied to my clipboard. Where should I look to get the relevant logs for debugging this issue?

@visceralfield commented on GitHub (Sep 9, 2019): I am still experiencing this crash. When I right-click to copy text from a Powershell instance in Windows Terminal, I get the loading ring cursor for a few seconds, the window closes, and nothing is copied to my clipboard. Where should I look to get the relevant logs for debugging this issue?
Author
Owner

@visceralfield commented on GitHub (Sep 9, 2019):

This is the Event Viewer data for the crash:

Faulting application name: WindowsTerminal.exe, version: 1.0.1908.26002, time stamp: 0x5d641823
Faulting module name: CoreMessaging.dll, version: 10.0.18362.1, time stamp: 0x101a45b8
Exception code: 0xc000027b
Fault offset: 0x000000000005fe7e
Faulting process id: 0x2dd0
Faulting application start time: 0x01d56724c022ac87
Faulting application path: C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_0.4.2382.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe
Faulting module path: C:\Windows\System32\CoreMessaging.dll
Report Id: 4003ef47-2e4f-45dd-bf0a-42c998a95924
Faulting package full name: Microsoft.WindowsTerminal_0.4.2382.0_x64__8wekyb3d8bbwe
Faulting package-relative application ID: App
@visceralfield commented on GitHub (Sep 9, 2019): This is the Event Viewer data for the crash: ``` Faulting application name: WindowsTerminal.exe, version: 1.0.1908.26002, time stamp: 0x5d641823 Faulting module name: CoreMessaging.dll, version: 10.0.18362.1, time stamp: 0x101a45b8 Exception code: 0xc000027b Fault offset: 0x000000000005fe7e Faulting process id: 0x2dd0 Faulting application start time: 0x01d56724c022ac87 Faulting application path: C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_0.4.2382.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe Faulting module path: C:\Windows\System32\CoreMessaging.dll Report Id: 4003ef47-2e4f-45dd-bf0a-42c998a95924 Faulting package full name: Microsoft.WindowsTerminal_0.4.2382.0_x64__8wekyb3d8bbwe Faulting package-relative application ID: App ```
Author
Owner

@visceralfield commented on GitHub (Sep 9, 2019):

And this is the associated Report.wer:

Report.zip

@visceralfield commented on GitHub (Sep 9, 2019): And this is the associated `Report.wer`: [Report.zip](https://github.com/microsoft/terminal/files/3591449/Report.zip)
Author
Owner

@tolache commented on GitHub (Nov 15, 2022):

My terminal crashes upon pasting a string. I have an Even 1000 from Application Error:

Faulting application name: WindowsTerminal.exe, version: 1.15.2210.14005, time stamp: 0x6349fd20
Faulting module name: windows.applicationmodel.datatransfer.dll, version: 10.0.22621.1, time stamp: 0xd1b91d78
Exception code: 0xc0000005
Fault offset: 0x0000000000065009
Faulting process id: 0x0x3DC4
Faulting application start time: 0x0x1D8F8E77C39BCAB
Faulting application path: C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.15.2875.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe
Faulting module path: C:\Windows\System32\windows.applicationmodel.datatransfer.dll
Report Id: 536af586-d6e2-4e58-a5c8-5bcf020c20b9
Faulting package full name: Microsoft.WindowsTerminal_1.15.2875.0_x64__8wekyb3d8bbwe
Faulting package-relative application ID: App

and an Event 1026 from .NET Runtime:

Application: pwsh.exe
CoreCLR Version: 7.0.22.51805
.NET Version: 7.0.0
Description: The process was terminated due to an unhandled exception.
Exception Info: System.InvalidOperationException: Cannot read keys when either application does not have a console or when console input has been redirected. Try Console.Read.
   at System.ConsolePal.ReadKey(Boolean intercept)
   at Microsoft.PowerShell.Internal.VirtualTerminal.ReadKey()
   at Microsoft.PowerShell.PSConsoleReadLine.ReadOneOrMoreKeys()
   at Microsoft.PowerShell.PSConsoleReadLine.ReadKeyThreadProc()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
@tolache commented on GitHub (Nov 15, 2022): My terminal crashes upon pasting a string. I have an Even 1000 from Application Error: ``` Faulting application name: WindowsTerminal.exe, version: 1.15.2210.14005, time stamp: 0x6349fd20 Faulting module name: windows.applicationmodel.datatransfer.dll, version: 10.0.22621.1, time stamp: 0xd1b91d78 Exception code: 0xc0000005 Fault offset: 0x0000000000065009 Faulting process id: 0x0x3DC4 Faulting application start time: 0x0x1D8F8E77C39BCAB Faulting application path: C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.15.2875.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe Faulting module path: C:\Windows\System32\windows.applicationmodel.datatransfer.dll Report Id: 536af586-d6e2-4e58-a5c8-5bcf020c20b9 Faulting package full name: Microsoft.WindowsTerminal_1.15.2875.0_x64__8wekyb3d8bbwe Faulting package-relative application ID: App ``` and an Event 1026 from .NET Runtime: ``` Application: pwsh.exe CoreCLR Version: 7.0.22.51805 .NET Version: 7.0.0 Description: The process was terminated due to an unhandled exception. Exception Info: System.InvalidOperationException: Cannot read keys when either application does not have a console or when console input has been redirected. Try Console.Read. at System.ConsolePal.ReadKey(Boolean intercept) at Microsoft.PowerShell.Internal.VirtualTerminal.ReadKey() at Microsoft.PowerShell.PSConsoleReadLine.ReadOneOrMoreKeys() at Microsoft.PowerShell.PSConsoleReadLine.ReadKeyThreadProc() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) ```
Author
Owner

@zadjii-msft commented on GitHub (Nov 15, 2022):

@tolache This is a 3 year old stale issue about an unexplained crash while copying text. You should probably file a new issue, so we can triage your issue to its own root cause.

@zadjii-msft commented on GitHub (Nov 15, 2022): @tolache This is a 3 year old stale issue about an unexplained crash while _copying_ text. You should probably file a new issue, so we can triage your issue to its own root cause.
Author
Owner

@tolache commented on GitHub (Nov 19, 2022):

#14412, for anyone else who finds this.

@tolache commented on GitHub (Nov 19, 2022): #14412, for anyone else who finds this.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#2808