Scrambled prompt/input area #13844

Open
opened 2026-01-31 03:53:45 +00:00 by claunia · 11 comments
Owner

Originally created by @SpitFire-666 on GitHub (May 19, 2021).

Windows Terminal version (or Windows build number)

1.7.1033.0

Other Software

No response

Steps to reproduce

(Don't know how to reproduce, could be random)

Expected Behavior

Prompt works normally

Actual Behavior

Prompt/text is scrambled or in the wrong area/position. Top arrow shows where the actual cursor is (still responsive - commands run). Other arrows show the prompt/previous commands that are randomly shown on the screen:

image

Originally created by @SpitFire-666 on GitHub (May 19, 2021). ### Windows Terminal version (or Windows build number) 1.7.1033.0 ### Other Software _No response_ ### Steps to reproduce (Don't know how to reproduce, could be random) ### Expected Behavior Prompt works normally ### Actual Behavior Prompt/text is scrambled or in the wrong area/position. Top arrow shows where the actual cursor is (still responsive - commands run). Other arrows show the prompt/previous commands that are randomly shown on the screen: ![image](https://user-images.githubusercontent.com/38451588/118762174-16729280-b8b9-11eb-9e69-44928c94abe9.png)
claunia added the Area-OutputIssue-BugProduct-TerminalPriority-2 labels 2026-01-31 03:53:45 +00:00
Author
Owner

@zadjii-msft commented on GitHub (May 19, 2021):

That sure does look pretty bad, but without more consistent repro steps, I'm not sure what we can investigate here.

Did you resize the Terminal in between those prompts? If so, then this might be a variation on #6546.

@zadjii-msft commented on GitHub (May 19, 2021): That sure does look pretty bad, but without more consistent repro steps, I'm not sure what we can investigate here. Did you resize the Terminal in between those prompts? If so, then this might be a variation on #6546.
Author
Owner

@SpitFire-666 commented on GitHub (May 20, 2021):

Thanks - I don't think I resized it to cause the issue, however I just resized the window and it caused some glitches, then crashed the terminal completely. #6546 does sound similar - hard to know exactly.

These are the app errors from the eventlog:

Faulting application name: OpenConsole.exe, version: 1.7.2104.13003, time stamp: 0x60761ceb
Faulting module name: ucrtbase.dll, version: 10.0.19041.789, time stamp: 0x2bd748bf
Exception code: 0xc0000409
Fault offset: 0x000000000007286e
Faulting process ID: 0x6b68
Faulting application start time: 0x01d740a3eef77db8
Faulting application path: C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.7.1033.0_x64__8wekyb3d8bbwe\OpenConsole.exe
Faulting module path: C:\WINDOWS\System32\ucrtbase.dll
Report ID: 4795d646-0ea8-44e3-a486-60a4d57167be
Faulting package full name: Microsoft.WindowsTerminal_1.7.1033.0_x64__8wekyb3d8bbwe
Faulting package-relative application ID: App


Faulting application name: WindowsTerminal.exe, version: 1.7.2104.13003, time stamp: 0x60761d23
Faulting module name: KERNELBASE.dll, version: 10.0.19041.906, time stamp: 0x2f2f77bf
Exception code: 0xc000027b
Fault offset: 0x000000000010b2dc
Faulting process ID: 0x4fc0
Faulting application start time: 0x01d73fdcc2ca484a
Faulting application path: C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.7.1033.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe
Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll
Report ID: 5aa6c112-d007-46a4-b266-a5f1aaa3421a
Faulting package full name: Microsoft.WindowsTerminal_1.7.1033.0_x64__8wekyb3d8bbwe
Faulting package-relative application ID: App
@SpitFire-666 commented on GitHub (May 20, 2021): Thanks - I don't think I resized it to cause the issue, however I just resized the window and it caused some glitches, then crashed the terminal completely. #6546 does sound similar - hard to know exactly. These are the app errors from the eventlog: ``` Faulting application name: OpenConsole.exe, version: 1.7.2104.13003, time stamp: 0x60761ceb Faulting module name: ucrtbase.dll, version: 10.0.19041.789, time stamp: 0x2bd748bf Exception code: 0xc0000409 Fault offset: 0x000000000007286e Faulting process ID: 0x6b68 Faulting application start time: 0x01d740a3eef77db8 Faulting application path: C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.7.1033.0_x64__8wekyb3d8bbwe\OpenConsole.exe Faulting module path: C:\WINDOWS\System32\ucrtbase.dll Report ID: 4795d646-0ea8-44e3-a486-60a4d57167be Faulting package full name: Microsoft.WindowsTerminal_1.7.1033.0_x64__8wekyb3d8bbwe Faulting package-relative application ID: App Faulting application name: WindowsTerminal.exe, version: 1.7.2104.13003, time stamp: 0x60761d23 Faulting module name: KERNELBASE.dll, version: 10.0.19041.906, time stamp: 0x2f2f77bf Exception code: 0xc000027b Fault offset: 0x000000000010b2dc Faulting process ID: 0x4fc0 Faulting application start time: 0x01d73fdcc2ca484a Faulting application path: C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.7.1033.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll Report ID: 5aa6c112-d007-46a4-b266-a5f1aaa3421a Faulting package full name: Microsoft.WindowsTerminal_1.7.1033.0_x64__8wekyb3d8bbwe Faulting package-relative application ID: App ```
Author
Owner

@SpitFire-666 commented on GitHub (May 20, 2021):

Update: I've been able to replicate the issue (some of the time). It seems to be a combination of

  • Run a command that returns some lines (eg, get-childitem)
  • Resize the window
  • Press the UP key

When issues happen, the terminal either gets corrupted, crashes, or "Process exited with error code 5"

@SpitFire-666 commented on GitHub (May 20, 2021): Update: I've been able to replicate the issue (some of the time). It seems to be a combination of - Run a command that returns some lines (eg, get-childitem) - Resize the window - Press the UP key When issues happen, the terminal either gets corrupted, crashes, or "Process exited with error code 5"
Author
Owner

@LuanVSO commented on GitHub (May 20, 2021):

did you ran any PowerShell commands that display a progress bar similar to this?
image

is this the same behavior that you are seeing?

https://user-images.githubusercontent.com/43626415/118908298-8bfd5380-b8f7-11eb-9ecb-0004f5757d7e.mp4

@LuanVSO commented on GitHub (May 20, 2021): did you ran any PowerShell commands that display a progress bar similar to this? ![image](https://user-images.githubusercontent.com/43626415/118906919-09739480-b8f5-11eb-99f3-7d16f15bbe15.png) is this the same behavior that you are seeing? https://user-images.githubusercontent.com/43626415/118908298-8bfd5380-b8f7-11eb-9ecb-0004f5757d7e.mp4
Author
Owner

@SpitFire-666 commented on GitHub (May 20, 2021):

@LuanVSO
did you ran any PowerShell commands that display a progress bar similar to this?
Yes - my profile loads the activedirectory module by default, which shows a progress bar

is this the same behavior that you are seeing?
I can replicate the same thing as your video. I guess it could be the same issue.

I'll see if i can get a screen recording of it (now it's being elusive 🙃 )

@SpitFire-666 commented on GitHub (May 20, 2021): @LuanVSO _did you ran any PowerShell commands that display a progress bar similar to this?_ Yes - my profile loads the activedirectory module by default, which shows a progress bar _is this the same behavior that you are seeing?_ I can replicate the same thing as your video. I guess it could be the same issue. I'll see if i can get a screen recording of it (now it's being elusive 🙃 )
Author
Owner

@SpitFire-666 commented on GitHub (May 26, 2021):

@zadjii-msft @LuanVSO
I seem to be able to replicate it by resizing the console text (using Ctrl+Scroll):

test

@SpitFire-666 commented on GitHub (May 26, 2021): @zadjii-msft @LuanVSO I seem to be able to replicate it by resizing the console _text_ (using Ctrl+Scroll): ![test](https://user-images.githubusercontent.com/38451588/119587228-96e14800-be11-11eb-804d-14d99ddc17f1.gif)
Author
Owner

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

Interesting. This repros even in conhost - well, at least to some extent.

  1. launch powershell
  2. run ps-progress.ps1, which is just this example
  3. increase the width of the console:

image

Though, that alone won't get the prompt detached from the cursor. Though the text is scrambled, it does seem like the cursor stays in the right place for both increasing and decreasing width, with the prompt at the bottom and with the prompt in the middle.

Okay but I did hit one bug

  1. In powershell, clear to reset the whole buffer.
  2. gci
  3. ps-progress.ps1
  4. type some input at the prompt
  5. ctrl+scroll to increase the font size. I did this twice, which caused the lines under the progress bar to re-wrap weirdly.
  6. decrease the font size once. This caused one(maybe more?) of the weirdly reflowed lines to fall off the top
  7. type more characters. Now the prompt is on the wrong line:

image

and I can't get the same thing to happen in conhost (though, fundamental UX differences between the two do make reproing this on conhost harder.)

@zadjii-msft commented on GitHub (Aug 19, 2021): Interesting. This repros even in conhost - well, at least to some extent. 1. launch `powershell` 2. run `ps-progress.ps1`, which is just [this example](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/write-progress?view=powershell-7.1#example-1--display-the-progress-of-a-for-loop) 3. increase the width of the console: ![image](https://user-images.githubusercontent.com/18356694/130077140-a403cb23-5470-4e4b-93b4-9d318c71affe.png) Though, that alone won't get the prompt detached from the cursor. Though the text is scrambled, it does seem like the cursor stays in the right place for both increasing and decreasing width, with the prompt at the bottom and with the prompt in the middle. Okay but I did hit one bug 1. In `powershell`, clear to reset the whole buffer. 2. `gci` 3. `ps-progress.ps1` 4. type some input at the prompt 4. ctrl+scroll to increase the font size. I did this twice, which caused the lines under the progress bar to re-wrap weirdly. 5. decrease the font size once. This caused one(maybe more?) of the weirdly reflowed lines to fall off the top 6. type more characters. Now the prompt is on the wrong line: ![image](https://user-images.githubusercontent.com/18356694/130079118-5faa5e41-24fc-4c39-b0c0-048bd2d3533d.png) and I can't get the same thing to happen in conhost (though, fundamental UX differences between the two do make reproing this on conhost harder.)
Author
Owner

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

Interesting. The conpty and the terminal are very different in this scenario:
image

(that's without --headless, to get the GDI head to render the conpty contents).

MORE INTERESTING.

#5368 makes this both better and worse:

image

Now the buffer contents in the pty are more what I'd expect, but the prompt is more lost than it was before. It's actually sorta correct - the prompt got restored to where it was before the resize, which is now floating in space

@zadjii-msft commented on GitHub (Aug 19, 2021): Interesting. The conpty and the terminal are _very_ different in this scenario: ![image](https://user-images.githubusercontent.com/18356694/130082259-93da84c1-f0c7-4b1b-a4d8-f86aeda53632.png) (that's without `--headless`, to get the GDI head to render the conpty contents). MORE INTERESTING. #5368 makes this both better and worse: ![image](https://user-images.githubusercontent.com/18356694/130083466-80b92d80-559f-4dca-9f84-5915ac1abf09.png) Now the buffer contents in the pty are more what I'd expect, but the prompt is _more_ lost than it was before. It's actually sorta correct - the prompt got restored to where it was before the resize, which is now floating in space
Author
Owner

@SpitFire-666 commented on GitHub (Sep 22, 2021):

Hi, if it helps - I also find that entire chunks of text go missing when scrolling up (noticed this in an SSH session):

image

Let me know if this should be raised as a separate issue. Thanks

@SpitFire-666 commented on GitHub (Sep 22, 2021): Hi, if it helps - I also find that entire chunks of text go missing when scrolling up (noticed this in an SSH session): ![image](https://user-images.githubusercontent.com/38451588/134263797-3fbb405b-0c4b-4e1a-a0dc-e5f129b67f40.png) Let me know if this should be raised as a separate issue. Thanks
Author
Owner

@zadjii-msft commented on GitHub (Sep 22, 2021):

@campbellkerr I think what you're seeing is #11214

@zadjii-msft commented on GitHub (Sep 22, 2021): @campbellkerr I think what you're seeing is #11214
Author
Owner

@zadjii-msft commented on GitHub (Jul 7, 2022):

@SpitFire-666 We've got a working theory that at least the crash here was fixed by #13212 in the latest 1.14 stable / 1.15 preview release. I don't know about the rest of the artifacts, but the crashing seems to have the same signature.

@zadjii-msft commented on GitHub (Jul 7, 2022): @SpitFire-666 We've got a working theory that at least the crash here was fixed by #13212 in the latest 1.14 stable / 1.15 preview release. I don't know about the rest of the artifacts, but the crashing seems to have the same signature.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#13844