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

Visual Studio crashes when opening a TypeScript file #13407

Closed
chkimes opened this issue Jan 11, 2017 · 25 comments
Closed

Visual Studio crashes when opening a TypeScript file #13407

chkimes opened this issue Jan 11, 2017 · 25 comments
Labels
External Relates to another program, environment, or user action which we cannot control.

Comments

@chkimes
Copy link

chkimes commented Jan 11, 2017

TypeScript Version: 2.1.4.0
TypeScript tools for Visual Studio

Code

Event Viewer shows the following exception:

Application: devenv.exe
Framework Version: v4.0.30319
Description: The application requested process termination through System.Environment.FailFast(string message).
Message: System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: TelemetryHelper must be initialized by calling the Initialize method.
   at Microsoft.VisualStudio.TypeScript.Diagnostics.TelemetryHelper.EnsureInitialized()
   at Microsoft.VisualStudio.TypeScript.Diagnostics.TelemetryHelper.get_DefaultTelemetrySession()
   at Microsoft.CodeAnalysis.Editor.TypeScript.ScriptServices.Proxies.LanguageServiceProxy..ctor(String caption, IShimFactory shimFactory, ITelemetry telemetry)
   at Microsoft.CodeAnalysis.Editor.TypeScript.ScriptServices.Proxies.ProxyProvider.<>c__DisplayClass8_0.<Microsoft.CodeAnalysis.Editor.TypeScript.ScriptServices.Proxies.IProxyProvider.GetTypeScriptLanguageServicesProxy>b__0()
   at Microsoft.VisualStudio.Utilities.PropertyCollection.GetOrCreateSingletonProperty[T](Object key, Func`1 creator)
   at Microsoft.CodeAnalysis.Editor.TypeScript.ScriptServices.Proxies.ProxyProvider.Microsoft.CodeAnalysis.Editor.TypeScript.ScriptServices.Proxies.IProxyProvider.GetTypeScriptLanguageServicesProxy(String caption, ScriptContext context)
   at Microsoft.CodeAnalysis.Editor.TypeScript.Features.TaskHandler.ComputeValue[T](String caption, ScriptContext context, ProjectDataCache cache, LanguageServiceOperation`1 operation)
   at Microsoft.CodeAnalysis.Editor.TypeScript.Features.TaskHandler.<>c__DisplayClass11_0`1.<PerformOperation>b__0()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.CodeAnalysis.Editor.TypeScript.Features.TaskHandler.<PerformSyntacticFeatureOperationAsync>d__14`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.CodeAnalysis.Editor.TypeScript.Features.Classifier.AbstractAsyncClassificationTaggerProvider.<ProduceTagsAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.CodeAnalysis.Editor.Tagging.AbstractAsynchronousTaggerProvider`1.<ProduceTagsAsync>d__33.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.CodeAnalysis.Editor.Tagging.AbstractAsynchronousTaggerProvider`1.TagSource.<RecomputeTagsAsync>d__85.MoveNext()
   --- End of inner exception stack trace ---
