Crash: Chunk Selection over ubuntu prompt working directory #4774

Closed
opened 2026-01-30 23:56:15 +00:00 by claunia · 4 comments
Owner

Originally created by @carlos-zamora on GitHub (Nov 1, 2019).

Originally assigned to: @carlos-zamora on GitHub.

Environment

Windows build number: [run `[Environment]::10.0.19016.1000
Windows Terminal version (if applicable): v0.6.2951.0

Other prereqs:

  • double click delimiters must include "\/"
  • have a way of printing CJK characters and emoji
  • Ubuntu
  • must be "Windows Terminal (Dev Build)". Doesn't repro on version downloaded from the store. Doesn't matter if debugger is attached.

NOTE: not entirely sure which of these are relevant but we can cut down on it as we investigate

Steps to reproduce

  1. open tab with ubuntu in it
  2. output CJK characters
  3. double click a portion of the command that is in English
  4. chunk select (drag while holding mouse button) to the right or down (should work fine. Even if you highlight CJK characters)
  5. chunk select back past starting anchor into file path

(Optional) if it doesn't crash when you go into the file path, just keep trying to chunk select the file path, it should occur.

Expected behavior

Chunk selection continues to happen just fine.

Actual behavior

Crash. Here's the stack:

>	ucrtbased.dll!_VCrtDbgReportA(int nRptType, void * returnAddress, const char * szFile, int nLine, const char * szModule, const char * szFormat, char * arglist) Line 284	C++
 	ucrtbased.dll!_CrtDbgReport(int report_type, const char * file_name, int line_number, const char * module_name, const char * format, ...) Line 263	C++
 	TerminalControl.dll!std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<TextAttributeRun> > >::operator--() Line 82	C++
 	TerminalControl.dll!AttrRowIterator::_decrement(unsigned __int64 count) Line 135	C++
 	TerminalControl.dll!AttrRowIterator::operator+=(const __int64 & movement) Line 64	C++
 	TerminalControl.dll!TextBufferCellIterator::_SetPos(const _COORD newPos) Line 219	C++
 	TerminalControl.dll!TextBufferCellIterator::operator+=(const __int64 & movement) Line 110	C++
 	TerminalControl.dll!TextBufferCellIterator::operator-=(const __int64 & movement) Line 122	C++
 	TerminalControl.dll!TextBufferCellIterator::operator--() Line 140	C++
 	TerminalControl.dll!TextBufferCellIterator::operator--(int __formal) Line 161	C++
 	TerminalControl.dll!Microsoft::Terminal::Core::Terminal::_ExpandDoubleClickSelectionLeft(const _COORD position) Line 369	C++

I'm particularly confused because it's hitting a _CrtDbgBreak() in the last frame.

Originally created by @carlos-zamora on GitHub (Nov 1, 2019). Originally assigned to: @carlos-zamora on GitHub. # Environment ```none Windows build number: [run `[Environment]::10.0.19016.1000 Windows Terminal version (if applicable): v0.6.2951.0 ``` Other prereqs: - double click delimiters must include "\\/" - have a way of printing CJK characters and emoji - Ubuntu - must be "Windows Terminal (Dev Build)". Doesn't repro on version downloaded from the store. Doesn't matter if debugger is attached. NOTE: not entirely sure which of these are relevant but we can cut down on it as we investigate # Steps to reproduce 1. open tab with ubuntu in it 2. output CJK characters 3. double click a portion of the command that is in English 4. chunk select (drag while holding mouse button) to the right or down (should work fine. Even if you highlight CJK characters) 5. chunk select back past starting anchor into file path (Optional) if it doesn't crash when you go into the file path, just keep trying to chunk select the file path, it should occur. # Expected behavior Chunk selection continues to happen just fine. # Actual behavior Crash. Here's the stack: ``` > ucrtbased.dll!_VCrtDbgReportA(int nRptType, void * returnAddress, const char * szFile, int nLine, const char * szModule, const char * szFormat, char * arglist) Line 284 C++ ucrtbased.dll!_CrtDbgReport(int report_type, const char * file_name, int line_number, const char * module_name, const char * format, ...) Line 263 C++ TerminalControl.dll!std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<TextAttributeRun> > >::operator--() Line 82 C++ TerminalControl.dll!AttrRowIterator::_decrement(unsigned __int64 count) Line 135 C++ TerminalControl.dll!AttrRowIterator::operator+=(const __int64 & movement) Line 64 C++ TerminalControl.dll!TextBufferCellIterator::_SetPos(const _COORD newPos) Line 219 C++ TerminalControl.dll!TextBufferCellIterator::operator+=(const __int64 & movement) Line 110 C++ TerminalControl.dll!TextBufferCellIterator::operator-=(const __int64 & movement) Line 122 C++ TerminalControl.dll!TextBufferCellIterator::operator--() Line 140 C++ TerminalControl.dll!TextBufferCellIterator::operator--(int __formal) Line 161 C++ TerminalControl.dll!Microsoft::Terminal::Core::Terminal::_ExpandDoubleClickSelectionLeft(const _COORD position) Line 369 C++ ``` I'm particularly confused because it's hitting a `_CrtDbgBreak()` in the last frame.
Author
Owner

@carlos-zamora commented on GitHub (Nov 1, 2019):

@DHowett-MSFT This is what I was hitting yesterday, if you're interested. I tried to dig a little deeper but I don't understand what is happening this deep past the TermControl code.

@carlos-zamora commented on GitHub (Nov 1, 2019): @DHowett-MSFT This is what I was hitting yesterday, if you're interested. I tried to dig a little deeper but I don't understand what is happening this deep past the TermControl code.
Author
Owner

@DHowett-MSFT commented on GitHub (Nov 4, 2019):

@miniksa suggests that you ask him about it. 😁

@DHowett-MSFT commented on GitHub (Nov 4, 2019): @miniksa suggests that you ask him about it. :grin:
Author
Owner

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

Shorter repro:

  1. Open ubuntu shell
  2. double click the : or ~ in cazamor@PC-cazamor:~$
  3. crash
@carlos-zamora commented on GitHub (Nov 13, 2019): Shorter repro: 1. Open ubuntu shell 2. double click the `:` or `~` in `cazamor@PC-cazamor:~$` 3. crash
Author
Owner

@ghost commented on GitHub (Dec 12, 2019):

:tada:This issue was addressed in #3566, which has now been successfully released as Windows Terminal Preview v0.7.3451.0.🎉

Handy links:

@ghost commented on GitHub (Dec 12, 2019): :tada:This issue was addressed in #3566, which has now been successfully released as `Windows Terminal Preview v0.7.3451.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v0.7.3451.0) * [Store Download](https://www.microsoft.com/store/apps/9n0dx20hk701?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#4774