vscode-powershell icon indicating copy to clipboard operation
vscode-powershell copied to clipboard

Oops something went wrong

Open dsolodow opened this issue 1 year ago • 1 comments

Prerequisites

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

Exception report

An error occurred while running the REPL loop:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken, Nullable`1 lastRunStatus)
   at Microsoft.PowerShell.EditorServices.Services.PowerShell.Console.PsrlReadLine.InvokePSReadLine(CancellationToken cancellationToken)
   at Microsoft.PowerShell.EditorServices.Services.PowerShell.Execution.SynchronousDelegateTask`1.Run(CancellationToken cancellationToken)
   at Microsoft.PowerShell.EditorServices.Services.PowerShell.Execution.SynchronousTask`1.ExecuteSynchronously(CancellationToken executorCancellationToken)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.PowerShell.EditorServices.Services.PowerShell.Execution.SynchronousTask`1.get_Result()
   at Microsoft.PowerShell.EditorServices.Services.PowerShell.Console.PsrlReadLine.ReadLine(CancellationToken cancellationToken)
   at Microsoft.PowerShell.EditorServices.Services.PowerShell.Host.PsesInternalHost.InvokeReadLine(CancellationToken cancellationToken)
   at Microsoft.PowerShell.EditorServices.Services.PowerShell.Host.PsesInternalHost.DoOneRepl(CancellationToken cancellationToken)

Screenshot

image

Environment data

PS Version: 5.1.26100.1591
PS HostName: Visual Studio Code Host
PSReadLine Version: 2.4.0-beta0
PSReadLine EditMode: Windows
OS: 10.0.26100.1 (WinBuild.160101.0800)
BufferWidth: 192
BufferHeight: 24

Steps to reproduce

session had been left running. started entering a simple command (it pulled from the psreadline history) and the error occurred

Expected behavior

correctly typed command shouldn't error

Actual behavior

Exception above occurred

dsolodow avatar Sep 23 '24 13:09 dsolodow

Does it occur with PowerShell 7? Windows PowerShell support is on a best effort basis.

andyleejordan avatar Sep 23 '24 20:09 andyleejordan