Mpdreamz / shellprogressbar

ShellProgressBar - display progress in your console application
MIT License
1.43k stars 134 forks source link

System.ArgumentOutOfRangeException #55

Closed 100kph closed 4 years ago

100kph commented 4 years ago

Description: ProgressBar does not display in this console. All progress messages appear in a separate line. An exception (ArgumentOutOfRangeException) is raised just after I try disposing the progress bar. The progressBar.Percentage is 100.

Problem Console: Visual Studio 2019 Developer Command Prompt v16.4.3 Works On: PowerShell 5.1.17763.771, Visual Studio 2019 Debug Console, and on the usual Windows command prompt.

Exception Trace System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension. (Parameter 'top') Actual value was 300. at System.ConsolePal.SetCursorPosition(Int32 left, Int32 top) at System.Console.SetCursorPosition(Int32 left, Int32 top) at ShellProgressBar.ProgressBar.UpdateProgress() at ShellProgressBar.ProgressBar.Dispose()

PS: Thank you all for the great job.

Mpdreamz commented 4 years ago

I've updated the Dispose() cursor logic in #57 which I'm fairly positive will fix this.

Keep an eye out for the next release.

Closing this but please comment if you still see this. Thanks for raising this!