microsoft / vscode-dotnettools

This is a feedback repository to capture issues logged for the C# Dev Kit and related extensions from Visual Studio Code
Other
234 stars 13 forks source link

Exception on load in VScode #1635

Open afnan opened 5 days ago

afnan commented 5 days ago

I experience following exception in VS Code on WIndows 11 platform

=====================
11/26/2024 10:17:00 AM
LimitedFunctionality
System.AggregateException: Project system data flow 'Workspace update handler 38116132' closed because of an exception: Object reference not set to an instance of an object.. (Object reference not set to an instance of an object.)
---> (Inner Exception #0) StreamJsonRpc.RemoteInvocationException: Object reference not set to an instance of an object.
   at StreamJsonRpc.JsonRpc.InvokeCoreAsync[TResult](RequestId id, String targetName, IReadOnlyList`1 arguments, IReadOnlyList`1 positionalArgumentDeclaredTypes, IReadOnlyDictionary`2 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, IImmutableDictionary`2 projectChanges, ContextState state, ITelemetryOperation telemetryOperation, IManagedProjectDiagnosticOutputService logger)
   at Microsoft.VisualStudio.ProjectSystem.VSCode.LanguageServices.Workspace.<>c__DisplayClass43_1.<<OnEvaluationUpdateAsync>g__ProcessSourceItemsHandlersAsync|6>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.VisualStudio.ProjectSystem.VSCode.LanguageServices.Workspace.<>c__DisplayClass43_0.<<OnEvaluationUpdateAsync>g__ApplyProjectEvaluationAsync|2>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.VisualStudio.ProjectSystem.VSCode.LanguageServices.Workspace.<>c__DisplayClass46_1`1.<<OnProjectChangedAsync>g__ApplyInBatchAsync|1>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.VisualStudio.Threading.AwaitExtensions.ExecuteContinuationSynchronouslyAwaiter.GetResult()
   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.AwaitExtensions.ExecuteContinuationSynchronouslyAwaiter.GetResult()
   at Microsoft.VisualStudio.Threading.ReentrantSemaphore.StackSemaphore.ExecuteAsync(Func`1 operation, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.ProjectSystem.OnceInitializedOnceDisposedUnderLockAsync.ExecuteUnderLockCoreAsync(Func`2 action, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.ProjectSystem.VSCode.LanguageServices.Workspace.OnEvaluationUpdateAsync(IProjectVersionedValue`1 evaluationUpdate)
   at Microsoft.VisualStudio.ProjectSystem.VSCode.LanguageServices.Workspace.<>c__DisplayClass42_0.<<OnWorkspaceUpdateAsync>g__ApplyUpdateWithinLockAsync|1>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.VisualStudio.ProjectSystem.VSCode.LanguageServices.Workspace.<>c__DisplayClass42_0.<<OnWorkspaceUpdateAsync>g__ApplyUpdateWithinLockAsync|1>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.VisualStudio.ProjectSystem.VSCode.LanguageServices.Workspace.<>c__DisplayClass42_0.<<OnWorkspaceUpdateAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.VisualStudio.Threading.AwaitExtensions.ExecuteContinuationSynchronouslyAwaiter.GetResult()
   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.AwaitExtensions.ExecuteContinuationSynchronouslyAwaiter.GetResult()
   at Microsoft.VisualStudio.Threading.ReentrantSemaphore.StackSemaphore.ExecuteAsync(Func`1 operation, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.ProjectSystem.OnceInitializedOnceDisposedUnderLockAsync.ExecuteUnderLockCoreAsync(Func`2 action, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.ProjectSystem.DataReceivingBlockSlim`1.ProcessInputQueueAsync(InputDataBuffer inputQueue)
<--- (Inner Exception #0) 
===================
webreidi commented 5 days ago

@afnan , can you provide a little bit more information? What version of C# Dev Kit and the C# extension are you using? What type of project were you opening when you got this error?

afnan commented 5 days ago

@afnan , can you provide a little bit more information? What version of C# Dev Kit and the C# extension are you using? What type of project were you opening when you got this error?

Project Type: Dot Net 9 Blazor Server and WASM Tried C# Dev Kit v1.13.9 as well as v1.14.8(pre-release) C# extension is v2.55.29 but also throws on v2.57.28 (pre-release)

github-actions[bot] commented 5 days ago

@webreidi, the 'needs-more-info' label has been removed upon receiving further response from the original bug filer.