Bug Report: Crash on large selection #1661

Closed
opened 2026-01-30 22:33:10 +00:00 by claunia · 2 comments
Owner

Originally created by @carlos-zamora on GitHub (Jun 13, 2019).

Originally assigned to: @carlos-zamora on GitHub.

Separating #950 into 2 issues. #950 was a "capture" issue. This is a "copy the selection" issue.

Environment

Windows build number: Microsoft Windows [Version 10.0.18917.1000]

Steps to reproduce

  1. Maximize window
  2. Make a selection from top-left corner to bottom-right
  3. Right-click to copy

Expected behavior

Obviously, to not crash.

Actual behavior

Crash (presumably because copy is too big.)

Originally created by @carlos-zamora on GitHub (Jun 13, 2019). Originally assigned to: @carlos-zamora on GitHub. Separating #950 into 2 issues. #950 was a "capture" issue. This is a "copy the selection" issue. # Environment ```none Windows build number: Microsoft Windows [Version 10.0.18917.1000] ``` # Steps to reproduce <!-- A description of how to trigger this bug. --> 1. Maximize window 2. Make a selection from top-left corner to bottom-right 3. Right-click to copy # Expected behavior Obviously, to not crash. # Actual behavior Crash (presumably because copy is too big.)
Author
Owner

@carlos-zamora commented on GitHub (Jun 13, 2019):

More Info:

So, I'm debugging this and I notice that the issue arises in TermControl::CopySelectionToClipboard():

const auto copiedData = _terminal->RetrieveSelectedTextFromBuffer(trimTrailingWhitespace);
_terminal->ClearSelection();

If I set a breakpoint on the first line, everything works fine.
If I set a breakpoint on the second line, it crashes.

@carlos-zamora commented on GitHub (Jun 13, 2019): More Info: So, I'm debugging this and I notice that the issue arises in `TermControl::CopySelectionToClipboard()`: ```c++ const auto copiedData = _terminal->RetrieveSelectedTextFromBuffer(trimTrailingWhitespace); _terminal->ClearSelection(); ``` If I set a breakpoint on the first line, everything works fine. If I set a breakpoint on the second line, it crashes.
Author
Owner

@carlos-zamora commented on GitHub (Jun 14, 2019):

Turns out that this is the fixed by #1254 and is a dup of #1165. So nevermind!

@carlos-zamora commented on GitHub (Jun 14, 2019): Turns out that this is the fixed by #1254 and is a dup of #1165. So nevermind!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#1661