Skip to content

System.ArgumentOutOfRangeException: 该值必须大于或等 于零,且必须小于控制台缓冲区在该维度的大小。 #4727

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 tasks done
plmxs2019 opened this issue Apr 30, 2025 · 1 comment

Comments

@plmxs2019
Copy link

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues, especially the pinned issues.

Exception report

哎呀,出现问题。请在报告此 Bug 时添加以下详细信息。 
在 GitHub 上报告: https://github.com/lzybkr/PSReadLine/issues/new
-----------------------------------------------------------------------
上 200 个密钥:
 p s / p y t h o n 3 . 1 1 . e x e Space " d : / 公 
共 测 试 平 台 / 测 试 用 例 / 测 试 用 例 / t e s t _ s u b j e c t Space 为 中 文 与 特 殊 字 符 混 合
 添 加 用 例 . p y " Enter
 Ctrl+c & Space C : / U s e r s / z h a n g w e i b 
i n g / A p p D a t a / L o c a l / M i c r o s o f 
t / W i n d o w s A p p s / p y t h o n 3 . 1 1 . e 
x e Space " d : / 公 共 测 试 平 台 / 测 试 用 例 / 
测 试 用 例 / t e s t _ s u b j e c t Space 为 中 文
 与 特 殊 字 符 混 合 添 加 用 例 . p y " Enter     


异常:
System.ArgumentOutOfRangeException: 该值必须大于或等
于零,且必须小于控制台缓冲区在该维度的大小。        
参数名: top
实际值是 -3。
   在 System.Console.SetCursorPosition(Int32 left, Int32 top)
   在 Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)   
   在 Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
   在 Microsoft.PowerShell.PSConsoleReadLine.Insert(Char c)
   在 Microsoft.PowerShell.PSConsoleReadLine.SelfInsert(Nullable`1 key, Object arg)
   在 Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
   在 Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
   在 Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)
-----------------------------------------------------------------------

Screenshot

哎呀,出现问题。请在报告此 Bug 时添加以下详细信息。
在 GitHub 上报告: https://github.com/lzybkr/PSReadLine/issues/new

上 200 个密钥:
p s / p y t h o n 3 . 1 1 . e x e Space " d : / 公
共 测 试 平 台 / 测 试 用 例 / 测 试 用 例 / t e s t _ s u b j e c t Space 为 中 文 与 特 殊 字 符 混 合
添 加 用 例 . p y " Enter
Ctrl+c & Space C : / U s e r s / z h a n g w e i b
i n g / A p p D a t a / L o c a l / M i c r o s o f
t / W i n d o w s A p p s / p y t h o n 3 . 1 1 . e
x e Space " d : / 公 共 测 试 平 台 / 测 试 用 例 /
测 试 用 例 / t e s t _ s u b j e c t Space 为 中 文
与 特 殊 字 符 混 合 添 加 用 例 . p y " Enter

异常:
System.ArgumentOutOfRangeException: 该值必须大于或等
于零,且必须小于控制台缓冲区在该维度的大小。
参数名: top
实际值是 -3。
在 System.Console.SetCursorPosition(Int32 left, Int32 top)
在 Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
在 Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
在 Microsoft.PowerShell.PSConsoleReadLine.Insert(Char c)
在 Microsoft.PowerShell.PSConsoleReadLine.SelfInsert(Nullable1 key, Object arg) 在 Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
在 Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
在 Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)

Environment data

哎呀,出现问题。请在报告此 Bug 时添加以下详细信息。 
在 GitHub 上报告: https://github.com/lzybkr/PSReadLine/issues/new
-----------------------------------------------------------------------
上 200 个密钥:
 p s / p y t h o n 3 . 1 1 . e x e Space " d : / 公 
共 测 试 平 台 / 测 试 用 例 / 测 试 用 例 / t e s t _ s u b j e c t Space 为 中 文 与 特 殊 字 符 混 合
 添 加 用 例 . p y " Enter
 Ctrl+c & Space C : / U s e r s / z h a n g w e i b 
i n g / A p p D a t a / L o c a l / M i c r o s o f 
t / W i n d o w s A p p s / p y t h o n 3 . 1 1 . e 
x e Space " d : / 公 共 测 试 平 台 / 测 试 用 例 / 
测 试 用 例 / t e s t _ s u b j e c t Space 为 中 文
 与 特 殊 字 符 混 合 添 加 用 例 . p y " Enter     


异常:
System.ArgumentOutOfRangeException: 该值必须大于或等
于零,且必须小于控制台缓冲区在该维度的大小。        
参数名: top
实际值是 -3。
   在 System.Console.SetCursorPosition(Int32 left, Int32 top)
   在 Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)   
   在 Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
   在 Microsoft.PowerShell.PSConsoleReadLine.Insert(Char c)
   在 Microsoft.PowerShell.PSConsoleReadLine.SelfInsert(Nullable`1 key, Object arg)
   在 Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
   在 Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
   在 Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)
-----------------------------------------------------------------------

Steps to reproduce

哎呀,出现问题。请在报告此 Bug 时添加以下详细信息。
在 GitHub 上报告: https://github.com/lzybkr/PSReadLine/issues/new

上 200 个密钥:
p s / p y t h o n 3 . 1 1 . e x e Space " d : / 公
共 测 试 平 台 / 测 试 用 例 / 测 试 用 例 / t e s t _ s u b j e c t Space 为 中 文 与 特 殊 字 符 混 合
添 加 用 例 . p y " Enter
Ctrl+c & Space C : / U s e r s / z h a n g w e i b
i n g / A p p D a t a / L o c a l / M i c r o s o f
t / W i n d o w s A p p s / p y t h o n 3 . 1 1 . e
x e Space " d : / 公 共 测 试 平 台 / 测 试 用 例 /
测 试 用 例 / t e s t _ s u b j e c t Space 为 中 文
与 特 殊 字 符 混 合 添 加 用 例 . p y " Enter

异常:
System.ArgumentOutOfRangeException: 该值必须大于或等
于零,且必须小于控制台缓冲区在该维度的大小。
参数名: top
实际值是 -3。
在 System.Console.SetCursorPosition(Int32 left, Int32 top)
在 Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
在 Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
在 Microsoft.PowerShell.PSConsoleReadLine.Insert(Char c)
在 Microsoft.PowerShell.PSConsoleReadLine.SelfInsert(Nullable1 key, Object arg) 在 Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
在 Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
在 Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)

Expected behavior

哎呀,出现问题。请在报告此 Bug 时添加以下详细信息。
在 GitHub 上报告: https://github.com/lzybkr/PSReadLine/issues/new

上 200 个密钥:
p s / p y t h o n 3 . 1 1 . e x e Space " d : / 公
共 测 试 平 台 / 测 试 用 例 / 测 试 用 例 / t e s t _ s u b j e c t Space 为 中 文 与 特 殊 字 符 混 合
添 加 用 例 . p y " Enter
Ctrl+c & Space C : / U s e r s / z h a n g w e i b
i n g / A p p D a t a / L o c a l / M i c r o s o f
t / W i n d o w s A p p s / p y t h o n 3 . 1 1 . e
x e Space " d : / 公 共 测 试 平 台 / 测 试 用 例 /
测 试 用 例 / t e s t _ s u b j e c t Space 为 中 文
与 特 殊 字 符 混 合 添 加 用 例 . p y " Enter

异常:
System.ArgumentOutOfRangeException: 该值必须大于或等
于零,且必须小于控制台缓冲区在该维度的大小。
参数名: top
实际值是 -3。
在 System.Console.SetCursorPosition(Int32 left, Int32 top)
在 Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
在 Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
在 Microsoft.PowerShell.PSConsoleReadLine.Insert(Char c)
在 Microsoft.PowerShell.PSConsoleReadLine.SelfInsert(Nullable1 key, Object arg) 在 Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
在 Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
在 Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)

Actual behavior

哎呀,出现问题。请在报告此 Bug 时添加以下详细信息。
在 GitHub 上报告: https://github.com/lzybkr/PSReadLine/issues/new

上 200 个密钥:
p s / p y t h o n 3 . 1 1 . e x e Space " d : / 公
共 测 试 平 台 / 测 试 用 例 / 测 试 用 例 / t e s t _ s u b j e c t Space 为 中 文 与 特 殊 字 符 混 合
添 加 用 例 . p y " Enter
Ctrl+c & Space C : / U s e r s / z h a n g w e i b
i n g / A p p D a t a / L o c a l / M i c r o s o f
t / W i n d o w s A p p s / p y t h o n 3 . 1 1 . e
x e Space " d : / 公 共 测 试 平 台 / 测 试 用 例 /
测 试 用 例 / t e s t _ s u b j e c t Space 为 中 文
与 特 殊 字 符 混 合 添 加 用 例 . p y " Enter

异常:
System.ArgumentOutOfRangeException: 该值必须大于或等
于零,且必须小于控制台缓冲区在该维度的大小。
参数名: top
实际值是 -3。
在 System.Console.SetCursorPosition(Int32 left, Int32 top)
在 Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
在 Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
在 Microsoft.PowerShell.PSConsoleReadLine.Insert(Char c)
在 Microsoft.PowerShell.PSConsoleReadLine.SelfInsert(Nullable1 key, Object arg) 在 Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
在 Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
在 Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Apr 30, 2025
Copy link

This issue was already fixed (see #1306). Please upgrade to the 2.3.5 version of PSReadLine from PowerShell Gallery.
See the upgrading section for instructions. Please let us know if you run into the same issue with the latest version.

@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Apr 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant