Skip to content

Soft reset on plus cursor key input causes crash macOS #6776

@bgshacklett

Description

@bgshacklett

Steps to reproduce

  1. Open the Terminal Application.
  2. Open a PowerShell session if the user's shell is not set to pwsh already:
$ pwsh
PowerShell v6.0.2
Copyright (c) Microsoft Corporation. All rights reserved.

https://aka.ms/pscore6-docs
Type 'help' to get help.

Loading personal and system profiles took 799ms.
~> 
  1. Remove the PSReadline module from the current environment:
~> Remove-Module PSReadLine
~>
  1. Click the Shell menu, then choose the Reset menu item.
  2. Press the up cursor key once; notice that a capital A is entered on the screen.
  3. Press the up cursor key once more.

Expected behavior

PowerShell should continue running.

Actual behavior

PowerShell crashes:

~> FailFast: Specified argument was out of the range of valid values.
Parameter name: startIndex

   at System.Environment.FailFast(System.String, System.Exception)
   at System.Environment.FailFast(System.String, System.Exception)
   at Microsoft.PowerShell.UnmanagedPSEntry.Start(System.String, System.String[], Int32)
   at Microsoft.PowerShell.ManagedPSEntry.Main(System.String[])

Environment data

> $PSVersionTable
Name                           Value
----                           -----
PSVersion                      6.0.2
PSEdition                      Core
GitCommitId                    v6.0.2
OS                             Darwin 17.5.0 Darwin Kernel Version 17.5.0: Fri Apr 13 19:32...
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0, 5.0, 5.1.10032.0, 6.0.2}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions