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

[BUG] Exception is thrown #1442

Closed
skleg opened this issue Sep 8, 2024 · 4 comments
Closed

[BUG] Exception is thrown #1442

skleg opened this issue Sep 8, 2024 · 4 comments
Assignees
Labels
area-roslyn bug Something isn't working

Comments

@skleg
Copy link

skleg commented Sep 8, 2024

Describe the Issue

=====================
08/09/2024 12:29:34
LimitedFunctionality
System.AggregateException: Project system data flow 'Workspace update handler 36152495' closed because of an exception: Cannot access a disposed object.
Object name: 'StreamJsonRpc.JsonRpc'.. (Cannot access a disposed object.
Object name: 'StreamJsonRpc.JsonRpc'.)
---> (Inner Exception #0) StreamJsonRpc.RemoteInvocationException: Cannot access a disposed object.
Object name: 'StreamJsonRpc.JsonRpc'.
at StreamJsonRpc.JsonRpc.InvokeCoreAsync[TResult](RequestId id, String targetName, IReadOnlyList1 arguments, IReadOnlyList1 positionalArgumentDeclaredTypes, IReadOnlyDictionary2 namedArgumentDeclaredTypes, CancellationToken cancellationToken, Boolean isParameterObject) at Microsoft.VisualStudio.ProjectSystem.VSCode.LanguageServices.Handlers.DynamicItemHandler.<>c__DisplayClass6_0.<<HandleProjectChangeAsync>g__ProcessAdditionsAsync|4>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.VisualStudio.ProjectSystem.VSCode.LanguageServices.Handlers.DynamicItemHandler.HandleProjectChangeAsync(IWorkspaceProject context, IComparable version, IProjectChangeDescription projectChange, ContextState state, ITelemetryOperation telemetryOperation, IManagedProjectDiagnosticOutputService logger) at Microsoft.VisualStudio.ProjectSystem.VSCode.LanguageServices.Handlers.DynamicItemHandler.HandleAsync(IWorkspaceProject context, IComparable version, IImmutableDictionary2 projectChanges, ContextState state, ITelemetryOperation telemetryOperation, IManagedProjectDiagnosticOutputService logger)
at Microsoft.VisualStudio.ProjectSystem.VSCode.LanguageServices.Workspace.<>c__DisplayClass43_1.<g__ProcessSourceItemsHandlersAsync|6>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.VisualStudio.ProjectSystem.VSCode.LanguageServices.Workspace.<>c__DisplayClass43_0.<g__ApplyProjectEvaluationAsync|2>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.VisualStudio.ProjectSystem.VSCode.LanguageServices.Workspace.<>c__DisplayClass46_11.<<OnProjectChangedAsync>g__ApplyInBatchAsync|1>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.VisualStudio.Threading.ReentrantSemaphore.StackSemaphore.<>c__DisplayClass3_0.<<ExecuteAsync>b__0>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.VisualStudio.Threading.ReentrantSemaphore.StackSemaphore.ExecuteAsync(Func1 operation, CancellationToken cancellationToken)
at Microsoft.VisualStudio.ProjectSystem.OnceInitializedOnceDisposedUnderLockAsync.ExecuteUnderLockCoreAsync(Func2 action, CancellationToken cancellationToken) at Microsoft.VisualStudio.ProjectSystem.VSCode.LanguageServices.Workspace.OnEvaluationUpdateAsync(IProjectVersionedValue1 evaluationUpdate)
at Microsoft.VisualStudio.ProjectSystem.VSCode.LanguageServices.Workspace.<>c__DisplayClass42_0.<g__ApplyUpdateWithinLockAsync|1>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.VisualStudio.ProjectSystem.VSCode.LanguageServices.Workspace.<>c__DisplayClass42_0.<g__ApplyUpdateWithinLockAsync|1>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.VisualStudio.ProjectSystem.VSCode.LanguageServices.Workspace.<>c__DisplayClass42_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.VisualStudio.Threading.ReentrantSemaphore.StackSemaphore.<>c__DisplayClass3_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.VisualStudio.Threading.ReentrantSemaphore.StackSemaphore.ExecuteAsync(Func1 operation, CancellationToken cancellationToken) at Microsoft.VisualStudio.ProjectSystem.OnceInitializedOnceDisposedUnderLockAsync.ExecuteUnderLockCoreAsync(Func2 action, CancellationToken cancellationToken)
at Microsoft.VisualStudio.ProjectSystem.DataReceivingBlockSlim`1.ProcessInputQueueAsync(InputDataBuffer inputQueue)
<--- (Inner Exception #0)

Steps To Reproduce

Happens sporadically

Expected Behavior

No response

Environment Information

  • Mac OS Sonoma
  • VS Code v 1.93.0
@skleg skleg added the bug Something isn't working label Sep 8, 2024
@phil-allen-msft phil-allen-msft added the area-project Project load, Solution Explorer label Sep 10, 2024
@kvenkatrajan kvenkatrajan added area-roslyn and removed area-project Project load, Solution Explorer labels Sep 11, 2024
@kvenkatrajan
Copy link

FYI - @arkalyanms

@dibarbet
Copy link
Member

I suspect this might be caused by dotnet/vscode-csharp#7514

@skleg - two requests

  1. Let me know if C# extension version 2.45.25 fixes the issue
  2. If it does not, please set dotnet.server.trace to Trace, and attach the 'C#' output window logs here the next time it happens.

@skleg
Copy link
Author

skleg commented Sep 18, 2024

Thanks @dibarbet , the version 2.45.25 seems to fix the issue. I have been able to work for a few hours yesterday w/o any problems.

@dibarbet
Copy link
Member

Thanks for confirming! Closing this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-roslyn bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants