wt fails tembench test - not displaying very long line #16018

Closed
opened 2026-01-31 04:54:59 +00:00 by claunia · 4 comments
Owner

Originally created by @elsaco on GitHub (Dec 1, 2021).

Windows Terminal version

1.12.2931.0

Windows build number

10.0.19044.0

Other Software

termbench

Steps to reproduce

clone https://github.com/cmuratori/termbench.git
edit termbench.cpp and change Width & Height to wt default size (lines 361-362)
build solution
run small test

Expected Behavior

all output to be shown in wt tab

Actual Behavior

wt now displaying LongLine (test step nr. 2)

See 82afbc6925/termbench.cpp (L243) for details.

Sample test run with no terminal output beginning mark 20 to mark 32:

https://youtu.be/mGooOF1-Iy8

Video too bit for GitHub imposed size. Had to YouTube. Sorry for any inconvenience.

Originally created by @elsaco on GitHub (Dec 1, 2021). ### Windows Terminal version 1.12.2931.0 ### Windows build number 10.0.19044.0 ### Other Software termbench ### Steps to reproduce clone https://github.com/cmuratori/termbench.git edit `termbench.cpp` and change `Width` & `Height` to `wt` default size (lines 361-362) build solution run `small` test ### Expected Behavior all output to be shown in `wt` tab ### Actual Behavior `wt` now displaying `LongLine` (test step nr. 2) See https://github.com/cmuratori/termbench/blob/82afbc69256b4e22de913f0f02f82e0480f3dac5/termbench.cpp#L243 for details. Sample test run with no terminal output beginning mark 20 to mark 32: https://youtu.be/mGooOF1-Iy8 Video too bit for GitHub imposed size. Had to YouTube. Sorry for any inconvenience.
claunia added the Resolution-Duplicate label 2026-01-31 04:54:59 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Dec 1, 2021):

Looking through the code, that looks like the same root cause as /dup #11794, thanks!

@zadjii-msft commented on GitHub (Dec 1, 2021): Looking through the code, that looks like the same root cause as /dup #11794, thanks!
Author
Owner

@ghost commented on GitHub (Dec 1, 2021):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Dec 1, 2021): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Author
Owner

@lhecker commented on GitHub (Dec 1, 2021):

I've described a way to "fix" the issue here: https://github.com/microsoft/terminal/issues/11794#issuecomment-981110395
However it unfortunately proves that it's likely not - at least not fundamentally - possible to fix the issue... Applications kind of expect that each write() completes synchronously. If you break that promise you can see the result in the third of the 3 videos in my comment.
We could set an upper limit here and say "writes larger than 1MB are split up" and it would probably fix the issue. But what if we make our VT parser a lot faster and applications start expecting to write 1.1MB synchronously?

Realistically I find it unlikely that applications write mega- or gigabytes of ASCII characters in a single write though, which is why I'll submit a PR soon that caps the maximum write size, even if it breaks some hypothetical applications. But it'll be very difficult to choose a good upper limit... Maybe 4MB will do?

@lhecker commented on GitHub (Dec 1, 2021): I've described a way to "fix" the issue here: https://github.com/microsoft/terminal/issues/11794#issuecomment-981110395 However it unfortunately proves that it's likely not - at least not fundamentally - possible to fix the issue... Applications kind of expect that each `write()` completes synchronously. If you break that promise you can see the result in the third of the 3 videos in my comment. We could set an upper limit here and say "writes larger than 1MB are split up" and it would probably fix the issue. But what if we make our VT parser a lot faster and applications start expecting to write 1.1MB synchronously? Realistically I find it unlikely that applications write mega- or gigabytes of ASCII characters in a single write though, which is why I'll submit a PR soon that caps the maximum write size, even if it breaks some hypothetical applications. But it'll be very difficult to choose a good upper limit... Maybe 4MB will do?
Author
Owner

@DHowett commented on GitHub (Dec 1, 2021):

submit a PR soon that caps the maximum write size

I don't think we can do that. The cat's well and truly out of the bag on that one -- and I bet @ErykSun has the receipts to prove that we can't.

@DHowett commented on GitHub (Dec 1, 2021): > submit a PR soon that caps the maximum write size I don't think we can do that. The cat's well and truly out of the bag on that one -- and I bet @ErykSun has the receipts to prove that we can't.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#16018