Crash in small terminal window
还没有人认领这个 Issue。
评估
调研方向
首先,在较小的 Windows 终端中运行 NewLocaleCommand,重现崩溃,然后跟踪经过 PromptHelper.PromptValue 和 Sharprompt's DefaultConsoleDriver.ClearLine 的调用栈。将其行为与 shibayan/Sharprompt#283 进行比较;完成的标准是终端较小时 prompt 不再抛出 ArgumentOutOfRangeException。
由索引模型根据 Issue 内容生成。
描述
Brief description of your issue
Steps to reproduce
shibayan/Sharprompt#283
Expected behavior
N/A
Actual behavior
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> 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 41.
at System.ConsolePal.SetCursorPosition(Int32 left, Int32 top)
at Sharprompt.Drivers.DefaultConsoleDriver.SetCursorPosition(Int32 left, Int32 top)
at Sharprompt.Drivers.DefaultConsoleDriver.ClearLine(Int32 top)
at Sharprompt.Internal.OffscreenBuffer.ClearConsole(Int32 cursorBottom, Int32 writtenLineCount)
at Sharprompt.Internal.RenderScope.Dispose()
at Sharprompt.Forms.FormRenderer.Render[TModel](Action`2 template, TModel result)
at Sharprompt.Forms.FormRenderer.Render[TModel](Action`2 template, TModel result)
at Sharprompt.Forms.FormBase`1.Start()
at Sharprompt.Prompt.Input[T](InputOptions`1 options)
at Sharprompt.Prompt.Input[T](Action`1 configure)
at Sharprompt.Prompt.Input[T](String message, Object defaultValue, String placeholder, IList`1 validators)
at Microsoft.WingetCreateCLI.PromptHelper.PromptValue[T](String message, Object model, String memberName, T instance)
at InvokeStub_PromptHelper.PromptValue(Object, Span`1)
at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
--- End of inner exception stack trace ---
at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at Microsoft.WingetCreateCLI.PromptHelper.PromptPropertyAndSetValue[T](Object model, String memberName, T instance, Int32 minimum, Object validationModel, String validationName)
at Microsoft.WingetCreateCLI.Commands.BaseCommand.PromptOptionalProperties[T](T manifest, List`1 optionalPropertiesNames)
at Microsoft.WingetCreateCLI.Commands.NewLocaleCommand.GenerateLocaleManifest(Manifests originalManifests, LocaleManifest referenceLocaleManifest)
at Microsoft.WingetCreateCLI.Commands.NewLocaleCommand.Execute()
at Microsoft.WingetCreateCLI.Program.Main(String[] args)
Environment
wingetcreate.exe info
PS C:\Users\tbyta\GitHub\winget-pkgs\manifests\m\Microsoft\Sysinternals\Whois\1.21> wingetcreate.exe info
Windows 程序包管理器清单创建程序 v1.12.13.0
Copyright (c) Microsoft Corporation. All rights reserved.
操作系统: Microsoft Windows NT 10.0.26200.0
系统体系结构: Arm64
Winget-Create 目录 路径
---------------------------------------------------------------------------------------------------------------------------------
日志 %LOCALAPPDATA%\Packages\Microsoft.WindowsPackageManagerManifestCreator_8wekyb3d8bbwe\LocalState\DiagOutputDir
用户设置 %LOCALAPPDATA%\Packages\Microsoft.WindowsPackageManagerManifestCreator_8wekyb3d8bbwe\LocalState\settings.json
安装程序缓存 %TEMP%\wingetcreate
链接
----------------------------------------------------
隐私声明 https://aka.ms/winget-create-privacy
许可协议 https://aka.ms/winget-create-license
第三方声明 https://aka.ms/winget-create-3rdPartyNotice
主页 https://aka.ms/winget-create
- 主要语言
- C#
- 星标
- 651
- 派生
- 114
- 平均合并
- 10 小时 37 分钟
- 30 天内合并 PR
- 2
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/winget-create 的其他 Issue
-
Issue-Docs Needs-Triage
难度 2/5 1-3 小时 新手友好度 72/100
microsoft/winget-create#705 ·
-
Issue-Feature Needs-Triage
难度 2/5 1-3 小时 新手友好度 65/100
microsoft/winget-create#680 ·
-
Needs-Triage
难度 3/5 1-2 天 新手友好度 68/100
microsoft/winget-create#706 ·
-
Issue-Feature Needs-Triage
难度 4/5 3-5 天 新手友好度 52/100
microsoft/winget-create#701 ·
-
Issue-Feature Needs-Triage
难度 3/5 1-2 天 新手友好度 68/100
microsoft/winget-create#700 ·
查看 microsoft/winget-create 的全部 Issue
相似的 Issue
-
bug P3
难度 2/5 1-3 小时 新手友好度 88/100
nightscout/nocturne#1908 ·
维护者通常 1 天内回复
-
bug documentation Needs: Triage :mag:
难度 2/5 1-3 小时 新手友好度 78/100
-
WPF: each page's `Title` overwrites the window title, and returning to a page does not restore it未关闭
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
agentic-workflows area/Docs partner/agentic-workflows
难度 1/5 1 小时以内 新手友好度 82/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
jamesmontemagno/tiny-clips#378 · 2 条评论 ·
维护者通常 1 天内回复