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

Buggy output display #14307

Closed
vertigo220 opened this issue Oct 29, 2022 · 9 comments
Closed

Buggy output display #14307

vertigo220 opened this issue Oct 29, 2022 · 9 comments
Labels
Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. Product-Terminal The new Windows Terminal.

Comments

@vertigo220
Copy link

Windows Terminal version

1.15.2874.0

Windows build number

Version 21H2 (OS Build 19044.2006)

Other Software

No response

Steps to reproduce

Not really sure what's going on here, but I've noticed issues before with the output getting messed up in Terminal in ways I've not experienced with Command Prompt or PowerShell. This is just one example, which happened in the past day, so I'll just provide a screenshot with red outlines over areas that are messed up and explanations of each, and hopefully somebody can figure out why this is happening, since it makes Terminal pretty much useless if users can't see an accurate command and output history. I'm fairly certain that when this happens, including this time, there usually aren't any issues initially, i.e. when the commands are issued, but rather when going back and looking at them later things are messed up, though in some cases it does happen in real-time.

The first commands I issued in this instance were as follows:

$var1="setup-v2.6.174.0"
$var2="BthPS32.6.174"
if ("$var2" -like "*$var1*") {echo 1; $var = ($var1 -split 'v?(.*)')[1]} else {if ("$var2" -match ($var1 -split '(\d.*\d)')[1]) {echo 2; $var = ($var1 -split '(\d.*\d)')[1]} else {if ("$var2" -match ($var1 -split '(\d[\d\.]*)\D*')[1]) {echo 3; $var = ($var1 -split '(\d\S*)\s*')[1]} else {if ($var2.replace('.','') -match ($var1 -split '(\d.*\d)')[1]) {echo 4; $dig_first = ($var1 -split '(\d)')[1]; $dig_last = ($var1 -split '.*(\d)')[1]; $var = ($var2 -split ".*[\sv-]($dig_first.*$dig_last)")[1]} else {if ($var2.replace('.','') -match ($var1 -split '(\d[\d\.]*)\D')[1]) {echo 5; $dig_first = ($var1 -split '(\d)')[1]; $dig_last = ($var1 -split '.*(\d)')[1]; $var = ($var2 -split ".*[\sv-]($dig_first.*$dig_last)")[1]} else {echo "no match (1)"; $var = ""}}}}};
$var1="BthPS3 Bluetooth Drivers v2.6.174"

As you can see, the first command isn't even there, and after the second command there's no prompt and the beginning of the third command is cut off (so the prompt and the first 96 characters are missing). The next box shows that the output from the command is missing entirely, going straight from the input of the command to the next prompt. Next you can see it shows the output of a command (an empty line, the number 3, another empty line, the number 2.6, then the number 174) and then immediately shows the output of one or two other commands despite the commands themselves not showing. Finally, there's the command "$var2" which I entered, at which point it displayed the variable's contents, but then when I went to repeat a previous command from history, it put "$var2" on the command line again and I couldn't get rid of it, and it showed the history commands as I cycled through them on the next line with empty space where the prompt normally is (this happened as I was doing it).

So trying to scroll up to look back at what I've done and the results each command has given me and what each variable was set to along the way is impossible, since things are cut off or completely left out. It's unusable like this and means I need to stick with the standard terminals to get any serious work done.

Screenshot_22-10-29_13 15 34-WindowsTerminal

Expected Behavior

No response

Actual Behavior

See above

@vertigo220 vertigo220 added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Oct 29, 2022
@lhecker lhecker added Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Product-Terminal The new Windows Terminal. labels Oct 30, 2022
@ghost ghost added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Oct 31, 2022
@vertigo220
Copy link
Author

Profile command line:

%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe -NoExit -File "%userprofile%\Documents\WindowsPowerShell\Microsoft.PowerShell_profile_Terminal_1.ps1"

Profile ps1 content:

function Prompt
{
  $host.ui.RawUI.WindowTitle = $(get-location)
  "PS $(get-location)> "
  $loc = $($executionContext.SessionState.Path.CurrentLocation);
  $out = "PS $loc$('>' * ($nestedPromptLevel + 1)) ";
  $out += "$([char]27)]9;9;`"$loc`"$([char]27)\"
  return $out
}

Selecting text does nothing. Of those linked issues, the only one that seems possibly related is the third one. I'm keeping the terminal open for now in case there's any debugging info I can pull from it or anything I can test, though obviously I can't leave it open indefinitely, so please let me know if there's anything you want me to test.

@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 Oct 31, 2022
@zadjii-msft
Copy link
Member

Can you try again with powershell.exe -NoExit -NoProfile -File ...? There are... other... powershell profiles that can somethimes get loaded in, so I want to try and eliminate that as a possibility.

What version of PowerShell and PsReadline are you using? This is reminiscent of an old bug that was fixed on their side a few years ago.

@zadjii-msft zadjii-msft added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something and removed Needs-Attention The core contributors need to come back around and look at this ASAP. labels Nov 2, 2022
@vertigo220
Copy link
Author

I can try that, but the problem is the problem is intermittent so, between that and the fact that my use of Powershell is also intermittent, it could be a while before I'd see if that fixes it, and even if it doesn't happen again for a while, it would be impossible to know if that was because it's fixed or just chance.

PSVersion = 5.1.19041.1682
BuildVersion = 10.0.19041.1682

Don't know how to check the PSReadLine version

@ghost ghost added the No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. label Nov 7, 2022
@ghost
Copy link

ghost commented Nov 7, 2022

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@vertigo220
Copy link
Author

.

@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 No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. labels Nov 7, 2022
@zadjii-msft
Copy link
Member

zadjii-msft commented Nov 7, 2022

Hey @vertigo220 I'm gonna give the bot another week to let you try out powershell.exe -NoExit -NoProfile -File .... If that doesn't repro this after a week, then I'd say we close this out. If this does come back after that, then we can always reopen. If it doesn't, then I'd reckon it's something in some powershell config somewhere. Probably something with [Console]::BufferSize

@zadjii-msft zadjii-msft added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something and removed Needs-Attention The core contributors need to come back around and look at this ASAP. labels Nov 7, 2022
@vertigo220
Copy link
Author

Still need to check if I'm using an old PSReadLine version, but I don't know how to check it.

@ghost ghost added the No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. label Nov 12, 2022
@ghost
Copy link

ghost commented Nov 12, 2022

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@ghost ghost closed this as completed Nov 15, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

4 participants
@lhecker @vertigo220 @zadjii-msft and others