Roslyn: Completion throwing System.ExecutionEngineException

Created on 22 May 2017  路  18Comments  路  Source: dotnet/roslyn

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
Area-IDE Bug Tenet-Reliability

All 18 comments

I'm still attempting to find a simplified repro. I do have a consistent repro with a larger solution if I can't find a simplified one.

Simplified Repro

  1. Install VS 2017 Preview 1 (this also repros in D15PreRel 26521.01)
  2. Create a new C# Class Library (.NET Framework, .NET Standard, or .NET Core)
  3. Close the Class1.cs file
  4. Add a new solution file ".editorconfig"
  5. Set its contents to the following
###############################################################################
# Top-most EditorConfig file
###############################################################################
root = true

###############################################################################
# Set dotnet naming rules to:
#    suggest async members be pascal case suffixed with Async
#    suggest interfaces be pascal case prefixed with I 
#    suggest private and internal fields be camel case and prefixed with underscore
#    suggest public and protected declarations be pascal case
#    suggest type parameters be pascal case prefixed with T
###############################################################################
[*.cs]
dotnet_naming_rule.async_members_should_be_pascal_case_suffixed_with_async.severity = suggestion
dotnet_naming_rule.async_members_should_be_pascal_case_suffixed_with_async.style = pascal_case_suffixed_with_async
dotnet_naming_rule.async_members_should_be_pascal_case_suffixed_with_async.symbols = async_members

dotnet_naming_rule.interfaces_should_be_pascal_case_prefixed_with_i.severity = suggestion
dotnet_naming_rule.interfaces_should_be_pascal_case_prefixed_with_i.style = pascal_case_prefixed_with_i
dotnet_naming_rule.interfaces_should_be_pascal_case_prefixed_with_i.symbols = interfaces

dotnet_naming_rule.private_and_internal_fields_should_be_camel_case_prefixed_with_underscore.severity = suggestion
dotnet_naming_rule.private_and_internal_fields_should_be_camel_case_prefixed_with_underscore.style = camel_case_prefixed_with_underscore
dotnet_naming_rule.private_and_internal_fields_should_be_camel_case_prefixed_with_underscore.symbols = private_and_internal_fields

dotnet_naming_rule.public_and_protected_declarations_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.public_and_protected_declarations_should_be_pascal_case.style = pascal_case
dotnet_naming_rule.public_and_protected_declarations_should_be_pascal_case.symbols = public_and_protected_declarations

dotnet_naming_rule.type_parameters_should_be_pascal_case_prefixed_with_t.severity = suggestion
dotnet_naming_rule.type_parameters_should_be_pascal_case_prefixed_with_t.style = pascal_case_prefixed_with_t
dotnet_naming_rule.type_parameters_should_be_pascal_case_prefixed_with_t.symbols = type_parameters

###############################################################################
# Set dotnet naming styles to define:
#   camel case prefixed with _
#   pascal case
#   pascal case prefixed with I
#   pascal case prefixed with T
#   pascal case suffixed with Async
###############################################################################
[*.cs]
dotnet_naming_style.camel_case_prefixed_with_underscore.capitilization = camel_case
dotnet_naming_style.camel_case_prefixed_with_underscore.required_prefix = _

dotnet_naming_style.pascal_case.capitilization = pascal_case

dotnet_naming_style.pascal_case_prefixed_with_i.capitilization = pascal_case
dotnet_naming_style.pascal_case_prefixed_with_i.required_prefix = I

dotnet_naming_style.pascal_case_prefixed_with_t.capitilization = pascal_case
dotnet_naming_style.pascal_case_prefixed_with_t.required_prefix = T

dotnet_naming_style.pascal_case_suffixed_with_async.capitilization = pascal_case
dotnet_naming_style.pascal_case_suffixed_with_async.required_suffix = Async

