You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Language Server: System.ObjectDisposedException: PriorityProducerConsumer`1 instance is disposed #2387
changed the title [-]Language Server: ystem.ObjectDisposedException: PriorityProducerConsumer`1 instance is disposed[/-][+]Language Server: System.ObjectDisposedException: PriorityProducerConsumer`1 instance is disposed[/+]on Aug 16, 2018
I think I was disposed b/c of the crash and we fixed several. microsoft/PTVS#4645 may also help. I am going to close - please reactivate if you see it again.
Andrey (@dc-avasilev) your issue isn't related to this one. It looks like there's a permission error where your files have file permissions that aren't permissible from the language server. Please open a separate issue and check that your files have file modifications for readability by anyone.
For me this happened after I upgraded WSL to a drvfs supported version, because it happens when saving file to a drfs drive. Earlier all WSL content had rwxrwxrwx file permissions. but the stack trace is terrible, no linenumbers, no external parameters.
I cleaned my workspace and installed vsc v1.27.1, the first time I press save I get the following:
Starting Microsoft Python language server.
Initializing for C:\dist\Python36\python.exe
##########Linting Output - pep8##########
##########Linting Output - pylint##########
[Error - 9:41:00 AM] System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.PythonTools.Interpreter.Ast.AstPythonInterpreter.ImportModule(String name)
at Microsoft.PythonTools.Analysis.ModuleTable.TryImport(String name, ModuleReference& res)
at Microsoft.PythonTools.Analysis.Analyzer.DDG.TryImportModule(String modName, Boolean forceAbsolute, ModuleReference& moduleRef, IReadOnlyList`1& remainingParts)
at Microsoft.PythonTools.Analysis.Analyzer.DDG.Walk(FromImportStatement node)
at Microsoft.PythonTools.Parsing.Ast.FromImportStatement.Walk(PythonWalker walker)
at Microsoft.PythonTools.Analysis.Analyzer.DDG.Walk(SuiteStatement node)
at Microsoft.PythonTools.Parsing.Ast.SuiteStatement.Walk(PythonWalker walker)
at Microsoft.PythonTools.Parsing.Ast.PythonAst.Walk(PythonWalker walker)
at Microsoft.PythonTools.Analysis.AnalysisUnit.AnalyzeWorker(DDG ddg, CancellationToken cancel)
at Microsoft.PythonTools.Analysis.Analyzer.DDG.Analyze(Deque`1 queue, CancellationToken cancel, Action`1 reportQueueSize, Int32 reportQueueInterval)
at Microsoft.PythonTools.Analysis.PythonAnalyzer.AnalyzeQueuedEntries(CancellationToken cancel)
at Microsoft.PythonTools.Intellisense.AnalysisQueue.GroupAnalysis.Analyze(CancellationToken cancel)
at Microsoft.PythonTools.Intellisense.AnalysisQueue.HandleAnalyzable(IAnalyzable item, AnalysisPriority priority, CancellationToken cancellationToken)
at Microsoft.PythonTools.Intellisense.AnalysisQueue.ConsumerLoop()
[Error - 9:41:00 AM] System.ObjectDisposedException: PriorityProducerConsumer`1 instance is disposed
Object name: 'PriorityProducerConsumer`1'.
at Microsoft.PythonTools.Analysis.Infrastructure.DisposeToken.ThrowIfDisposed()
at Microsoft.PythonTools.Analysis.Infrastructure.PriorityProducerConsumer`1.Produce(T value, Int32 priority)
at Microsoft.PythonTools.Intellisense.AnalysisQueue.Enqueue(IAnalyzable item, AnalysisPriority priority)
at Microsoft.PythonTools.Analysis.LanguageServer.Server.OnDocumentChangeProcessingComplete(IDocument doc, VersionCookie vc, Boolean enqueueForAnalysis, AnalysisPriority priority, IDisposable disposeWhenEnqueued)
Activity
MikhailArkhipov commentedon Aug 14, 2018
Alexander Sher (@AlexanderSher) FYI
AlexanderSher commentedon Aug 14, 2018
AnalysisQueueis disposed along with the server or when unhandled exception happens:Serveris subscribed to theAnalysisQueue.UnhandledExceptionand callsServer_OnLogMessage. How do we handle it on VSC side?MikhailArkhipov commentedon Aug 15, 2018
LS dies I guess and then gets restarted by VSC.
AlexanderSher commentedon Aug 15, 2018
So we don't have any traces of that exception?
[-]Language Server: ystem.ObjectDisposedException: PriorityProducerConsumer`1 instance is disposed[/-][+]Language Server: System.ObjectDisposedException: PriorityProducerConsumer`1 instance is disposed[/+]MikhailArkhipov commentedon Aug 21, 2018
I think I was disposed b/c of the crash and we fixed several. microsoft/PTVS#4645 may also help. I am going to close - please reactivate if you see it again.
dc-avasilev commentedon Sep 6, 2018
brettcannon commentedon Sep 6, 2018
Andrey (@dc-avasilev) your issue isn't related to this one. It looks like there's a permission error where your files have file permissions that aren't permissible from the language server. Please open a separate issue and check that your files have file modifications for readability by anyone.
rbu commentedon Sep 7, 2018
Still seeing this with the 2018.8.0 release (please reopen):
It's pretty annoying as it opens the output panel every few minutes while typing.
dc-avasilev commentedon Sep 7, 2018
dc-avasilev commentedon Sep 7, 2018
brettcannon commentedon Sep 7, 2018
Andrey (@dc-avasilev) your issue is still off-topic for this issue. Please open a new issue.
karingula commentedon Sep 12, 2018
same problem here :(
fenchu commentedon Sep 13, 2018
For me this happened after I upgraded WSL to a drvfs supported version, because it happens when saving file to a drfs drive. Earlier all WSL content had rwxrwxrwx file permissions. but the stack trace is terrible, no linenumbers, no external parameters.
fenchu commentedon Sep 13, 2018
I cleaned my workspace and installed vsc v1.27.1, the first time I press save I get the following:
MikhailArkhipov commentedon Sep 13, 2018
microsoft/python-language-server#68 was fixed.
Null ref was fixed with microsoft/python-language-server#88. Closing pending release.