PowerShell / PowerShell/vscode-powershell

Oops something went wrong

Open
#5,051 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1.9k
Forks
547
PR merge metrics
No merged PRs in 30d

Description

Prerequisites
  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • 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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the PSReadLine ReadLine entry point and the exception stack trace, using the Visual Studio Code Host and the listed PSReadLine and PowerShell versions as the reproduction context. The issue does not identify a source file or test, and the vague reproduction will need to be made reliable before confirming that normal command entry no longer raises the exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell, vscode
Domain
cli, developer-experience
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.