Using Narrator on a newly opened tab hits an assert #19054

Closed
opened 2026-01-31 06:32:30 +00:00 by claunia · 0 comments
Owner

Originally created by @carlos-zamora on GitHub (Dec 13, 2022).

Windows Terminal version

main at 68cce101b

Windows build number

25267.1001

Other Software

No response

Steps to reproduce

  1. Turn on Narrator
  2. Open a debug build of Windows Terminal
  3. (if necessary) Click on Windows Terminal

Expected Behavior

No assert should occur

Actual Behavior

We're calling a Viewport::CompareInBounds({0,-20}, {0,8}, true).
First line in there is IsInBounds({0,-20}, true).

Obviously, {0,-20} is out of bounds, so we IsInBounds() returns false and fails the assert.

Call stack:

 	Microsoft.Terminal.Control.dll!Microsoft::Console::Types::Viewport::CompareInBounds(const til::point first, const til::point second, bool allowEndExclusive) Line 372	C++
 	Microsoft.Terminal.Control.dll!Microsoft::Console::Types::UiaTextRangeBase::_expandToEnclosingUnit(TextUnit unit) Line 296	C++
 	Microsoft.Terminal.Control.dll!Microsoft::Console::Types::UiaTextRangeBase::ExpandToEnclosingUnit(TextUnit unit) Line 273	C++

If you're curious, we're apparently trying to expand by word.

Originally created by @carlos-zamora on GitHub (Dec 13, 2022). ### Windows Terminal version `main` at 68cce101b ### Windows build number 25267.1001 ### Other Software _No response_ ### Steps to reproduce 1. Turn on Narrator 2. Open a debug build of Windows Terminal 3. (if necessary) Click on Windows Terminal ### Expected Behavior No assert should occur ### Actual Behavior We're calling a `Viewport::CompareInBounds({0,-20}, {0,8}, true)`. First line in there is `IsInBounds({0,-20}, true)`. Obviously, `{0,-20}` is out of bounds, so we `IsInBounds()` returns false and fails the assert. Call stack: ``` Microsoft.Terminal.Control.dll!Microsoft::Console::Types::Viewport::CompareInBounds(const til::point first, const til::point second, bool allowEndExclusive) Line 372 C++ Microsoft.Terminal.Control.dll!Microsoft::Console::Types::UiaTextRangeBase::_expandToEnclosingUnit(TextUnit unit) Line 296 C++ Microsoft.Terminal.Control.dll!Microsoft::Console::Types::UiaTextRangeBase::ExpandToEnclosingUnit(TextUnit unit) Line 273 C++ ``` If you're curious, we're apparently trying to expand by word.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#19054