Skip to content

Editor services crashing when file in use #1499

Closed
@PrzemyslawKlys

Description

@PrzemyslawKlys

System Details

  • Operating system name and version:
  • VS Code version:
  • PowerShell extension version:
  • Output from $PSVersionTable:
PS C:\Users\pklys\OneDrive - Evotec\Support\GitHub\LittleInfrastructureManager\Examples> $pseditor.EditorServicesVersion

Major  Minor  Build  Revision
-----  -----  -----  --------
1      8      3      0


PS C:\Users\pklys\OneDrive - Evotec\Support\GitHub\LittleInfrastructureManager\Examples> code --list-extensions --show-versions
aaron-bond.better-comments@1.2.6
abusaidm.html-snippets@0.2.1
AlanWalk.markdown-toc@1.5.6
alefragnani.Bookmarks@9.0.3
azemoh.one-monokai@0.3.4
ban.spellright@2.5.32
batisteo.vscode-django@0.17.0
bierner.markdown-preview-github-styles@0.1.3
daiyy.quick-html-previewer@0.3.0
DavidAnson.vscode-markdownlint@0.20.0
DavidWang.ini-for-vscode@0.0.4
donjayamanne.githistory@0.4.2
donjayamanne.jupyter@1.1.4
donjayamanne.python-extension-pack@1.4.0
DotJoshJohnson.xml@2.3.2
eamodio.gitlens@8.5.6
emilast.LogFileHighlighter@2.4.0
emmanuelbeziat.vscode-great-icons@2.1.41
Equinusocio.vsc-material-theme@2.3.0
felixfbecker.php-debug@1.12.4
formulahendry.code-runner@0.9.4
gerane.Theme-dimmed-monokai@0.0.2
gharveymn.nightswitch@1.1.0
GrapeCity.gc-excelviewer@2.1.26
hdg.live-html-previewer@0.3.0
hnw.vscode-auto-open-markdown-preview@0.0.4
HookyQR.beautify@1.3.2
IBM.output-colorizer@0.1.2
ikappas.phpcs@1.0.5
ionutvmi.reg@0.0.2
JerryHong.autofilename@0.1.3
joaompinto.asciidoctor-vscode@0.15.1
johnpapa.winteriscoming@0.7.1
Kelvin.vscode-sshfs@1.9.2
kisstkondoros.vscode-codemetrics@1.17.1
KnisterPeter.vscode-github@0.30.0
magicstack.MagicPython@1.0.12
mariorodeghiero.vue-theme@1.1.0
mechatroner.rainbow-csv@0.4.2
mkloubert.vs-deploy@14.0.0
mkloubert.vscode-remote-workspace@0.32.1
ms-mssql.mssql@1.4.0
ms-python.python@2018.7.1
ms-vscode.csharp@1.15.2
ms-vscode.PowerShell@1.8.3
ms-vsliveshare.vsliveshare@0.3.577
ms-vsts.team@1.136.0
quicktype.quicktype@12.0.40
redhat.java@0.29.0
robertohuertasm.vscode-icons@7.25.0
Shan.code-settings-sync@3.1.0
stkb.rewrap@1.9.1
streetsidesoftware.code-spell-checker@1.6.10
streetsidesoftware.code-spell-checker-polish@1.0.0
TomasHubelbauer.zip-file-system@1.0.0
vangware.dark-plus-material@1.3.1
VisualStudioExptTeam.vscodeintellicode@1.0.3
vscjava.vscode-java-debug@0.11.0
vscjava.vscode-java-pack@0.3.0
vscjava.vscode-java-test@0.8.0
vscjava.vscode-maven@0.10.0
WakaTime.vscode-wakatime@1.2.3
wayou.vscode-todo-highlight@1.0.4
whizkydee.material-palenight-theme@1.9.3
wholroyd.jinja@0.0.8
xaver.clang-format@1.6.2
yzhang.markdown-all-in-one@1.6.0
zhuangtongfa.Material-theme@2.15.4
Zignd.html-css-class-completion@1.11.0
openssl config failed: error:02001003:system library:fopen:No such process
PS C:\Users\pklys\OneDrive - Evotec\Support\GitHub\LittleInfrastructureManager\Examples> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.17746.1000
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.17746.1000
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Issue Description

I am experiencing a problem with... Editor Services Crashing. I use VSCode with git but also all files are stored on OneDrive. So it's possible that when I save OneDrive (I'm guessing here) kicks in at same time that Format on Save (since this error happens on Save) and I believe this is related to that.

VERBOSE: Wrote out session file
VERBOSE: 
#-- Waiting for EditorServicesHost to complete execution ---------------------
VERBOSE: ERRORS caught while waiting for EditorServicesHost to complete execution
VERBOSE: One or more errors occurred.
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at CallSite.Target(Closure , CallSite , Object )
VERBOSE: One or more errors occurred.
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at CallSite.Target(Closure , CallSite , Object )
One or more errors occurred.
VERBOSE: One or more errors occurred.
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at CallSite.Target(Closure , CallSite , Object )
One or more errors occurred.

The process cannot access the file 'c:\Users\pklys\OneDrive - Evotec\Support\GitHub\LittleInfrastructureManager\Examples\TaskScheduled-InfraManager.ps1' because it is being used by another process.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
   at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost)
   at Microsoft.PowerShell.EditorServices.LanguageService.<FindReferencesOfSymbol>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.PowerShell.EditorServices.CodeLenses.ReferencesCodeLensProvider.<ResolveCodeLensAsync>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.PowerShell.EditorServices.CodeLenses.CodeLensFeature.<HandleCodeLensResolveRequest>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.MessageDispatcher.<DispatchMessage>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.ProtocolEndpoint.<ListenForMessages>d__36.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.PowerShell.EditorServices.Utility.AsyncContext.Start(Func`1 asyncMainFunc, ILogger logger)
   at System.Threading.Tasks.Task.Execute()
PS>$global:?
True
**********************
Windows PowerShell transcript end
End time: 20180827215048
**********************

Attached Logs

Follow the instructions in the README
about capturing and sending logs.

EditorServices.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions