System.ArgumentOutOfRangeException the actual value was -4 #11988

Closed
opened 2026-01-31 03:03:14 +00:00 by claunia · 2 comments
Owner

Originally created by @HermasciousLevander on GitHub (Jan 8, 2021).

Environment

Windows build number: Win32NT 10.0.18363.0 Microsoft Windows NT 10.0.18363.0
Windows Terminal version: 1.3.2651.0

Steps to reproduce

I'm honestly not sure what triggered this bug in the first place, but I'll do my best. Don't know it the terminal has a way to send logs or not, but inform me if it does, I'll see if they are still there once I'm back at work.

I encountered this error when I copied the script mentioned in this post.

I simply selected all the code from the pastebin preview on the post and pasted it into the terminal.

The script ended up being run before Win32_Product -serverName $env:computername -displayName 'partial-app-name' was because of the linebreak.

Expected behavior

Assumed it would not cause an out of range exception.

Actual behavior

Prints this error.

Originally created by @HermasciousLevander on GitHub (Jan 8, 2021). # Environment Windows build number: Win32NT 10.0.18363.0 Microsoft Windows NT 10.0.18363.0 Windows Terminal version: 1.3.2651.0 # Steps to reproduce I'm honestly not sure what triggered this bug in the first place, but I'll do my best. Don't know it the terminal has a way to send logs or not, but inform me if it does, I'll see if they are still there once I'm back at work. I encountered this error when I copied the script mentioned in [this post](https://www.reddit.com/r/PowerShell/comments/3egeo9/can_i_get_the_version_of_an_installed_application/cteve1f/). I simply selected all the code from the pastebin preview on the post and pasted it into the terminal. The script ended up being run before `Win32_Product -serverName $env:computername -displayName 'partial-app-name'` was because of the linebreak. # Expected behavior Assumed it would not cause an out of range exception. # Actual behavior [Prints this error](https://pastebin.com/B2VKvfwp).
Author
Owner

@HermasciousLevander commented on GitHub (Jan 8, 2021):

This error keeps being written to the terminal when I edit parts of the script.

CTRL + C does not cancel, left click produces the error.

Running the script stops the error, so long as you don't go back to it.

@HermasciousLevander commented on GitHub (Jan 8, 2021): This error keeps being written to the terminal when I edit parts of the script. CTRL + C does not cancel, left click produces the error. Running the script stops the error, so long as you don't go back to it.
Author
Owner

@zadjii-msft commented on GitHub (Jan 8, 2021):

The error you shared pretty specifically states:

Oops, something went wrong. Please report this bug with the details below.
Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new

So this looks like a PSReadline error that should be filed over at https://github.com/Powershell/PSReadline ...

@zadjii-msft commented on GitHub (Jan 8, 2021): The error you shared pretty specifically states: > `Oops, something went wrong. Please report this bug with the details below.` > `Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new` So this looks like a PSReadline error that should be filed over at https://github.com/Powershell/PSReadline ...
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#11988