Prerequisites
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 window
Actual 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.0
Visuals
No response
Prerequisites
Steps to reproduce
Get-Help ...\ScriptWithCommentBasedHelp.ps1 -ShowWindowtriggers an unhandled exception in 7.4.0-preview.4, but works fine with 7.3.6Repro script:
ScriptWithCommentBasedHelp.zip
Expected behavior
Actual behavior
Error details
No response
Environment data
Visuals
No response