Not sure exactly how I encountered this but I was running in WT and I had this process in the top half of a split pane setup. I had just run a command to display progress. But I had done this several times with no crash. This is the command that I was running to display the progress bar:
1..100 | % {Write-Progress -Activity Demo -PercentComplete $_; Start-Sleep -Milliseconds 500}
PowerShell should not crash.
PowerShell crashed.
Actual value was 39.
at Microsoft.PowerShell.ConsoleHostRawUserInterface.CheckCoordinateWithinBuffer(Coordinates& c, CONSOLE_SCREEN_BUFFER_INFO& bufferInfo, String paramName)
at Microsoft.PowerShell.ConsoleHostRawUserInterface.set_CursorPosition(Coordinates value)
at Microsoft.PowerShell.ProgressPane.Hide()
at Microsoft.PowerShell.ConsoleHostUserInterface.ResetProgress()
at Microsoft.PowerShell.Executor.ExecuteCommandHelper(Pipeline tempPipeline, Exception& exceptionThrown, ExecutionOptions options)
at Microsoft.PowerShell.ConsoleHost.InputLoop.Run(Boolean inputLoopIsNested)
at Microsoft.PowerShell.ConsoleHost.InputLoop.RunNewInputLoop(ConsoleHost parent, Boolean isNested)
at Microsoft.PowerShell.ConsoleHost.EnterNestedPrompt()
at Microsoft.PowerShell.ConsoleHost.DoRunspaceLoop(String initialCommand, Boolean skipProfiles, Collection`1 initialCommandArgs, Boolean staMode, String configurationName)
at Microsoft.PowerShell.ConsoleHost.Run(CommandLineParameterParser cpp, Boolean isPrestartWarned)
at Microsoft.PowerShell.ConsoleHost.Start(String bannerText, String helpText, String[] args)
at Microsoft.PowerShell.ConsoleShell.Start(InitialSessionState initialSessionState, String bannerText, String helpText, String[] args)
at Microsoft.PowerShell.UnmanagedPSEntry.Start(String consoleFilePath, String[] args, Int32 argc)
[process exited with code 2148734499]
Name Value
---- -----
PSVersion 7.1.0-preview.2
PSEdition Core
GitCommitId 7.1.0-preview.2
OS Microsoft Windows 10.0.18363
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0鈥
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Did you change Windows Terminal position or size?
I didn't change the outer frame but this pane's size changed when I opened another split pane below it.
For reference #11913
OK I can repro this. Open a PowerShell 7 tab in WT. Execute this:
1..100 | %{Write-Progress -Activity 'Progress in PSIC' -PercentComplete $_; Sleep -m 500}
Then open up a horizontal split-pane and then just wait for the progress bar to finish and remove itself. That's when it crashes:

/cc @DHowett-MSFT
This will happen on all console hosts where the buffer size is equal to the screen size and the buffer/screen size change during the progress operation. This is not a reasonable state in which to fail. :smile:
When writing back the output cells, PowerShell needs to _not instantly beef it_ when it fails to do so. The data that's lost isn't worth destroying the user's session over.
Most helpful comment
When writing back the output cells, PowerShell needs to _not instantly beef it_ when it fails to do so. The data that's lost isn't worth destroying the user's session over.