{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/31314","repository_url":"https://api.github.com/repos/dotnet/roslyn","labels_url":"https://api.github.com/repos/dotnet/roslyn/issues/31314/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/31314/comments","events_url":"https://api.github.com/repos/dotnet/roslyn/issues/31314/events","html_url":"https://github.com/dotnet/roslyn/issues/31314","id":383410463,"node_id":"MDU6SXNzdWUzODM0MTA0NjM=","number":31314,"title":"Malformed XML doc comments classified incorrectly and cause first-chance exceptions","user":{"login":"KirillOsenkov","id":679326,"node_id":"MDQ6VXNlcjY3OTMyNg==","avatar_url":"https://avatars0.githubusercontent.com/u/679326?v=4","gravatar_id":"","url":"https://api.github.com/users/KirillOsenkov","html_url":"https://github.com/KirillOsenkov","followers_url":"https://api.github.com/users/KirillOsenkov/followers","following_url":"https://api.github.com/users/KirillOsenkov/following{/other_user}","gists_url":"https://api.github.com/users/KirillOsenkov/gists{/gist_id}","starred_url":"https://api.github.com/users/KirillOsenkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KirillOsenkov/subscriptions","organizations_url":"https://api.github.com/users/KirillOsenkov/orgs","repos_url":"https://api.github.com/users/KirillOsenkov/repos","events_url":"https://api.github.com/users/KirillOsenkov/events{/privacy}","received_events_url":"https://api.github.com/users/KirillOsenkov/received_events","type":"User","site_admin":false},"labels":[{"id":166377917,"node_id":"MDU6TGFiZWwxNjYzNzc5MTc=","url":"https://api.github.com/repos/dotnet/roslyn/labels/Area-IDE","name":"Area-IDE","color":"5319e7","default":false},{"id":320110822,"node_id":"MDU6TGFiZWwzMjAxMTA4MjI=","url":"https://api.github.com/repos/dotnet/roslyn/labels/Concept-Continuous%20Improvement","name":"Concept-Continuous Improvement","color":"fef2c0","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-22T07:28:27Z","updated_at":"2018-11-26T14:51:43Z","closed_at":null,"author_association":"MEMBER","body":"**Version Used**: \r\nNov 21 2018 `1fbd48157d9196ad227f120b731d3f80b1b162de`\r\n\r\nNot sure if anything can be done in this case but I'm filing just in case.\r\n\r\n**Steps to Reproduce**:\r\n\r\n```\r\n/// <summary>\r\n/// <a: b, c />.\r\n/// </summary>\r\nclass C { }\r\n```\r\n\r\n**Expected Behavior**:\r\nNot sure if we can do a better job in this case\r\n\r\n**Actual Behavior**:\r\nFirst-chance XmlException:\r\n\r\n```\r\nSystem.Xml.XmlException: Name cannot begin with the ' ' character, hexadecimal value 0x20. Line 2, position 16.\r\n   at void System.Xml.XmlTextReaderImpl.Throw(Exception e)\r\n   at void System.Xml.XmlTextReaderImpl.Throw(string res, string[] args)\r\n   at int System.Xml.XmlTextReaderImpl.ParseQName(bool isQName, int startOffset, out int colonPos)\r\n   at void System.Xml.XmlTextReaderImpl.ParseElement()\r\n   at bool System.Xml.XmlTextReaderImpl.ParseElementContent()\r\n   at bool System.Xml.XmlTextReaderImpl.Read()\r\n   at XmlException Microsoft.CodeAnalysis.XmlDocumentationCommentTextReader.ParseInternal(string text)\r\n   at XmlException Microsoft.CodeAnalysis.XmlDocumentationCommentTextReader.ParseAndGetException(string text)\r\n   at bool Microsoft.CodeAnalysis.CSharp.DocumentationCommentCompiler.TryProcessDocumentationCommentTriviaNodes(Symbol symbol, bool isPartialMethodDefinitionPart, ImmutableArray<DocumentationCommentTriviaSyntax> docCommentNodes, bool reportParameterOrTypeParameterDiagnostics, out string withUnprocessedIncludes, out bool haveParseError, out HashSet<TypeParameterSymbol> documentedTypeParameters, out HashSet<ParameterSymbol> documentedParameters, out ImmutableArray<CSharpSyntaxNode> includeElementNodes)\r\n   at void Microsoft.CodeAnalysis.CSharp.DocumentationCommentCompiler.DefaultVisit(Symbol symbol)\r\n   at void Microsoft.CodeAnalysis.CSharp.DocumentationCommentCompiler.VisitNamedType(NamedTypeSymbol symbol)\r\n   at void Microsoft.CodeAnalysis.CSharp.Symbols.NamedTypeSymbol.Accept(CSharpSymbolVisitor visitor)\r\n   at void Microsoft.CodeAnalysis.CSharp.DocumentationCommentCompiler.VisitNamespace(NamespaceSymbol symbol)\r\n   at void Microsoft.CodeAnalysis.CSharp.Symbols.NamespaceSymbol.Accept(CSharpSymbolVisitor visitor)\r\n   at void Microsoft.CodeAnalysis.CSharp.CSharpSymbolVisitor.Visit(Symbol symbol)\r\n   at void Microsoft.CodeAnalysis.CSharp.DocumentationCommentCompiler.WriteDocumentationCommentXml(CSharpCompilation compilation, string assemblyName, Stream xmlDocStream, DiagnosticBag diagnostics, CancellationToken cancellationToken, SyntaxTree filterTree, Nullable<TextSpan> filterSpanWithinTree)\r\n   at ImmutableArray<Diagnostic> Microsoft.CodeAnalysis.CSharp.CSharpCompilation.GetDiagnosticsForMethodBodiesInTree(SyntaxTree tree, Nullable<TextSpan> span, CancellationToken cancellationToken)\r\n   at ImmutableArray<Diagnostic> Microsoft.CodeAnalysis.CSharp.CSharpCompilation.GetDiagnosticsForSyntaxTree(CompilationStage stage, SyntaxTree syntaxTree, Nullable<TextSpan> filterSpanWithinTree, bool includeEarlierStages, CancellationToken cancellationToken)\r\n   at ImmutableArray<Diagnostic> Microsoft.CodeAnalysis.CSharp.SyntaxTreeSemanticModel.GetDiagnostics(Nullable<TextSpan> span, CancellationToken cancellationToken)\r\n   at void Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers.GenerateCompilationEvents(AnalysisScope analysisScope, CancellationToken cancellationToken)\r\n   at async Task Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers.GenerateCompilationEventsAndPopulateEventsCacheAsync(AnalysisScope analysisScope, AnalyzerDriver driver, CancellationToken cancellationToken)\r\n   at void System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start<TStateMachine>(ref TStateMachine stateMachine)\r\n   at Task Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers.GenerateCompilationEventsAndPopulateEventsCacheAsync(AnalysisScope analysisScope, AnalyzerDriver driver, CancellationToken cancellationToken)\r\n   at async Task Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers.ComputeAnalyzerDiagnosticsAsync(AnalysisScope analysisScope, Func<AsyncQueue<CompilationEvent>> getEventQueue, int newTaskToken, CancellationToken cancellationToken)\r\n   at void System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start<TStateMachine>(ref TStateMachine stateMachine)\r\n   at Task Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers.ComputeAnalyzerDiagnosticsAsync(AnalysisScope analysisScope, Func<AsyncQueue<CompilationEvent>> getEventQueue, int newTaskToken, CancellationToken cancellationToken)\r\n   at async Task<ImmutableArray<Diagnostic>> Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers.GetAnalyzerSemanticDiagnosticsCoreAsync(SemanticModel model, Nullable<TextSpan> filterSpan, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken)\r\n   at void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<TResult>.Start<TStateMachine>(ref TStateMachine stateMachine)\r\n   at Task<ImmutableArray<Diagnostic>> Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers.GetAnalyzerSemanticDiagnosticsCoreAsync(SemanticModel model, Nullable<TextSpan> filterSpan, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken)\r\n   at async Task<ImmutableArray<Diagnostic>> Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers.GetAnalyzerSemanticDiagnosticsAsync(SemanticModel model, Nullable<TextSpan> filterSpan, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken)\r\n   at void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<TResult>.Start<TStateMachine>(ref TStateMachine stateMachine)\r\n   at Task<ImmutableArray<Diagnostic>> Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers.GetAnalyzerSemanticDiagnosticsAsync(SemanticModel model, Nullable<TextSpan> filterSpan, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken)\r\n   at async Task<IEnumerable<Diagnostic>> Microsoft.CodeAnalysis.Diagnostics.EngineV2.DiagnosticIncrementalAnalyzer+Executor.ComputeDiagnosticAnalyzerDiagnosticsAsync(CompilationWithAnalyzers analyzerDriverOpt, Document document, DiagnosticAnalyzer analyzer, AnalysisKind kind, Nullable<TextSpan> spanOpt, CancellationToken cancellationToken)\r\n   at void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<TResult>.Start<TStateMachine>(ref TStateMachine stateMachine)\r\n   at Task<IEnumerable<Diagnostic>> Microsoft.CodeAnalysis.Diagnostics.EngineV2.DiagnosticIncrementalAnalyzer+Executor.ComputeDiagnosticAnalyzerDiagnosticsAsync(CompilationWithAnalyzers analyzerDriverOpt, Document document, DiagnosticAnalyzer analyzer, AnalysisKind kind, Nullable<TextSpan> spanOpt, CancellationToken cancellationToken)\r\n   at async Task<IEnumerable<DiagnosticData>> Microsoft.CodeAnalysis.Diagnostics.EngineV2.DiagnosticIncrementalAnalyzer+Executor.ComputeDiagnosticsAsync(CompilationWithAnalyzers analyzerDriverOpt, Document document, DiagnosticAnalyzer analyzer, AnalysisKind kind, Nullable<TextSpan> spanOpt, CancellationToken cancellationToken)\r\n   at void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<TResult>.Start<TStateMachine>(ref TStateMachine stateMachine)\r\n   at Task<IEnumerable<DiagnosticData>> Microsoft.CodeAnalysis.Diagnostics.EngineV2.DiagnosticIncrementalAnalyzer+Executor.ComputeDiagnosticsAsync(CompilationWithAnalyzers analyzerDriverOpt, Document document, DiagnosticAnalyzer analyzer, AnalysisKind kind, Nullable<TextSpan> spanOpt, CancellationToken cancellationToken)\r\n   at async Task<DocumentAnalysisData> Microsoft.CodeAnalysis.Diagnostics.EngineV2.DiagnosticIncrementalAnalyzer+Executor.GetDocumentAnalysisDataAsync(CompilationWithAnalyzers analyzerDriverOpt, Document document, StateSet stateSet, AnalysisKind kind, CancellationToken cancellationToken)\r\n   at void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<TResult>.Start<TStateMachine>(ref TStateMachine stateMachine)\r\n   at Task<DocumentAnalysisData> Microsoft.CodeAnalysis.Diagnostics.EngineV2.DiagnosticIncrementalAnalyzer+Executor.GetDocumentAnalysisDataAsync(CompilationWithAnalyzers analyzerDriverOpt, Document document, StateSet stateSet, AnalysisKind kind, CancellationToken cancellationToken)\r\n   at async Task Microsoft.CodeAnalysis.Diagnostics.EngineV2.DiagnosticIncrementalAnalyzer.AnalyzeDocumentForKindAsync(Document document, AnalysisKind kind, CancellationToken cancellationToken)\r\n   at void System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.InvokeMoveNext(object stateMachine)\r\n   at void System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run()\r\n   at void System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(Action action, bool allowInlining, ref Task currentTask)\r\n   at void System.Threading.Tasks.Task.FinishContinuations()\r\n   at void System.Threading.Tasks.Task.FinishStageThree()\r\n   at bool System.Threading.Tasks.Task<TResult>.TrySetResult(TResult result)\r\n   at void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<TResult>.SetResult(TResult result)\r\n   at async Task<DocumentAnalysisData> Microsoft.CodeAnalysis.Diagnostics.EngineV2.DiagnosticIncrementalAnalyzer+Executor.GetDocumentAnalysisDataAsync(CompilationWithAnalyzers analyzerDriverOpt, Document document, StateSet stateSet, AnalysisKind kind, CancellationToken cancellationToken)\r\n   at void System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.InvokeMoveNext(object stateMachine)\r\n   at void System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run()\r\n   at void System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(Action action, bool allowInlining, ref Task currentTask)\r\n   at void System.Threading.Tasks.Task.FinishContinuations()\r\n   at void System.Threading.Tasks.Task.FinishStageThree()\r\n   at bool System.Threading.Tasks.Task<TResult>.TrySetResult(TResult result)\r\n   at void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<TResult>.SetResult(TResult result)\r\n   at async Task<IEnumerable<DiagnosticData>> Microsoft.CodeAnalysis.Diagnostics.EngineV2.DiagnosticIncrementalAnalyzer+Executor.ComputeDiagnosticsAsync(CompilationWithAnalyzers analyzerDriverOpt, Document document, DiagnosticAnalyzer analyzer, AnalysisKind kind, Nullable<TextSpan> spanOpt, CancellationToken cancellationToken)\r\n   at void System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.InvokeMoveNext(object stateMachine)\r\n   at void System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run()\r\n   at void System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(Action action, bool allowInlining, ref Task currentTask)\r\n   at void System.Threading.Tasks.Task.FinishContinuations()\r\n   at void System.Threading.Tasks.Task.FinishStageThree()\r\n   at bool System.Threading.Tasks.Task<TResult>.TrySetResult(TResult result)\r\n   at void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<TResult>.SetResult(TResult result)\r\n   at async Task<IEnumerable<Diagnostic>> Microsoft.CodeAnalysis.Diagnostics.EngineV2.DiagnosticIncrementalAnalyzer+Executor.ComputeDiagnosticAnalyzerDiagnosticsAsync(CompilationWithAnalyzers analyzerDriverOpt, Document document, DiagnosticAnalyzer analyzer, AnalysisKind kind, Nullable<TextSpan> spanOpt, CancellationToken cancellationToken)\r\n   at void System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.InvokeMoveNext(object stateMachine)\r\n   at void System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run()\r\n   at void System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(Action action, bool allowInlining, ref Task currentTask)\r\n   at void System.Threading.Tasks.Task.FinishContinuations()\r\n   at void System.Threading.Tasks.Task.FinishStageThree()\r\n   at bool System.Threading.Tasks.Task<TResult>.TrySetResult(TResult result)\r\n   at void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<TResult>.SetResult(TResult result)\r\n   at async Task<ImmutableArray<Diagnostic>> Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers.GetAnalyzerSemanticDiagnosticsAsync(SemanticModel model, Nullable<TextSpan> filterSpan, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken)\r\n   at void System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.InvokeMoveNext(object stateMachine)\r\n   at void System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run()\r\n   at void System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(Action action, bool allowInlining, ref Task currentTask)\r\n   at void System.Threading.Tasks.Task.FinishContinuations()\r\n   at void System.Threading.Tasks.Task.FinishStageThree()\r\n   at bool System.Threading.Tasks.Task<TResult>.TrySetResult(TResult result)\r\n   at void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<TResult>.SetResult(TResult result)\r\n   at async Task<ImmutableArray<Diagnostic>> Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers.GetAnalyzerSemanticDiagnosticsCoreAsync(SemanticModel model, Nullable<TextSpan> filterSpan, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken)\r\n   at void System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.InvokeMoveNext(object stateMachine)\r\n   at void System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run()\r\n   at void System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(Action action, bool allowInlining, ref Task currentTask)\r\n   at void System.Threading.Tasks.Task.FinishContinuations()\r\n   at void System.Threading.Tasks.Task.FinishStageThree()\r\n   at bool System.Threading.Tasks.Task<TResult>.TrySetResult(TResult result)\r\n   at void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<TResult>.SetResult(TResult result)\r\n   at void System.Runtime.CompilerServices.AsyncTaskMethodBuilder.SetResult()\r\n   at async Task Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers.ComputeAnalyzerDiagnosticsAsync(AnalysisScope analysisScope, Func<AsyncQueue<CompilationEvent>> getEventQueue, int newTaskToken, CancellationToken cancellationToken)\r\n   at void System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.InvokeMoveNext(object stateMachine)\r\n   at void System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run()\r\n   at void System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(Action action, bool allowInlining, ref Task currentTask)\r\n   at void System.Threading.Tasks.Task.FinishContinuations()\r\n   at void System.Threading.Tasks.Task.FinishStageThree()\r\n   at bool System.Threading.Tasks.Task<TResult>.TrySetResult(TResult result)\r\n   at bool System.Threading.Tasks.UnwrapPromise<TResult>.TrySetFromTask(Task task, bool lookForOce)\r\n   at void System.Threading.Tasks.UnwrapPromise<TResult>.ProcessInnerTask(Task task)\r\n   at void System.Threading.Tasks.UnwrapPromise<TResult>.ProcessCompletedOuterTask(Task task)\r\n   at void System.Threading.Tasks.UnwrapPromise<TResult>.InvokeCore(Task completingTask)\r\n   at void System.Threading.Tasks.UnwrapPromise<TResult>.Invoke(Task completingTask)\r\n   at void System.Threading.Tasks.Task.FinishContinuations()\r\n   at void System.Threading.Tasks.Task.FinishStageThree()\r\n   at void System.Threading.Tasks.Task.FinishStageTwo()\r\n   at void System.Threading.Tasks.Task.Finish(bool bUserDelegateExecuted)\r\n   at void System.Threading.Tasks.Task.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()\r\n   at bool System.Threading.ThreadPoolWorkQueue.Dispatch()\r\n   at bool System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()\r\n```"},"comment":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/comments/441665429","html_url":"https://github.com/dotnet/roslyn/issues/31314#issuecomment-441665429","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/31314","id":441665429,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MTY2NTQyOQ==","user":{"login":"sharwell","id":1408396,"node_id":"MDQ6VXNlcjE0MDgzOTY=","avatar_url":"https://avatars1.githubusercontent.com/u/1408396?v=4","gravatar_id":"","url":"https://api.github.com/users/sharwell","html_url":"https://github.com/sharwell","followers_url":"https://api.github.com/users/sharwell/followers","following_url":"https://api.github.com/users/sharwell/following{/other_user}","gists_url":"https://api.github.com/users/sharwell/gists{/gist_id}","starred_url":"https://api.github.com/users/sharwell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharwell/subscriptions","organizations_url":"https://api.github.com/users/sharwell/orgs","repos_url":"https://api.github.com/users/sharwell/repos","events_url":"https://api.github.com/users/sharwell/events{/privacy}","received_events_url":"https://api.github.com/users/sharwell/received_events","type":"User","site_admin":false},"created_at":"2018-11-26T14:51:43Z","updated_at":"2018-11-26T14:51:43Z","author_association":"MEMBER","body":"💭 It seems reasonable to at least continue classifying the text as a comment in these cases."}}
{"actor":{"display_login":"sharwell"}}