question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Language Server: System.ObjectDisposedException: PriorityProducerConsumer`1 instance is disposed

See original GitHub issue

Latest Insiders vscode-pythong: 2018.8.0-alpha1

creating a new class the language server produced following to OUtput.

[Info - 7:14:27 AM] Found 28 completions for file:///p:/perforce_Playground/derekw_de02-1777_rce_dev/del.py at (13, 17) after filtering [Error - 7:14:29 AM] System.ObjectDisposedException: PriorityProducerConsumer1 instance is disposed Object name: 'PriorityProducerConsumer1’. 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)

Code when crash happened image

Outline is all wrong at the crash point. image

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:15 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
rbucommented, Sep 7, 2018

Still seeing this with the 2018.8.0 release (please reopen):

[Error - 11:39:04 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.Analysis.LanguageServer.Server.OnDocumentChangeProcessingComplete(IDocument doc, VersionCookie vc, Boolean enqueueForAnalysis, AnalysisPriority priority, IDisposable disposeWhenEnqueued)

It’s pretty annoying as it opens the output panel every few minutes while typing.

0reactions
MikhailArkhipovcommented, Sep 13, 2018
Read more comments on GitHub >

github_iconTop Results From Across the Web

PriorityProducerConsumer`1 instance is disposed · Issue #68 ...
Language Server : System.ObjectDisposedException: PriorityProducerConsumer`1 instance is disposed microsoft/vscode-python#2387.
Read more >
Getting System.ObjectDisposedException when redirecting ...
ObjectDisposedException : 'Cannot access a disposed object. A common cause of this error is disposing a context that was resolved from dependency ...
Read more >
Language Server Protocol Specification - 3.17
The language server protocol defines a set of JSON-RPC request, response and notification messages which are exchanged using the above base protocol. This ......
Read more >
ServiceModel ObjectDisposedException - MSDN - Microsoft
The error message itself indcates that your service code is trying to access an object instance which has been disposed. As you said...
Read more >
Language Server Extension Guide - Visual Studio Code
This section contributes configuration settings to VS Code. The example will explain how these settings are sent over to the language server on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found