###############################################################################
# Set dotnet naming symbols to:
#   async members
#   private and internal fields
#   public and protected declarations
#   type parameters
###############################################################################
[*.cs]
dotnet_naming_symbols.async_members.required_modifiers = async

dotnet_naming_symbols.interfaces.applicable_kinds = interface

dotnet_naming_symbols.private_and_internal_fields.applicable_accessibilities = private, internal
dotnet_naming_symbols.private_and_internal_fields.applicable_kinds = field

dotnet_naming_symbols.public_and_protected_declarations.applicable_accessibilities = public, protected

dotnet_naming_symbols.type_parameters.applicable_kinds = type_parameter
  1. Open the Class1.cs file
  2. Attempt to add a new field private IntPtr

Expected Behavior
VS Doesn't Crash and provides naming suggestions for the field

Actual Behavior
VS Crashes

@rchande can you take a look? @dpoeschl Does this seem familiar to you?

I did confirm that the ordering of naming_rules/naming_symbols/naming_style doesn't make a difference (I had initially thought it might be because I was using the symbols/styles before they were declared).

@Pilchie @dpoeschl It looks like this is an issue creating NamingStyleRules from that particular .editorconfig file. If I break on first chance InvalidOperationExceptions, I can see this getting thrown inside the solution crawler too:

