-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
- Refer to the FAQ.
- Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
Running PowerShell 7.2.4, I am performing a long running process in a WinRM Remote Session, some of the steps cause a brief network disruption that is handled gracefully in PowerShell 5.1 by trying to reconnect for 5 minutes, succeeding, and then carrying on with the rest of the process.
In PowerShell 7.2.4 this recovery process starts, but just as it recovers a null reference exception is thrown from the ProgressPane.Hide() function. this is unhandled and causes the pwsh process to exit.
I haven't had the opportunity to produce a minimal repo to reproduce this, I have however debugged this myself using the 7.2.4 tagged commit in the PowerShell repo. The exception is thrown on Line 179 of the ProgressPane.cs file which suggests that _savedRegion is null, this suggests there is some sort of threading issue.
I have Implemented a fix locally that adds lock statements to ProgressPane.Hide() and ProgressPane.Show() functions which resolves the issue. However I'm not sure if that fix would be acceptable for the project. I will link the PR here shortly.
Expected behavior
Recover from network interruption in remote sessions and continue processing.Actual behavior
Null reference exception while recovering causing process to terminate.Error details
No response
Environment data
Name Value
---- -----
PSVersion 7.2.4
PSEdition Core
GitCommitId 7.2.4
OS Microsoft Windows 10.0.19044
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0Visuals
No response