microsoft / vs-ng-language-service

Visual Studio extension for the Angular Language Service
MIT License
43 stars 14 forks source link

Language Service crashes in Typescirpt file #12

Closed Regenhardt closed 1 year ago

Regenhardt commented 3 years ago

When opening a Typescript-file, the Angular Language Service seems to crash multiple times in a very short time. As the notification states I have started devenv with /Log and extracted the entry:

  <entry>
    <record>932</record>
    <time>2020/09/17 07:40:31.996</time>
    <type>Error</type>
    <source>Angular Language Service Extension</source>
    <description>System.NullReferenceException: Object reference not set to an instance of an object.&#x000D;&#x000A;   at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageClientInstance.&lt;GetAndSendAllRelevantOpenedDocumentsAsync&gt;d__86.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageClientInstance.&lt;InitializeAsync&gt;d__77.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageClientInstance.&lt;OnRpcDisconnected&gt;d__85.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)</description>
  </entry>

This Typescript-file is a 700-lines AngularJs Controller that was converted from JS to TS.

Edit: Angular Language Service 1.0 Visual Studio Professional 2019 16.7.3

Regenhardt commented 2 years ago

Still happening with VS 16.11.2 and Angular Language Service 1.1

MariaSolOs commented 1 year ago

@Regenhardt Could you please try updating to the latest version of the extension and let us know if the issue persists?

Regenhardt commented 1 year ago

Can confirm it works now, no more crashes.

MariaSolOs commented 1 year ago

Thanks for confirming @Regenhardt!