```C#
System.Core.dll!System.Linq.Enumerable.Single(System.Collections.Generic.IEnumerable source) Unknown
System.Collections.Immutable.dll!System.Linq.ImmutableArrayExtensions.Single(System.Collections.Immutable.ImmutableArray immutableArray, System.Func predicate) Unknown

Microsoft.CodeAnalysis.Workspaces.dll!Microsoft.CodeAnalysis.Diagnostics.Analyzers.NamingStyles.NamingStylePreferences.GetNamingStyle(System.Guid namingStyleID) Line 44 C#
Microsoft.CodeAnalysis.Workspaces.dll!Microsoft.CodeAnalysis.Diagnostics.Analyzers.NamingStyles.SerializableNamingRule.GetRule(Microsoft.CodeAnalysis.Diagnostics.Analyzers.NamingStyles.NamingStylePreferences info) Line 16 C#
Microsoft.CodeAnalysis.Workspaces.dll!Microsoft.CodeAnalysis.Diagnostics.Analyzers.NamingStyles.NamingStylePreferences.CreateRules.AnonymousMethod__14_0(Microsoft.CodeAnalysis.Diagnostics.Analyzers.NamingStyles.SerializableNamingRule r) Line 52 C#
System.Core.dll!System.Linq.Enumerable.WhereSelectArrayIterator.MoveNext() Unknown
System.Core.dll!System.Linq.Buffer.Buffer(System.Collections.Generic.IEnumerable source) Unknown
System.Core.dll!System.Linq.Enumerable.ToArray(System.Collections.Generic.IEnumerable source) Unknown
System.Collections.Immutable.dll!System.Collections.Immutable.ImmutableArray.CreateRange(System.Collections.Generic.IEnumerable items) Unknown
System.Collections.Immutable.dll!System.Collections.Immutable.ImmutableArray.ToImmutableArray(System.Collections.Generic.IEnumerable items) Unknown
Microsoft.CodeAnalysis.Workspaces.dll!Microsoft.CodeAnalysis.Diagnostics.Analyzers.NamingStyles.NamingStylePreferences.CreateRules() Line 52 C#
mscorlib.dll!System.Lazy.CreateValue() Unknown
mscorlib.dll!System.Lazy.LazyInitValue() Unknown
mscorlib.dll!System.Lazy.Value.get() Unknown
Microsoft.CodeAnalysis.Workspaces.dll!Microsoft.CodeAnalysis.Diagnostics.Analyzers.NamingStyles.NamingStylePreferences.Rules.get() Line 49 C#
Microsoft.CodeAnalysis.Features.dll!Microsoft.CodeAnalysis.Diagnostics.Analyzers.NamingStyles.NamingStyleDiagnosticAnalyzerBase.SymbolAction(Microsoft.CodeAnalysis.Diagnostics.SymbolAnalysisContext context, System.Collections.Concurrent.ConcurrentDictionary> idToCachedResult) Line 70 C#
Microsoft.CodeAnalysis.Features.dll!Microsoft.CodeAnalysis.Diagnostics.Analyzers.NamingStyles.NamingStyleDiagnosticAnalyzerBase.CompilationStartAction.AnonymousMethod__0(Microsoft.CodeAnalysis.Diagnostics.SymbolAnalysisContext c) Line 49 C#
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor.ExecuteSymbolActionsCore.AnonymousMethod__38_1((System.Action action, Microsoft.CodeAnalysis.Diagnostics.SymbolAnalysisContext context) data) Line 379 C#
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor.ExecuteAndCatchIfThrows_NoLock, Microsoft.CodeAnalysis.Diagnostics.SymbolAnalysisContext>>(Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer analyzer, System.Action<(System.Action, Microsoft.CodeAnalysis.Diagnostics.SymbolAnalysisContext)> analyze, (System.Action, Microsoft.CodeAnalysis.Diagnostics.SymbolAnalysisContext) argument, Microsoft.CodeAnalysis.Diagnostics.AnalysisContextInfo? info) Line 1201 C#
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor.ExecuteAndCatchIfThrows, Microsoft.CodeAnalysis.Diagnostics.SymbolAnalysisContext>>(Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer analyzer, System.Action<(System.Action, Microsoft.CodeAnalysis.Diagnostics.SymbolAnalysisContext)> analyze, (System.Action, Microsoft.CodeAnalysis.Diagnostics.SymbolAnalysisContext) argument, Microsoft.CodeAnalysis.Diagnostics.AnalysisContextInfo? info) Line 1185 C#
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor.ExecuteSymbolActionsCore(System.Collections.Immutable.ImmutableArray symbolActions, Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer analyzer, Microsoft.CodeAnalysis.Diagnostics.SymbolDeclaredCompilationEvent symbolDeclaredEvent, System.Func getTopMostNodeForAnalysis, Microsoft.CodeAnalysis.Diagnostics.AnalysisState.AnalyzerStateData analyzerStateOpt, bool isGeneratedCodeSymbol) Line 377 C#
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor.TryExecuteSymbolActions(System.Collections.Immutable.ImmutableArray symbolActions, Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer analyzer, Microsoft.CodeAnalysis.Diagnostics.SymbolDeclaredCompilationEvent symbolDeclaredEvent, System.Func getTopMostNodeForAnalysis, Microsoft.CodeAnalysis.Diagnostics.AnalysisScope analysisScope, Microsoft.CodeAnalysis.Diagnostics.AnalysisState analysisStateOpt, bool isGeneratedCodeSymbol) Line 331 C#
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver.TryExecuteSymbolActions(Microsoft.CodeAnalysis.Diagnostics.SymbolDeclaredCompilationEvent symbolEvent, Microsoft.CodeAnalysis.Diagnostics.AnalysisScope analysisScope, Microsoft.CodeAnalysis.Diagnostics.AnalysisState analysisStateOpt, bool isGeneratedCodeSymbol, System.Threading.CancellationToken cancellationToken) Line 1000 C#
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver.TryProcessSymbolDeclared(Microsoft.CodeAnalysis.Diagnostics.SymbolDeclaredCompilationEvent symbolEvent, Microsoft.CodeAnalysis.Diagnostics.AnalysisScope analysisScope, Microsoft.CodeAnalysis.Diagnostics.AnalysisState analysisStateOpt, System.Threading.CancellationToken cancellationToken) Line 958 C#
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver.TryProcessEventCore(Microsoft.CodeAnalysis.Diagnostics.CompilationEvent e, Microsoft.CodeAnalysis.Diagnostics.AnalysisScope analysisScope, Microsoft.CodeAnalysis.Diagnostics.AnalysisState analysisStateOpt, System.Threading.CancellationToken cancellationToken) Line 919 C#
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver.ProcessEvent(Microsoft.CodeAnalysis.Diagnostics.CompilationEvent e, Microsoft.CodeAnalysis.Diagnostics.AnalysisScope analysisScope, Microsoft.CodeAnalysis.Diagnostics.AnalysisState analysisStateOpt, System.Threading.CancellationToken cancellationToken) Line 906 C#
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver.ProcessCompilationEventsCoreAsync(Microsoft.CodeAnalysis.Diagnostics.AnalysisScope analysisScope, Microsoft.CodeAnalysis.Diagnostics.AnalysisState analysisStateOpt, bool prePopulatedEventQueue, System.Threading.CancellationToken cancellationToken) Line 893 C#
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver.ProcessCompilationEventsAsync(Microsoft.CodeAnalysis.Diagnostics.AnalysisScope analysisScope, Microsoft.CodeAnalysis.Diagnostics.AnalysisState analysisStateOpt, bool prePopulatedEventQueue, System.Threading.CancellationToken cancellationToken) Line 826 C#
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver.ExecutePrimaryAnalysisTaskAsync(Microsoft.CodeAnalysis.Diagnostics.AnalysisScope analysisScope, Microsoft.CodeAnalysis.Diagnostics.AnalysisState analysisStateOpt, bool usingPrePopulatedEventQueue, System.Threading.CancellationToken cancellationToken) Line 418 C#
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver.AttachQueueAndProcessAllEventsAsync(Microsoft.CodeAnalysis.Diagnostics.AsyncQueue eventQueue, Microsoft.CodeAnalysis.Diagnostics.AnalysisScope analysisScope, Microsoft.CodeAnalysis.Diagnostics.AnalysisState analysisStateOpt, System.Threading.CancellationToken cancellationToken) Line 347 C#
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers.ComputeAnalyzerDiagnosticsCoreAsync(Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver driver, Microsoft.CodeAnalysis.Diagnostics.AsyncQueue eventQueue, Microsoft.CodeAnalysis.Diagnostics.AnalysisScope analysisScope, System.Threading.CancellationToken cancellationToken) Line 827 C#
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers.ComputeAnalyzerDiagnosticsAsync.AnonymousMethod__1() Line 659 C#
mscorlib.dll!System.Threading.Tasks.Task.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.Task.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() Unknown
mscorlib.dll!System.Threading.ThreadPoolWorkQueue.Dispatch() Unknown
mscorlib.dll!System.Threading._ThreadPoolWaitCallback.PerformWaitCallback() Unknown

```

It looks like something is going wrong in EditorConfigNamingStyleParser that's causing NamingRules to be created with the all-0 guid for the NamingStyleId

@dpoeschl It seems like the problem is that this method https://github.com/dotnet/roslyn/blob/master/src/Workspaces/Core/Portable/NamingStyles/EditorConfig/EditorConfigNamingStyleParser.cs#L53 blindly continues to create a NamingRule even if it wasn't able to get any NamingStyleData...

Moving to you to decide how to handle "incorrect" naming style rules.

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.

Yay for typo's 馃槃

Yep, fixing the typos gets rid of the crash.

Note - we're also seeing quite a few telemetry reports of this coming from non-fatal Watsons

@dpoeschl It sounds like we know what the underlying problem is, right?

@tmeschter - Yes. Tanner can't spell. :smile:

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

@dpoeschl No extra urgency; just trying to get a handle on where all of our Reliability issues stand for 15.3. We don't want to punt any of our remaining issues just because we ran out of time to investigate or fix.

Mondo escrow triage: potentially meets the bar; in the PR, please ensure that likelihood of hitting this is spelled out.

Was this page helpful?
0 / 5 - 0 ratings