Every copyOnSelect action crashes the Terminal now #3850

Closed
opened 2026-01-30 23:31:31 +00:00 by claunia · 7 comments
Owner

Originally created by @JDQuackers on GitHub (Sep 12, 2019).

Originally assigned to: @carlos-zamora on GitHub.

Environment

Windows build number: Win32NT     10.0.18362.0     Microsoft Windows NT 10.0.18362.0

Windows Terminal version (if applicable): 0.4.2382.0  (installed via Microsoft Store, profiles.json attached)

[profiles.txt](https://github.com/microsoft/terminal/files/3607091/profiles.txt)


Steps to reproduce

With the latest version of Windows Terminal, using the attached profiles.json file with copyOnSelect = True, every time I copy text the Terminal will hang for 1-2 seconds and then crash. After the most recent update to 0.4.2382.0, I enabled copyOnSelect and only saw this crash maybe once a day. Since yesterday (9/11), it happens every time I copy text. No settings changes happened, but I do heavily use the Terminal every day with lots of copy/pasting, so as of yesterday my workflow is severely interrupted

Expected behavior

copyOnSelect adds the selected text to clipboard, and Terminal continues to operate as intended

Actual behavior

As soon as the selection period is over, the Terminal hangs for 1-2 seconds with a spinning cursor, then crashes. No text is copied to the clipboard

Also, here is the Feedback Hub posting: https://aka.ms/AA627yk

Originally created by @JDQuackers on GitHub (Sep 12, 2019). Originally assigned to: @carlos-zamora on GitHub. # Environment ```none Windows build number: Win32NT 10.0.18362.0 Microsoft Windows NT 10.0.18362.0 Windows Terminal version (if applicable): 0.4.2382.0 (installed via Microsoft Store, profiles.json attached) [profiles.txt](https://github.com/microsoft/terminal/files/3607091/profiles.txt) ``` # Steps to reproduce With the latest version of Windows Terminal, using the attached `profiles.json` file with `copyOnSelect = True`, every time I copy text the Terminal will hang for 1-2 seconds and then crash. After the most recent update to 0.4.2382.0, I enabled `copyOnSelect` and only saw this crash maybe once a day. Since yesterday (9/11), it happens every time I copy text. No settings changes happened, but I do heavily use the Terminal every day with lots of copy/pasting, so as of yesterday my workflow is severely interrupted # Expected behavior copyOnSelect adds the selected text to clipboard, and Terminal continues to operate as intended # Actual behavior As soon as the selection period is over, the Terminal hangs for 1-2 seconds with a spinning cursor, then crashes. No text is copied to the clipboard **Also, here is the Feedback Hub posting:** https://aka.ms/AA627yk
Author
Owner

@zadjii-msft commented on GitHub (Sep 12, 2019):

@carlos-zamora Do we have a dupe for this one? Presumably this is different than the last copy->crash bug

@zadjii-msft commented on GitHub (Sep 12, 2019): @carlos-zamora Do we have a dupe for this one? Presumably this is different than the last copy->crash bug
Author
Owner

@JDQuackers commented on GitHub (Sep 12, 2019):

Accidentally attached the file within the code block so it didn't attach correctly. Here is with a .txt extension to make Github happy:

profiles.txt

@JDQuackers commented on GitHub (Sep 12, 2019): Accidentally attached the file within the code block so it didn't attach correctly. Here is with a .txt extension to make Github happy: [profiles.txt](https://github.com/microsoft/terminal/files/3607094/profiles.txt)
Author
Owner

@carlos-zamora commented on GitHub (Sep 12, 2019):

@carlos-zamora Carlos Zamora FTE Do we have a dupe for this one? Presumably this is different than the last copy->crash bug

I don't see a dup for this. But this came after the copy->crash bugfix. So, potentially related?

@carlos-zamora commented on GitHub (Sep 12, 2019): > @carlos-zamora Carlos Zamora FTE Do we have a dupe for this one? Presumably this is different than the last copy->crash bug I don't see a dup for this. But this came after the copy->crash bugfix. So, potentially related?
Author
Owner

@spatiebot commented on GitHub (Sep 13, 2019):

I can confirm this bug.

@spatiebot commented on GitHub (Sep 13, 2019): I can confirm this bug.
Author
Owner

@mcpiroman commented on GitHub (Sep 16, 2019):

Does this happen when you disable copyOnSelect and copy things manually (with right click or shift+ctrl+c or whatever)? It also crashes to me but regardless of copyOnSelect.

In particular, changing this line to catch(...) { } stopped the crash for me:
125e1771ae/src/cascadia/TerminalApp/TerminalPage.cpp (L1025)

@mcpiroman commented on GitHub (Sep 16, 2019): Does this happen when you disable `copyOnSelect` and copy things manually (with right click or `shift+ctrl+c` or whatever)? It also crashes to me but regardless of `copyOnSelect`. In particular, changing this line to `catch(...) { }` stopped the crash for me: https://github.com/microsoft/terminal/blob/125e1771aed0a7b4e516e7fba1934c78f18c749b/src/cascadia/TerminalApp/TerminalPage.cpp#L1025
Author
Owner

@JDQuackers commented on GitHub (Sep 16, 2019):

Does this happen when you disable copyOnSelect and copy things manually (with right click or shift+ctrl+c or whatever)?

So, interestingly, this problem is no longer happening. Just to try this manual copy, I toggled the setting to false, and confirmed that I could copy manually without crash. Then I re-enabled the setting to true, and can still perform copyOnSelect without crash. This is bizarre. The behavior lasted from 9/11 until 9/14.

Since opening the bug and seeing the behavior go away, I know I rebooted the machine, but otherwise no updates or settings changes occurred. Maybe it is related to having extensive uptime of the machine with many, many Windows Terminal sessions open over an extended period of time. I typically open 2 or 3 Terminal windows throughout the day with 3-4 tabs open, and leave them open for many hours during the day. The uptime of my machine is on average about 15 days. In case any of that is useful information.

Since the problem went away for me, should I close this Issue?

@JDQuackers commented on GitHub (Sep 16, 2019): > Does this happen when you disable `copyOnSelect` and copy things manually (with right click or `shift+ctrl+c` or whatever)? So, interestingly, this problem is no longer happening. Just to try this manual copy, I toggled the setting to `false`, and confirmed that I could copy manually without crash. Then I re-enabled the setting to `true`, and can still perform copyOnSelect without crash. This is bizarre. The behavior lasted from 9/11 until 9/14. Since opening the bug and seeing the behavior go away, I know I rebooted the machine, but otherwise no updates or settings changes occurred. Maybe it is related to having extensive uptime of the machine with _many, many_ Windows Terminal sessions open over an extended period of time. I typically open 2 or 3 Terminal windows throughout the day with 3-4 tabs open, and leave them open for many hours during the day. The uptime of my machine is on average about 15 days. In case any of that is useful information. Since the problem went away for me, should I close this Issue?
Author
Owner

@carlos-zamora commented on GitHub (Sep 16, 2019):

Aha! So it sounds like this is actually a dup of #2685. Sometimes, the clipboard isn't available (why?, idk), but that definitely would get fixed by a reboot. This issue should be fixed with PR #2590.

Closing as dup. Code change is in master, if you care to use it. Otherwise, this will definitely be in the next update :) Thanks!

@carlos-zamora commented on GitHub (Sep 16, 2019): Aha! So it sounds like this is actually a dup of #2685. Sometimes, the clipboard isn't available (why?, idk), but that definitely would get fixed by a reboot. This issue should be fixed with PR #2590. Closing as dup. Code change is in master, if you care to use it. Otherwise, this will definitely be in the next update :) Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#3850