roslyn: Completion throwing System.ExecutionEngineException

Consistently seeing completion cause VS to crash in d15prerel 26521.01.

Exception Details

System.ExecutionEngineException occurred
  HResult=0x80131506
  Message=Exception of type 'System.ExecutionEngineException' was thrown.

Inner Exception 1:
InvalidOperationException: Sequence contains no elements

Inner Exception Stack Trace

   at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source)
   at System.Linq.ImmutableArrayExtensions.Single[T](ImmutableArray`1 immutableArray, Func`2 predicate)
   at Microsoft.CodeAnalysis.Diagnostics.Analyzers.NamingStyles.NamingStylePreferences.GetNamingStyle(Guid namingStyleID)
   at Microsoft.CodeAnalysis.Diagnostics.Analyzers.NamingStyles.SerializableNamingRule.GetRule(NamingStylePreferences info)
   at Microsoft.CodeAnalysis.Diagnostics.Analyzers.NamingStyles.NamingStylePreferences.<CreateRules>b__14_0(SerializableNamingRule r)
   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at System.Collections.Immutable.ImmutableArray.CreateRange[T](IEnumerable`1 items)
   at System.Collections.Immutable.ImmutableArray.ToImmutableArray[TSource](IEnumerable`1 items)
   at Microsoft.CodeAnalysis.Diagnostics.Analyzers.NamingStyles.NamingStylePreferences.CreateRules()
   at Microsoft.CodeAnalysis.CSharp.Completion.Providers.DeclarationNameCompletionProvider.<GetRecommendedNamesAsync>d__13.MoveNext()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at Microsoft.CodeAnalysis.CSharp.Completion.Providers.DeclarationNameCompletionProvider.<ProvideCompletionsAsync>d__9.MoveNext()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.CodeAnalysis.Completion.CompletionServiceWithProviders.<GetContextAsync>d__31.MoveNext()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.CodeAnalysis.Completion.CompletionServiceWithProviders.<ComputeNonEmptyCompletionContextsAsync>d__24.MoveNext()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at Microsoft.CodeAnalysis.Completion.CompletionServiceWithProviders.<GetCompletionsAsync>d__22.MoveNext()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.CodeAnalysis.Editor.Implementation.IntelliSense.Completion.Controller.Session.ModelComputer.<GetCompletionListAsync>d__14.MoveNext()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.CodeAnalysis.Editor.Implementation.IntelliSense.Completion.Controller.Session.ModelComputer.<DoInBackgroundAsync>d__13.MoveNext()"	string

Call Stack

 	[Managed to Native Transition]	
