ArgumentOutOfRangeException occurs when an application's output is greater than the console's buffer #6145

Open
opened 2026-01-31 00:30:55 +00:00 by claunia · 0 comments
Owner

Originally created by @SolidKnight on GitHub (Jan 26, 2020).

Environment

Windows build number: Any version of Windows 10
Windows Terminal version (if applicable): Any version of Terminal for Windows (this bug dates back to the first preview)

Any other software?
The Intune Content Prep Tool

Steps to reproduce

  1. Make the Terminal window small.

  2. Use an application such as Intune Content Prep Tool
    https://github.com/microsoft/Microsoft-Win32-Content-Prep-Tool

  3. Using the Intune Content Prep tool as an example, attempt to use the tool.
    E.g. IntuneWinAppUtil.exe -c C:\Temp\Test -s PowerShell-6.2.2-win-x64.msi -o C:\Temp

Expected behavior

The tool would run fine.

Actual behavior

The following error is thrown and the tool crashes

System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension.
Parameter name: targetTop
Actual value was 38.
   at System.Console.MoveBufferArea(Int32 sourceLeft, Int32 sourceTop, Int32 sourceWidth, Int32 sourceHeight, Int32 targetLeft, Int32 targetTop, Char sourceChar, ConsoleColor sourceForeColor, ConsoleColor sourceBackColor)
   at Microsoft.Management.Service.IntuneWinAppUtil.LogUtil.PrintProgress(AppContext context)
   at Microsoft.Management.Service.IntuneWinAppUtil.LogUtil.WriteLine(AppContext context, String text)
   at Microsoft.Management.Service.IntuneWinAppUtil.PackageUtil.CreatePackage(String folder, String setupFile, String outputFolder, String catalogFolder)
   at Microsoft.Management.Service.IntuneWinAppUtil.Program.Main(String[] args)
Originally created by @SolidKnight on GitHub (Jan 26, 2020). # Environment ``` Windows build number: Any version of Windows 10 Windows Terminal version (if applicable): Any version of Terminal for Windows (this bug dates back to the first preview) Any other software? The Intune Content Prep Tool ``` # Steps to reproduce 1. Make the Terminal window small. 2. Use an application such as Intune Content Prep Tool https://github.com/microsoft/Microsoft-Win32-Content-Prep-Tool 3. Using the Intune Content Prep tool as an example, attempt to use the tool. E.g. IntuneWinAppUtil.exe -c C:\Temp\Test -s PowerShell-6.2.2-win-x64.msi -o C:\Temp # Expected behavior The tool would run fine. # Actual behavior The following error is thrown and the tool crashes ``` System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension. Parameter name: targetTop Actual value was 38. at System.Console.MoveBufferArea(Int32 sourceLeft, Int32 sourceTop, Int32 sourceWidth, Int32 sourceHeight, Int32 targetLeft, Int32 targetTop, Char sourceChar, ConsoleColor sourceForeColor, ConsoleColor sourceBackColor) at Microsoft.Management.Service.IntuneWinAppUtil.LogUtil.PrintProgress(AppContext context) at Microsoft.Management.Service.IntuneWinAppUtil.LogUtil.WriteLine(AppContext context, String text) at Microsoft.Management.Service.IntuneWinAppUtil.PackageUtil.CreatePackage(String folder, String setupFile, String outputFolder, String catalogFolder) at Microsoft.Management.Service.IntuneWinAppUtil.Program.Main(String[] args) ```
claunia added the Resolution-ExternalNeeds-Tag-FixNeeds-Attention labels 2026-01-31 00:30:56 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#6145