microsoft / microsoft/terminal

Rapid background palette changes can make Windows Terminal hang

Open
#17,734 1 comment 0 reactions 0 assignees View on GitHub
Area-VT Help Wanted Issue-Bug Product-Terminal
Dominant language
C++
Stars
105k
Forks
9.6k
Avg merge
3d 17h
Merged PRs (30d)
29

Description

### Windows Terminal version

1.21.1772.0

### Windows build number

10.0.19045.4780

### Other Software

_No response_

### Steps to reproduce

Run the following python script:
```py
import sys

for j in range(21845):
i = j*3
r,g,b = i,i+1,i+2
seq = '\033]11;rgb:%04x/%04X/%04x\033\\' % (r,g,b)
sys.stdout.write(seq)
sys.stdout.flush()

sys.stdout.write('\033]11;rgb:00/00/00\033\\')
```

### Expected Behavior

The background color should fade from black to white, then reset to black and exit. The terminal should still work at that point.

### Actual Behavior

The background fade works, but the terminal become unusable once the script has finished. None of the tabs work, and the title bar eventually shows "(Not Responding)".

I briefly looked at this in the debugger, and it appeared that it was triggering some sort of theme update event whenever the background changed, and I suspect it may have just got overloaded with a backlog of those events.

Contributor guide

Open the contributing guide

Research direction

Run the supplied Python reproducer on Windows Terminal 1.21.1772.0 and confirm the hang after rapid background-color updates. Trace the theme update events triggered by each escape sequence and identify how the accumulated work affects tab responsiveness. Done means the fade and reset complete while the terminal remains usable.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
cli, operating-systems, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.