-
Notifications
You must be signed in to change notification settings - Fork 511
Extension crashes on Ctrl+Hover #274
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
Comments
Interesting! That's the first time I've seen this one. Looks like I'm trying to access a file that the process doesn't have authorization to access. Just need to catch that exception. I'm fixing some other bugs today so I'll throw this one in for the next patch update. |
Hey @Glober777, could you gather more logs for me so I could see specifically what kind of path is causing this issue? You can follow these instructions to gather and send your logs. Thanks! |
Hi @daviwil , I've just sent out the logs to your email. Please check. By the way, it seems that the extension crashes not only when I hover the mouse pointer over functions, but for variables as well. Thanks a ton! |
Hey @Glober777, thanks for sending the logs! I've got a fix prepared that should keep the language server from crashing in future cases like this. The issue turned out to be caused by line 426 in your script: . “C:\\Program Files (x86)\\VMware\\Infrastructure\\vSphere PowerCLI\\Scripts\\Initialize-PowerCLIEnvironment.ps1” It looks like some "curly" quotation marks made it into this line of code which caused .NET's path resolution methods to throw an exception. I've added some exception handling and logging to catch this in the future. In the next episode that line shouldn't cause the language server to crash anymore. |
This change resolves an issue that appears when the user edits a script that has dot-sourced script references which contain invalid characters. The fix handles the exceptions that might be thrown in this case and writes out the path details to the log file. Related to PowerShell/vscode-powershell#274.
@daviwil, it works like a charm now. Thank you so much! That line of code has caused me some other issues, but that's another story for another community :) |
@Glober777 awesome, glad to hear it's resolved! |
Hi,
I'm getting the following errors when I hover over the mouse cursor over a cmdlet (implemented within the same module) holding a Ctrl button:
Error: Error from the extension host: channel closed
Error: Extension host terminated unexpectedly. Please reload the window to recover._
Here's the output from the Debugging Tools:
Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: 41008 for rest-client.request
Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: 40998 for rest-client.history
Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: 40993 for extension.convertSelection
Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: 40995 for PowerShell.ExpandAlias
[Extension Host] Congratulations, your extension "pomodoro-code" is now active!
[Extension Host] Windows_NT
[Extension Host] powershell.exe started, pid: 14280, exe: C:\WINDOWS\Sysnative\WindowsPowerShell\v1.0\powershell.exe
[Extension Host] Socket connected!
[Extension Host] powershell.exe - ERROR: C:\Users\seriavio.vscode\extensions\ms-vscode.PowerShell-0.7.1\scripts\Start-EditorServices.ps1 :
[Extension Host] powershell.exe - ERROR: Caught error while waiting for EditorServicesHost to complete:
One or more errors occurred.
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.ProtocolEndpoint.WaitForExit()
at CallSite.Target(Closure , CallSite , Object )
One or more errors occurred.
The given path's format is not supported.
at System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks(String fullPath)
at System.Security.Permissions.FileIOPermission.QuickDemand(FileIOPermissionAccess access, String fullPath, Boolean
checkForDuplicates, Boolean needFullPath)
at Microsoft.PowerShell.EditorServices.Workspace.RecursivelyFindReferences(ScriptFile scriptFile, Dictionary`2 refer
encedScriptFiles)
at Microsoft.PowerShell.EditorServices.Workspace.ExpandScriptReferences(ScriptFile scriptFile)
at Microsoft.PowerShell.EditorServices.LanguageService.d__16.MoveNext()
[Extension Host] powershell.exe - ERROR: --- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerShell.EditorServices.Protocol.Server.LanguageServer.d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.MessageDispatcher.d__34.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.MessageDispatcher.d__33.MoveNext(
)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerShell.EditorServices.Utility.AsyncContext.Start(Func`1 asyncMainFunc)
at System.Threading.Tasks.Task.Execute()
At line:1 char:1
[Extension Host] Uncaught Exception: Error: read ECONNRESET
[Extension Host] Error: read ECONNRESET
at exports._errnoException (util.js:890:11)
at TCP.onread (net.js:552:26)
Extension host terminated unexpectedly. Please reload the window to recover.
Extension host terminated unexpectedly. Code: 7 Signal: null
Error from the extension host: channel closed
Here's what I'm having:
Version 1.4.0
Commit 6276dcb0ae497766056b4c09ea75be1d76a8b679
Date 2016-08-04T16:45:31.680Z
Shell 0.37.6
Renderer 49.0.2623.75
Node 5.10.0
PowerShell Extension: 0.7.1
OS: Windows 10 Anniversary Edition
I've started noticing this just today.
Thanks,
Glober777
The text was updated successfully, but these errors were encountered: