-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
Issue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productWG-Interactive-IntelliSensetab completiontab completion
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
- Refer to the FAQ.
- Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
on 7.6.0-preview.5
[System.Management.Automation.CompletionCompleters]::CompleteFilename("") throws NullReferenceException
Expected behavior
should returns CompletionResultActual behavior
PS> [System.Management.Automation.CompletionCompleters]::CompleteFilename("")
MethodInvocationException: Exception calling "CompleteFilename" with "1" argument(s): "Object reference not set to an instance of an object."Error details
PS> Get-Error -newest 1
Exception :
Type : System.Management.Automation.MethodInvocationException
ErrorRecord :
Exception :
Type : System.Management.Automation.ParentContainsErrorRecordException
Message : Exception calling "CompleteFilename" with "1" argument(s): "Object reference not set to an instance of an object."
HResult : -2146233087
CategoryInfo : NotSpecified: (:) [], ParentContainsErrorRecordException
FullyQualifiedErrorId : NullReferenceException
InvocationInfo :
ScriptLineNumber : 1
OffsetInLine : 1
HistoryId : 1
Line : [System.Management.Automation.CompletionCompleters]::CompleteFilename("")
Statement : [System.Management.Automation.CompletionCompleters]::CompleteFilename("")
PositionMessage : At line:1 char:1
+ [System.Management.Automation.CompletionCompleters]::CompleteFilename …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CommandOrigin : Internal
ScriptStackTrace : at <ScriptBlock>, <No file>: line 1
TargetSite :
Name : ConvertToMethodInvocationException
DeclaringType : [System.Management.Automation.ExceptionHandlingOps]
MemberType : Method
Module : System.Management.Automation.dll
Message : Exception calling "CompleteFilename" with "1" argument(s): "Object reference not set to an instance of an object."
Data :
System.Management.Automation.Interpreter.InterpretedFrameInfo, System.Management.Automation, Version=7.6.0.5, Culture=neutral, PublicKeyToken=31bf3856ad364e35 : <ScriptBlock>
InnerException :
Type : System.NullReferenceException
TargetSite :
Name : CompleteFilename
DeclaringType : [System.Management.Automation.CompletionCompleters]
MemberType : Method
Module : System.Management.Automation.dll
Message : Object reference not set to an instance of an object.
Source : System.Management.Automation
HResult : -2147467261
StackTrace :
at System.Management.Automation.CompletionCompleters.CompleteFilename(CompletionContext context, Boolean containerOnly, HashSet`1 extension)
at CallSite.Target(Closure, CallSite, Type, String)
Source : System.Management.Automation
HResult : -2146233087
StackTrace :
at System.Management.Automation.ExceptionHandlingOps.ConvertToMethodInvocationException(Exception exception, Type typeToThrow, String methodName, Int32 numArgs, MemberInfo memberInfo)
at CallSite.Target(Closure, CallSite, Type, String)
at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
at System.Management.Automation.Interpreter.DynamicInstruction`3.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
CategoryInfo : NotSpecified: (:) [], MethodInvocationException
FullyQualifiedErrorId : NullReferenceException
InvocationInfo :
ScriptLineNumber : 1
OffsetInLine : 1
HistoryId : 1
Line : [System.Management.Automation.CompletionCompleters]::CompleteFilename("")
Statement : [System.Management.Automation.CompletionCompleters]::CompleteFilename("")
PositionMessage : At line:1 char:1
+ [System.Management.Automation.CompletionCompleters]::CompleteFilename …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CommandOrigin : Internal
ScriptStackTrace : at <ScriptBlock>, <No file>: line 1Environment data
Name Value
---- -----
PSVersion 7.6.0-preview.5
PSEdition Core
GitCommitId 7.6.0-preview.5
OS Ubuntu 24.04.3 LTS
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.4
SerializationVersion 1.1.0.1
WSManStackVersion 3.0Visuals
No response
Metadata
Metadata
Assignees
Labels
Issue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productWG-Interactive-IntelliSensetab completiontab completion