---> (Inner Exception #0) System.InvalidOperationException: TelemetryHelper must be initialized by calling the Initialize method.
   at Microsoft.VisualStudio.TypeScript.Diagnostics.TelemetryHelper.EnsureInitialized()
   at Microsoft.VisualStudio.TypeScript.Diagnostics.TelemetryHelper.get_DefaultTelemetrySession()
   at Microsoft.CodeAnalysis.Editor.TypeScript.ScriptServices.Proxies.LanguageServiceProxy..ctor(String caption, IShimFactory shimFactory, ITelemetry telemetry)
   at Microsoft.CodeAnalysis.Editor.TypeScript.ScriptServices.Proxies.ProxyProvider.<>c__DisplayClass8_0.<Microsoft.CodeAnalysis.Editor.TypeScript.ScriptServices.Proxies.IProxyProvider.GetTypeScriptLanguageServicesProxy>b__0()
   at Microsoft.VisualStudio.Utilities.PropertyCollection.GetOrCreateSingletonProperty[T](Object key, Func`1 creator)
   at Microsoft.CodeAnalysis.Editor.TypeScript.ScriptServices.Proxies.ProxyProvider.Microsoft.CodeAnalysis.Editor.TypeScript.ScriptServices.Proxies.IProxyProvider.GetTypeScriptLanguageServicesProxy(String caption, ScriptContext context)
   at Microsoft.CodeAnalysis.Editor.TypeScript.Features.TaskHandler.ComputeValue[T](String caption, ScriptContext context, ProjectDataCache cache, LanguageServiceOperation`1 operation)
   at Microsoft.CodeAnalysis.Editor.TypeScript.Features.TaskHandler.<>c__DisplayClass11_0`1.<PerformOperation>b__0()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.CodeAnalysis.Editor.TypeScript.Features.TaskHandler.<PerformSyntacticFeatureOperationAsync>d__14`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.CodeAnalysis.Editor.TypeScript.Features.Classifier.AbstractAsyncClassificationTaggerProvider.<ProduceTagsAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.CodeAnalysis.Editor.Tagging.AbstractAsynchronousTaggerProvider`1.<ProduceTagsAsync>d__33.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.CodeAnalysis.Editor.Tagging.AbstractAsynchronousTaggerProvider`1.TagSource.<RecomputeTagsAsync>d__85.MoveNext()<---

Stack:
   at System.Environment.FailFast(System.String, System.Exception)
   at Microsoft.CodeAnalysis.FailFast.OnFatalException(System.Exception)
   at Microsoft.CodeAnalysis.ErrorReporting.FatalError.Report(System.Exception, System.Action`1<System.Exception>)
   at Microsoft.CodeAnalysis.ErrorReporting.FatalError.Report(System.Exception)
   at Roslyn.Utilities.TaskExtensions.ReportFatalErrorWorker(System.Threading.Tasks.Task, System.Object)
   at System.Threading.Tasks.ContinuationTaskFromTask.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
   at System.Threading.Tasks.Task.ExecutionContextCallback(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef)
   at System.Threading.Tasks.Task.ExecuteEntry(Boolean)
   at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(System.Threading.Tasks.Task, Boolean)
   at System.Threading.Tasks.TaskScheduler.TryRunInline(System.Threading.Tasks.Task, Boolean)
   at System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(System.Threading.Tasks.Task, Boolean)
   at System.Threading.Tasks.StandardTaskContinuation.Run(System.Threading.Tasks.Task, Boolean)
   at System.Threading.Tasks.Task.FinishContinuations()
   at System.Threading.Tasks.Task.FinishStageThree()
   at System.Threading.Tasks.Task.FinishStageTwo()
   at System.Threading.Tasks.Task.Finish(Boolean)
   at System.Threading.Tasks.Task`1[[System.Threading.Tasks.TaskExtensions+VoidResult, System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].TrySetException(System.Object)
   at System.Threading.Tasks.UnwrapPromise`1[[System.Threading.Tasks.TaskExtensions+VoidResult, System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].TrySetFromTask(System.Threading.Tasks.Task, Boolean)
   at System.Threading.Tasks.UnwrapPromise`1[[System.Threading.Tasks.TaskExtensions+VoidResult, System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].InvokeCore(System.Threading.Tasks.Task)
   at System.Threading.Tasks.UnwrapPromise`1[[System.Threading.Tasks.TaskExtensions+VoidResult, System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Invoke(System.Threading.Tasks.Task)
   at System.Threading.Tasks.Task.FinishContinuations()
   at System.Threading.Tasks.Task.FinishStageThree()
   at System.Threading.Tasks.Task.FinishStageTwo()
   at System.Threading.Tasks.Task.Finish(Boolean)
   at System.Threading.Tasks.Task`1[[System.Threading.Tasks.VoidTaskResult, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].TrySetException(System.Object)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.Threading.Tasks.VoidTaskResult, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].SetException(System.Exception)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.SetException(System.Exception)
   at Microsoft.CodeAnalysis.Editor.Tagging.AbstractAsynchronousTaggerProvider`1+TagSource+<RecomputeTagsAsync>d__85[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.InvokeMoveNext(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run()
   at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action, Boolean, System.Threading.Tasks.Task ByRef)
   at System.Threading.Tasks.Task.FinishContinuations()
   at System.Threading.Tasks.Task.FinishStageThree()
   at System.Threading.Tasks.Task.FinishStageTwo()
   at System.Threading.Tasks.Task.Finish(Boolean)
   at System.Threading.Tasks.Task`1[[System.Threading.Tasks.VoidTaskResult, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].TrySetException(System.Object)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.Threading.Tasks.VoidTaskResult, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].SetException(System.Exception)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.SetException(System.Exception)
   at Microsoft.CodeAnalysis.Editor.Tagging.AbstractAsynchronousTaggerProvider`1+<ProduceTagsAsync>d__33[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.InvokeMoveNext(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run()
   at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action, Boolean, System.Threading.Tasks.Task ByRef)
   at System.Threading.Tasks.Task.FinishContinuations()
   at System.Threading.Tasks.Task.FinishStageThree()
   at System.Threading.Tasks.Task.FinishStageTwo()
   at System.Threading.Tasks.Task.Finish(Boolean)
   at System.Threading.Tasks.Task`1[[System.Threading.Tasks.VoidTaskResult, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].TrySetException(System.Object)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.Threading.Tasks.VoidTaskResult, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].SetException(System.Exception)
   at Microsoft.CodeAnalysis.Editor.TypeScript.Features.Classifier.AbstractAsyncClassificationTaggerProvider+<ProduceTagsAsync>d__5.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.InvokeMoveNext(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run()
   at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action, Boolean, System.Threading.Tasks.Task ByRef)
   at System.Threading.Tasks.Task.FinishContinuations()
   at System.Threading.Tasks.Task.FinishStageThree()
   at System.Threading.Tasks.Task.FinishStageTwo()
   at System.Threading.Tasks.Task.Finish(Boolean)
   at System.Threading.Tasks.Task`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].TrySetException(System.Object)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].SetException(System.Exception)
   at Microsoft.CodeAnalysis.Editor.TypeScript.Features.TaskHandler+<PerformSyntacticFeatureOperationAsync>d__14`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.InvokeMoveNext(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run()
   at System.Threading.Tasks.AwaitTaskContinuation.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

About VS Info:

Microsoft Visual Studio Enterprise 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.6.01586

Installed Version: Enterprise

Architecture and Modeling Tools   00322-80000-00000-AA678
Microsoft Architecture and Modeling Tools
    
UML® and Unified Modeling Language™ are trademarks or registered trademarks of the Object Management Group, Inc. in the United States and other countries.

Microsoft Visual Studio Tools for Applications 2015   00322-80000-00000-AA678
Microsoft Visual Studio Tools for Applications 2015

Visual Basic 2015   00322-80000-00000-AA678
Microsoft Visual Basic 2015

Visual C# 2015   00322-80000-00000-AA678
Microsoft Visual C# 2015

Visual C++ 2015   00322-80000-00000-AA678
Microsoft Visual C++ 2015

Visual F# 2015   00322-80000-00000-AA678
Microsoft Visual F# 2015

Windows Phone SDK 8.0 - ENU   00322-80000-00000-AA678
Windows Phone SDK 8.0 - ENU

Application Insights Tools for Visual Studio Package   7.16.00109.2
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2015.1   14.1.21111.0
ASP.NET and Web Tools 2015.1

ASP.NET Web Frameworks and Tools 2012.2   4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.40314.0
For additional information, visit http://www.asp.net/

Azure App Service Tools v2.8.1   14.0.11123.0
Azure App Service Tools v2.8.1

Command Bus, Event Stream and Async Manager   Merq
Provides ICommandBus, IEventStream and IAsyncManager MEF services for loosely coupled Visual Studio extension components communication and integration.

Common Azure Tools   1.8
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

JetBrains ReSharper Ultimate 2016.3.1    Build 107.0.20161222.212756
JetBrains ReSharper Ultimate package for Microsoft Visual Studio. For more information about ReSharper Ultimate, visit http://www.jetbrains.com/resharper. Copyright © 2017 JetBrains, Inc.

Microsoft .NET Core Tools (Preview 2)   14.1.21111.0
Microsoft .NET Core Tools (Preview 2)

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

NuGet Package Manager   3.5.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools   14.0.60519.0
Microsoft SQL Server Data Tools

TypeScript   2.1.4.0
TypeScript tools for Visual Studio

Visual Studio Tools for Universal Windows Apps   14.0.25420.01
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

VsVim   2.2.0.0
VsVim is a Vim emulator for Visual Studio

Xamarin   4.2.1.62 (680125b)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   7.0.2.37 (ce955cc)
Visual Studio extension to enable development for Xamarin.Android.

Xamarin.iOS   10.2.1.5 (44931ae)
Visual Studio extension to enable development for Xamarin.iOS.

Expected behavior:
Visual Studio does not crash.

Actual behavior:
Visual Studio crashes.

@mhegazy
Copy link
Contributor

mhegazy commented Jan 11, 2017

Is that on a specific file or all files?

@vladima
Copy link
Contributor

vladima commented Jan 11, 2017

This looks like a known issue that should already be fixed // cc @paulvanbrenk

@chkimes
Copy link
Author

chkimes commented Jan 11, 2017 via email

@mhegazy
Copy link
Contributor

mhegazy commented Jan 12, 2017

Can you give TypeScript 2.1.5 a try?

@chkimes
Copy link
Author

chkimes commented Jan 13, 2017

@mhegazy Looks like the error still happens on 2.1.5 - and the stack trace appears to be the same.

@mhegazy
Copy link
Contributor

mhegazy commented Jan 13, 2017

does this happen on a specific project?

@chkimes
Copy link
Author

chkimes commented Jan 13, 2017

I've tested it with a brand new ASP.NET project and a new ASP.NET Core project. It happens very reliably as soon as I create and open any .ts or .tsx file.

@mhegazy
Copy link
Contributor

mhegazy commented Jan 13, 2017

what if you do not have any project, just open VS, and open a TS file?

@chkimes
Copy link
Author

chkimes commented Jan 13, 2017

@mhegazy Same behavior, VS crashes when the file opens with no project loaded.

The exact behavior is that the file loads, syntax highlighting works (although it doesn't seem to be correct TypeScript syntax highlighting, maybe just regular JS highlighting?), VS becomes unresponsive for about a second, then a crash dialog appears ("Microsoft Visual Studio 2015 has stopped working").

@mhegazy mhegazy added the Bug A bug in TypeScript label Jan 19, 2017
@mhegazy mhegazy added this to the TypeScript 2.2 milestone Jan 19, 2017
@vladima
Copy link
Contributor

vladima commented Jan 28, 2017

@ckimes89, to make sure that we've ruled out anything setup related, can you please check:

  • if you have any entries in MEF Cache error log file, it should be located in %LOCALAPPDATA%\Microsoft\VisualStudio\14.0\ComponentModelCache\ with name something like Microsoft.VisualStudio.Default.err. If this file exists and non-empty, can you please paste it here?
  • after crash check VisualStudio activity log if it contains any errors, log can be found %APPDATA%\Microsoft\VisualStudio\14.0\ActivityLog.xml

If MEF cache does not have anything - try to delete ComponentModelCache folder (make sure that all instances of Visual Studio are closed) and then try to repro the issue again.

@chkimes
Copy link
Author

chkimes commented Jan 30, 2017

@vladima Thanks for the reply!

The file Microsoft.VisualStudio.Default.err exists but is empty. I deleted my existing ActivityLog.xml and caused the crash again, the new file is attached to this post.

I have previously attempted to delete the ComponentModelCache folder, re-install TypeScript, and even re-install VisualStudio, all to no avail.

ActivityLog.txt

@vladima
Copy link
Contributor

vladima commented Jan 30, 2017

interesting. There is an error during initialization of the TypeScript package and it happens prior to the setup of the telemetry session.

  <entry>
    <record>252</record>
    <time>2017/01/30 04:06:42.101</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Begin package load [Microsoft.VisualStudio.Languageervices.TypeScript.TypeScriptPackage, Microsoft.VisualStudio.LanguageServices.TypeScript, Version=14.0.0.0, Culture=neutral]</description>
    <guid>{2FFE45C4-5C73-493C-B187-F2E955FF875E}</guid>
  </entry>
  <entry>
    <record>253</record>
    <time>2017/01/30 04:06:42.123</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>LegacySitePackage failed for package [Microsoft.VisualStudio.LanguageServices.TypeScript.TypeScriptPackage, Microsoft.VisualStudio.LanguageServices.TypeScript, Version=14.0.0.0, Culture=neutral]Source: &apos;Microsoft.VisualStudio.LanguageServices.TypeScript&apos; Description: Field not found: &apos;Microsoft.CodeAnalysis.Shared.Options.ServiceFeatureOnOffOptions.ClosedFileDiagnostic&apos;.&#x000D;&#x000A;System.MissingFieldException: Field not found: &apos;Microsoft.CodeAnalysis.Shared.Options.ServiceFeatureOnOffOptions.ClosedFileDiagnostic&apos;.&#x000D;&#x000A;   at Microsoft.VisualStudio.LanguageServices.TypeScript.TypeScriptPackage.Initialize()&#x000D;&#x000A;   at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider sp)</description>
    <guid>{2FFE45C4-5C73-493C-B187-F2E955FF875E}</guid>
    <hr>80131511</hr>
    <errorinfo></errorinfo>
  </entry>

Error System.MissingFieldException: Field not found: &apos;Microsoft.CodeAnalysis.Shared.Options.ServiceFeatureOnOffOptions.ClosedFileDiagnostic&apos;.&#x000D;&#x000A; at Microsoft.VisualStudio.LanguageServices.TypeScript.TypeScriptPackage.Initialize()&#x000D;&#x000A; at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider sp) indicates binary mismatch, @paulvanbrenk might know how we can diagnose the root cause of it.

@paulvanbrenk
Copy link
Contributor

paulvanbrenk commented Jan 30, 2017

What file version are the following assemblies?

  • C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TypeScript\Microsoft.VisualStudio.LanguageServices.TypeScript.dll
  • C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\PrivateAssemblies\Microsoft.CodeAnalysis.dll

@chkimes
Copy link
Author

chkimes commented Jan 30, 2017

C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TypeScript\Microsoft.VisualStudio.LanguageServices.TypeScript.dll : File version 14.40111.1.0

C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\PrivateAssemblies\Microsoft.CodeAnalysis.dll : File version 1.3.4.60902

@paulvanbrenk
Copy link
Contributor

Thanks, can you also check the version for this assembly?

C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\PrivateAssemblies\Microsoft.CodeAnalysis.Features.dll

@chkimes
Copy link
Author

chkimes commented Jan 30, 2017

Microsoft.CodeAnalysis.Features.dll : File version 1.3.4.60902

@vladima
Copy link
Contributor

vladima commented Jan 31, 2017

@ckimes89 can you please set up procdump as a postmortem debugger (-i -ma) and share a crash dump ?

@chkimes
Copy link
Author

chkimes commented Feb 1, 2017

Using it as a postmortem debugger never generated a dump file, not sure why. However, I managed to get it working with the -t option to grab a dump on process termination. However, the file is 900 MB. Is there a better place to share this file (or is there a more compact option for generating dump files)?

@vladima
Copy link
Contributor

vladima commented Feb 1, 2017

can you zip it and put on any file share you prefer: (OneDrive, Dropbox, Google Drive) etc?

@chkimes
Copy link
Author

chkimes commented Feb 1, 2017

The zipped dump file is available here: https://drive.google.com/file/d/0B79PPoNoQ45dVG5HX09wa0o4dDQ/view?usp=sharing

@vladima
Copy link
Contributor

vladima commented Feb 1, 2017

out of curiosity, have you installed any Roslyn vsix'es on your machine?

@chkimes
Copy link
Author

chkimes commented Feb 1, 2017

Oh man, I sure have. I installed the vsix for playing around with arbitrary async return types:

dotnet/roslyn#10902

I can try removing it, but I can't figure out where they are installed to.

@vladima
Copy link
Contributor

vladima commented Feb 1, 2017

You should be able to uninstall it from Extensions and Updates menu: http://stackoverflow.com/questions/22444799/how-to-uninstall-vsix-visual-studio-extensions.

@vladima
Copy link
Contributor

vladima commented Feb 1, 2017

from the dump I can see that Roslyn dlls were loaded from this location: %LOCALAPPDATA%\Microsoft\VisualStudio\14.0\Extensions\kiygbc1b.fqf\

@mhegazy mhegazy added External Relates to another program, environment, or user action which we cannot control. and removed Bug A bug in TypeScript labels Feb 1, 2017
@mhegazy mhegazy removed this from the TypeScript 2.2 milestone Feb 2, 2017
@chkimes
Copy link
Author

chkimes commented Feb 2, 2017

So, I don't think that .vsix I installed was installed anymore. I opened some of the code I was working with that needed it to be installed, but that doesn't compile anymore so I'm pretty sure I uninstalled it. Nonetheless, I went through and tried to remove most of the extensions that were installed to VS. After removing a few of them, VS would start to hang after restarting after showing an error about an extension failing to load correctly. Oddly, it wasn't always the same extension - it was various things related to language services, Azure, code analysis, etc.

I decided to abandon that approach and do a full uninstall and reinstall of Visual Studio. Unfortunately, even after that VS still hangs on startup. Short of doing a full re-install of Windows, I don't know what to do here.

Thanks everyone for your input on this bug, but it seems that I now have even bigger problems with Visual Studio.

@chkimes chkimes closed this as completed Feb 21, 2017
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
External Relates to another program, environment, or user action which we cannot control.
Projects
None yet
Development

No branches or pull requests

4 participants