Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

CommandCompletion CompleteInput : NullReferenceException #19912

Copy link
Copy link
@fMichaleczek

Description

@fMichaleczek
Issue body actions

Prerequisites

Steps to reproduce

I develop an UI app with dotnet sdk 8.0.100-preview.5.23303.2
I am using the workaround for this SDK because there is a problem with MMI :

<RuntimeHostConfigurationOption Include="System.Runtime.Loader.UseRidGraph" Value="true" />

But when I migrate from PowerShell 7.4.0-preview.3 to 7.4.0-preview.4, I am experiencing a NullReference exception with the API System.Management.Automation.CommandCompletion.CompleteInput

var completion = CommandCompletion.CompleteInput(text, caretOffset, new Hashtable());

Expected behavior

It works.

Actual behavior

It failed.

Error details

System.NullReferenceException: 'Object reference not set to an instance of an object.'
   at System.Management.Automation.CommandCompletion.CompleteInputImpl(Ast ast, Token[] tokens, IScriptPosition positionOfCursor, Hashtable options)
   at System.Management.Automation.CommandCompletion.CompleteInput(String input, Int32 cursorIndex, Hashtable options)

Environment data

Name                           Value
----                           -----
PSVersion                      7.4.0-preview.4
PSEdition                      Core
GitCommitId                    7.4.0-preview.4
OS                             Microsoft Windows 10.0.22621
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

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    In-PRIndicates that a PR is out for the issueIndicates that a PR is out for the issueResolution-FixedThe issue is fixed.The issue is fixed.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.