We log entirely too frequently from Terminal::CursorLineFeed #14803

Closed
opened 2026-01-31 04:19:56 +00:00 by claunia · 2 comments
Owner

Originally created by @zadjii-msft on GitHub (Aug 5, 2021).

This is a follow-up for an internal bug. There's two pieces here:

  • (A) Change the CATCH_LOG_RETURN_FALSE to a newly authored CATCH_LOG_RETURN_FALSE_EXPECTED. We're expecting this exception, so make it less noisy. This will fix MSFT:33310649
  • (B) Get to the bottom of why Terminal::CursorLineFeed is throwing so often. It's an E_ABORT from rectangle.h:840, though that line of code is nothing in main, so we might need to look at what it is in 1.9. Presumably something in _AdjustCursorPosition throws, though impossible to say what exactly.
Originally created by @zadjii-msft on GitHub (Aug 5, 2021). This is a follow-up for an internal bug. There's two pieces here: * [x] (**A**) Change the `CATCH_LOG_RETURN_FALSE` to a newly authored `CATCH_LOG_RETURN_FALSE_EXPECTED`. We're expecting this exception, so make it less noisy. This will fix MSFT:33310649 - Done in #10901 * [ ] (**B**) Get to the bottom of why `Terminal::CursorLineFeed` is throwing so often. It's an `E_ABORT` from `rectangle.h:840`, though that line of code is nothing in main, so we might need to look at what it is in 1.9. Presumably something in `_AdjustCursorPosition` throws, though impossible to say what exactly.
Author
Owner

@zadjii-msft commented on GitHub (Aug 9, 2021):

Huh well, I slapped a DebugBreak() in the exception handler in Terminal::CursorLineFeed and tried printing 1000000000 lines of text to see if that triggers the exception. No luck.

Tried with a 9000001 size buffer (which would be clamped to SHORT_MAX) - no luck.

Tried with cmatrix - again, no luck.

Resizing wildly also didn't seem to trigger the debugbreak. So I'm a little lost as to what would cause this one. Someone would actually need to find where we're doing the til::rectangle math in that function and track it down, but with the logging suppressed I think we can move B out to 2.0.

@zadjii-msft commented on GitHub (Aug 9, 2021): Huh well, I slapped a `DebugBreak()` in the exception handler in `Terminal::CursorLineFeed` and tried printing 1000000000 lines of text to see if that triggers the exception. No luck. Tried with a 9000001 size buffer (which would be clamped to `SHORT_MAX`) - no luck. Tried with `cmatrix` - again, no luck. Resizing wildly also didn't seem to trigger the debugbreak. So I'm a little lost as to what would cause this one. Someone would actually need to find where we're doing the `til::rectangle` math in that function and track it down, but with the logging suppressed I think we can move **B** out to 2.0.
Author
Owner

@zadjii-msft commented on GitHub (Sep 7, 2023):

We got rid of this entirely a while back. Not sure this is still relevant.

@zadjii-msft commented on GitHub (Sep 7, 2023): We got rid of this entirely a while back. Not sure this is still relevant.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#14803