>	Microsoft.VisualStudio.Threading.dll!Microsoft.VisualStudio.Threading.NoMessagePumpSyncContext.Wait(System.IntPtr[] waitHandles, bool waitAll, int millisecondsTimeout)	Unknown
 	mscorlib.dll!System.Threading.SynchronizationContext.InvokeWaitMethodHelper(System.Threading.SynchronizationContext syncContext, System.IntPtr[] waitHandles, bool waitAll, int millisecondsTimeout)	Unknown
 	[Native to Managed Transition]	
 	[Managed to Native Transition]	
 	Microsoft.VisualStudio.Threading.dll!Microsoft.VisualStudio.Threading.JoinableTaskContext.Factory.get()	Unknown
 	Microsoft.VisualStudio.Shell.UI.Internal.dll!Microsoft.VisualStudio.PlatformUI.Diagnostics.DiagnosticsPackage.AssemblyLoadHandler(object sender, System.AssemblyLoadEventArgs args)	Unknown
 	mscorlib.dll!System.AppDomain.OnAssemblyLoadEvent(System.Reflection.RuntimeAssembly LoadedAssembly)	Unknown
 	[Native to Managed Transition]	
 	[Managed to Native Transition]	
 	mscorlib.dll!System.Reflection.RuntimeAssembly.nLoad(System.Reflection.AssemblyName fileName, string codeBase, System.Security.Policy.Evidence assemblySecurity, System.Reflection.RuntimeAssembly locationHint, ref System.Threading.StackCrawlMark stackMark, System.IntPtr pPrivHostBinder, bool throwOnFileNotFound, bool forIntrospection, bool suppressSecurityChecks)	Unknown
 	mscorlib.dll!System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(System.Reflection.AssemblyName assemblyRef, System.Security.Policy.Evidence assemblySecurity, System.Reflection.RuntimeAssembly reqAssembly, ref System.Threading.StackCrawlMark stackMark, System.IntPtr pPrivHostBinder, bool throwOnFileNotFound, bool forIntrospection, bool suppressSecurityChecks)	Unknown
 	mscorlib.dll!System.Reflection.RuntimeAssembly.InternalLoadFrom(string assemblyFile, System.Security.Policy.Evidence securityEvidence, byte[] hashValue, System.Configuration.Assemblies.AssemblyHashAlgorithm hashAlgorithm, bool forIntrospection, bool suppressSecurityChecks, ref System.Threading.StackCrawlMark stackMark)	Unknown
 	mscorlib.dll!System.Reflection.Assembly.LoadFrom(string assemblyFile)	Unknown
 	Evaluation of: 	
 	Microsoft.CodeAnalysis.Workspaces.dll!Microsoft.CodeAnalysis.ErrorReporting.FatalError.Report(System.Exception exception, System.Action<System.Exception> handler)	Unknown
 	Microsoft.CodeAnalysis.Workspaces.dll!Roslyn.Utilities.TaskExtensions.ReportFatalErrorWorker(System.Threading.Tasks.Task task, object continuationFunction)	Unknown
 	mscorlib.dll!System.Threading.Tasks.ContinuationTaskFromTask.InnerInvoke()	Unknown
 	mscorlib.dll!System.Threading.Tasks.Task.Execute()	Unknown
 	mscorlib.dll!System.Threading.Tasks.Task.ExecutionContextCallback(object obj)	Unknown
 	mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)	Unknown
 	mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)	Unknown
 	mscorlib.dll!System.Threading.Tasks.Task.ExecuteWithThreadLocal(ref System.Threading.Tasks.Task currentTaskSlot)	Unknown
 	mscorlib.dll!System.Threading.Tasks.Task.ExecuteEntry(bool bPreventDoubleExecution)	Unknown
 	mscorlib.dll!System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(System.Threading.Tasks.Task task, bool taskWasPreviouslyQueued)	Unknown
 	mscorlib.dll!System.Threading.Tasks.TaskScheduler.TryRunInline(System.Threading.Tasks.Task task, bool taskWasPreviouslyQueued)	Unknown
 	mscorlib.dll!System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(System.Threading.Tasks.Task task, bool needsProtection)	Unknown
 	mscorlib.dll!System.Threading.Tasks.StandardTaskContinuation.Run(System.Threading.Tasks.Task completedTask, bool bCanInlineContinuationTask)	Unknown
 	mscorlib.dll!System.Threading.Tasks.Task.ContinueWithCore(System.Threading.Tasks.Task continuationTask, System.Threading.Tasks.TaskScheduler scheduler, System.Threading.CancellationToken cancellationToken, System.Threading.Tasks.TaskContinuationOptions options)	Unknown
 	mscorlib.dll!System.Threading.Tasks.Task.ContinueWith(System.Action<System.Threading.Tasks.Task, object> continuationAction, object state, System.Threading.Tasks.TaskScheduler scheduler, System.Threading.CancellationToken cancellationToken, System.Threading.Tasks.TaskContinuationOptions continuationOptions, ref System.Threading.StackCrawlMark stackMark)	Unknown
 	mscorlib.dll!System.Threading.Tasks.Task.ContinueWith(System.Action<System.Threading.Tasks.Task, object> continuationAction, object state, System.Threading.CancellationToken cancellationToken, System.Threading.Tasks.TaskContinuationOptions continuationOptions, System.Threading.Tasks.TaskScheduler scheduler)	Unknown
 	Microsoft.CodeAnalysis.Workspaces.dll!Roslyn.Utilities.TaskExtensions.ReportFatalError(System.Threading.Tasks.Task task, object continuationFunction)	Unknown
 	mscorlib.dll!System.Threading.Tasks.ContinuationTaskFromResultTask<Microsoft.CodeAnalysis.Editor.Implementation.IntelliSense.Completion.Model>.InnerInvoke()	Unknown
 	mscorlib.dll!System.Threading.Tasks.Task.Execute()	Unknown
 	mscorlib.dll!System.Threading.Tasks.Task.ExecutionContextCallback(object obj)	Unknown
 	mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)	Unknown
 	mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)	Unknown
 	mscorlib.dll!System.Threading.Tasks.Task.ExecuteWithThreadLocal(ref System.Threading.Tasks.Task currentTaskSlot)	Unknown
 	mscorlib.dll!System.Threading.Tasks.Task.ExecuteEntry(bool bPreventDoubleExecution)	Unknown
 	mscorlib.dll!System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(System.Threading.Tasks.Task task, bool taskWasPreviouslyQueued)	Unknown
 	mscorlib.dll!System.Threading.Tasks.TaskScheduler.TryRunInline(System.Threading.Tasks.Task task, bool taskWasPreviouslyQueued)	Unknown
 	mscorlib.dll!System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(System.Threading.Tasks.Task task, bool needsProtection)	Unknown
 	mscorlib.dll!System.Threading.Tasks.StandardTaskContinuation.Run(System.Threading.Tasks.Task completedTask, bool bCanInlineContinuationTask)	Unknown
 	mscorlib.dll!System.Threading.Tasks.Task.FinishContinuations()	Unknown
 	mscorlib.dll!System.Threading.Tasks.Task.FinishStageThree()	Unknown
 	mscorlib.dll!System.Threading.Tasks.Task.FinishStageTwo()	Unknown
 	mscorlib.dll!System.Threading.Tasks.Task.Finish(bool bUserDelegateExecuted)	Unknown
 	mscorlib.dll!System.Threading.Tasks.Task<System.__Canon>.TrySetException(object exceptionObject)	Unknown
 	mscorlib.dll!System.Threading.Tasks.UnwrapPromise<Microsoft.CodeAnalysis.Editor.Implementation.IntelliSense.Completion.Model>.TrySetFromTask(System.Threading.Tasks.Task task, bool lookForOce)	Unknown
 	mscorlib.dll!System.Threading.Tasks.UnwrapPromise<System.__Canon>.ProcessInnerTask(System.Threading.Tasks.Task task)	Unknown
 	mscorlib.dll!System.Threading.Tasks.UnwrapPromise<Microsoft.CodeAnalysis.Editor.Implementation.IntelliSense.Completion.Model>.ProcessCompletedOuterTask(System.Threading.Tasks.Task task)	Unknown
 	mscorlib.dll!System.Threading.Tasks.UnwrapPromise<System.__Canon>.InvokeCore(System.Threading.Tasks.Task completingTask)	Unknown
 	mscorlib.dll!System.Threading.Tasks.UnwrapPromise<Microsoft.CodeAnalysis.Editor.Implementation.IntelliSense.Completion.Model>.Invoke(System.Threading.Tasks.Task completingTask)	Unknown
 	mscorlib.dll!System.Threading.Tasks.Task.FinishContinuations()	Unknown
 	mscorlib.dll!System.Threading.Tasks.Task.FinishStageThree()	Unknown
 	mscorlib.dll!System.Threading.Tasks.Task.FinishStageTwo()	Unknown
 	mscorlib.dll!System.Threading.Tasks.Task.Finish(bool bUserDelegateExecuted)	Unknown
 	mscorlib.dll!System.Threading.Tasks.Task.ExecuteWithThreadLocal(ref System.Threading.Tasks.Task currentTaskSlot)	Unknown
 	mscorlib.dll!System.Threading.Tasks.Task.ExecuteEntry(bool bPreventDoubleExecution)	Unknown
 	mscorlib.dll!System.Threading.Tasks.TaskScheduler.TryExecuteTask(System.Threading.Tasks.Task task)	Unknown
 	Microsoft.CodeAnalysis.EditorFeatures.dll!Microsoft.CodeAnalysis.Editor.Implementation.IntelliSense.Completion.PrioritizedTaskScheduler.ThreadStart()	Unknown
 	mscorlib.dll!System.Threading.ThreadHelper.ThreadStart_Context(object state)	Unknown
 	mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)	Unknown
 	mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)	Unknown
 	mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state)	Unknown
 	mscorlib.dll!System.Threading.ThreadHelper.ThreadStart()	Unknown

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 18 (18 by maintainers)

Most upvoted comments

@tmeschter - Yes. Tanner can’t spell. 😄

I have a partial fix for this that I need to clean up & add tests to. Is there extra urgency on this now?

Ah, the problem is that capitalization has been misspelled capitilization in all instances, leading to the failure to find capitalization data. This results in TryGetNamingStyleData returning false.