Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intermittent CodeLens crash #1471

Closed
rjmholt opened this issue Aug 7, 2018 · 0 comments · Fixed by PowerShell/PowerShellEditorServices#732
Closed

Intermittent CodeLens crash #1471

rjmholt opened this issue Aug 7, 2018 · 0 comments · Fixed by PowerShell/PowerShellEditorServices#732
Assignees
Labels
Area-Pester Issue-Bug A bug to squash.

Comments

@rjmholt
Copy link
Contributor

rjmholt commented Aug 7, 2018

System Details

  • Operating system name and version:
OS Name:                   Microsoft Windows 10 Enterprise Insider Preview
OS Version:                10.0.18214 N/A Build 18214
  • VS Code version:
> code-insiders --version
1.26.0-insider
c2ddece6536330f4b4ceef33de5eea6e406fb30a
x64
  • PowerShell extension version: 1.8.2

  • Output from $PSVersionTable:

> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      6.1.0-preview.4
PSEdition                      Core
GitCommitId                    6.1.0-preview.4
OS                             Microsoft Windows 10.0.18214
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Issue Description

The PowerShell backend seems to be crashing every so often. Looks like a file that is generated by the build gets deleted by a cleanup rule and when it does the CodeLens falls over.

Attached Logs

2018-08-07 14:43:41.867 [ERROR] C:\PowerShellEditorServices\src\PowerShellEditorServices.Protocol\MessageProtocol\ProtocolEndpoint.cs: In method 'OnListenTaskCompleted', line 391:
    ProtocolEndpoint message loop terminated due to unhandled exception:
    
    System.AggregateException: One or more errors occurred. (Could not find a part of the path 'c:\Users\roholt\Documents\Dev\PowerShell\src\powershell-win-core\bin\Release\netcoreapp2.1\win7-x64\Modules\CimCmdlets\CimCmdlets.psd1'.) ---> System.IO.DirectoryNotFoundException: Could not find a part of the path 'c:\Users\roholt\Documents\Dev\PowerShell\src\powershell-win-core\bin\Release\netcoreapp2.1\win7-x64\Modules\CimCmdlets\CimCmdlets.psd1'.
       at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle)
       at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
       at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize)
       at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks)
       at System.IO.File.InternalReadAllText(String path, Encoding encoding)
       at System.IO.File.ReadAllText(String path)
       at Microsoft.PowerShell.EditorServices.LanguageService.FindReferencesOfSymbol(SymbolReference foundSymbol, ScriptFile[] referencedFiles, Workspace workspace)
       at Microsoft.PowerShell.EditorServices.CodeLenses.ReferencesCodeLensProvider.ResolveCodeLensAsync(CodeLens codeLens, CancellationToken cancellationToken)
       at Microsoft.PowerShell.EditorServices.CodeLenses.CodeLensFeature.HandleCodeLensResolveRequest(CodeLens codeLens, RequestContext`1 requestContext)
       at Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.MessageDispatcher.DispatchMessage(Message messageToDispatch, MessageWriter messageWriter)
       at Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.ProtocolEndpoint.ListenForMessages(CancellationToken cancellationToken)
       at Microsoft.PowerShell.EditorServices.Utility.AsyncContext.Start(Func`1 asyncMainFunc, ILogger logger)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
    --- End of stack trace from previous location where exception was thrown ---
       at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
       --- End of inner exception stack trace ---
    ---> (Inner Exception #0) System.IO.DirectoryNotFoundException: Could not find a part of the path 'c:\Users\roholt\Documents\Dev\PowerShell\src\powershell-win-core\bin\Release\netcoreapp2.1\win7-x64\Modules\CimCmdlets\CimCmdlets.psd1'.
       at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle)
       at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
       at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize)
       at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks)
       at System.IO.File.InternalReadAllText(String path, Encoding encoding)
       at System.IO.File.ReadAllText(String path)
       at Microsoft.PowerShell.EditorServices.LanguageService.FindReferencesOfSymbol(SymbolReference foundSymbol, ScriptFile[] referencedFiles, Workspace workspace)
       at Microsoft.PowerShell.EditorServices.CodeLenses.ReferencesCodeLensProvider.ResolveCodeLensAsync(CodeLens codeLens, CancellationToken cancellationToken)
       at Microsoft.PowerShell.EditorServices.CodeLenses.CodeLensFeature.HandleCodeLensResolveRequest(CodeLens codeLens, RequestContext`1 requestContext)
       at Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.MessageDispatcher.DispatchMessage(Message messageToDispatch, MessageWriter messageWriter)
       at Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.ProtocolEndpoint.ListenForMessages(CancellationToken cancellationToken)
       at Microsoft.PowerShell.EditorServices.Utility.AsyncContext.Start(Func`1 asyncMainFunc, ILogger logger)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
    --- End of stack trace from previous location where exception was thrown ---
       at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)<---
    

2018-08-07 14:43:41.867 [ERROR] C:\PowerShellEditorServices\src\PowerShellEditorServices.Host\EditorServicesHost.cs: In method 'ProtocolEndpoint_UnhandledException', line 435:
    PowerShell Editor Services is terminating due to an unhandled exception, see previous logs for details.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Pester Issue-Bug A bug to squash.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants