-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
In-PRIndicates that a PR is out for the issueIndicates that a PR is out for the issueIssue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productWG-Interactive-HelpSystemhelp infrastructure and formatting of helphelp infrastructure and formatting of help
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
- Refer to the FAQ.
- Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
Get-Help ...\ScriptWithCommentBasedHelp.ps1 -ShowWindow triggers an unhandled exception in 7.4.0-preview.4, but works fine with 7.3.6
Repro script:
ScriptWithCommentBasedHelp.zip
Expected behavior
Get-Help ...\ScriptWithCommentBasedHelp.ps1 -ShowWindow
# no error, help is displayed in separate windowActual behavior
Get-Help ...\ScriptWithCommentBasedHelp.ps1 -ShowWindow
An error has occurred that was not properly handled. Additional information is shown below. The PowerShell process will exit.
Unhandled exception. System.ArgumentOutOfRangeException: 1 ('1') must be greater than or equal to '8'. (Parameter '1')
Actual value was 1.
at System.ArgumentOutOfRangeException.ThrowLess[T](String paramName, T value, T other)
at System.ArgumentOutOfRangeException.ThrowIfLessThan[T](T value, T other, String paramName)
at Microsoft.Management.UI.Internal.ParagraphBuilder.TextSpan..ctor(Int32 start, Int32 length)
at Microsoft.Management.UI.Internal.ParagraphBuilder.AddText(String str, Boolean bold)
at Microsoft.Management.UI.Internal.HelpParagraphBuilder.AddStringSection(Boolean setting, String sectionName, String sectionTitle)
at Microsoft.Management.UI.Internal.HelpParagraphBuilder.AddTextToParagraphBuilder()
at Microsoft.Management.UI.Internal.HelpViewModel..ctor(PSObject psObj, Paragraph documentParagraph)
at Microsoft.Management.UI.HelpWindow..ctor(PSObject helpObject)
at Microsoft.PowerShell.Commands.Internal.HelpWindowHelper.<>c__DisplayClass0_0.<ShowHelpWindow>b__1()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
[process exited with code 3762504530 (0xe0434352)]
You can now close this terminal with Ctrl+D, or press Enter to restart.Error details
No response
Environment data
Name Value
---- -----
PSVersion 7.4.0-preview.4
PSEdition Core
GitCommitId 7.4.0-preview.4
OS Microsoft Windows 10.0.19045
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0Visuals
No response
mklement0 and kasini3000
Metadata
Metadata
Assignees
Labels
In-PRIndicates that a PR is out for the issueIndicates that a PR is out for the issueIssue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productWG-Interactive-HelpSystemhelp infrastructure and formatting of helphelp infrastructure and formatting of help