Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scrambled prompt/input area #10130

Open
Tracked by #5800
SpitFire-666 opened this issue May 19, 2021 · 11 comments
Open
Tracked by #5800

Scrambled prompt/input area #10130

SpitFire-666 opened this issue May 19, 2021 · 11 comments
Labels
Area-Output Related to output processing (inserting text into buffer, retrieving buffer text, etc.) Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-2 A description (P2) Product-Terminal The new Windows Terminal.
Milestone

Comments

@SpitFire-666
Copy link

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

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels May 19, 2021
@zadjii-msft
Copy link
Member

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 zadjii-msft added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something Product-Terminal The new Windows Terminal. labels May 19, 2021
@SpitFire-666
Copy link
Author

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

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels May 19, 2021
@SpitFire-666
Copy link
Author

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"

@LuanVSO
Copy link
Contributor

LuanVSO commented 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?

2021-05-19-230712.mp4

@SpitFire-666
Copy link
Author

@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
Copy link
Author

SpitFire-666 commented May 26, 2021

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

test

@zadjii-msft
Copy link
Member

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
Copy link
Member

zadjii-msft commented 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 zadjii-msft added Area-Output Related to output processing (inserting text into buffer, retrieving buffer text, etc.) Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-2 A description (P2) and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Attention The core contributors need to come back around and look at this ASAP. labels Aug 19, 2021
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Aug 19, 2021
@SpitFire-666

This comment has been minimized.

@zadjii-msft
Copy link
Member

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

@zadjii-msft zadjii-msft modified the milestones: Terminal v2.0, 22H2 Jan 4, 2022
@zadjii-msft
Copy link
Member

@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 zadjii-msft removed this from the 22H2 milestone Jul 5, 2023
@zadjii-msft zadjii-msft added this to the Backlog milestone Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Output Related to output processing (inserting text into buffer, retrieving buffer text, etc.) Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-2 A description (P2) Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

3 participants