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

VS IDE just disappears when changing signature of VB method #9719

Closed
DzonnyDZ opened this issue Mar 13, 2016 · 2 comments
Closed

VS IDE just disappears when changing signature of VB method #9719

DzonnyDZ opened this issue Mar 13, 2016 · 2 comments
Assignees
Labels
Area-Compilers Bug Tenet-Reliability Customer telemetry indicates that the product is failing in a crash/hang/dataloss manner.
Milestone

Comments

@DzonnyDZ
Copy link

Version Used: VS 2015 U1 14.0.24720.00

Steps to Reproduce:

  1. I have following header of VB function Public Function CreateConversionDelegate(Of TFrom, TTo)(conversion As Func(Of TFrom, TTo)) As Func(Of TFrom, TTo)
  2. I'm trying to add one more parameter in front of the conversion parameter
  3. So I start typing new parameter name just between ( and conversion
  4. No later than I type space after the parameter name Visual Studio crashes in a weird way

Expected Behavior:
No crash

Actual Behavior:
VS just turns off. No "Visual Studio stopped working" dialog as usual. It just disappears. See attachment, what I found in event log. (Unfortunately, Git Hub seems not to support EVTX files, so I'm attaching it ZIPped)

@DzonnyDZ
Copy link
Author

Unfortunately Git HUB does not allow me to attach the event log even when zipped.

@MattGertz MattGertz added this to the 1.3 milestone Mar 14, 2016
@MattGertz MattGertz added the Tenet-Reliability Customer telemetry indicates that the product is failing in a crash/hang/dataloss manner. label Mar 14, 2016
@Pilchie
Copy link
Member

Pilchie commented Mar 14, 2016

I was able to repro this by typing something As before the conversion parameter below:

<Assembly: CLSCompliant(True)>

Public Class C
    Public Function CreateConversionDelegate(Of TFrom, TTo)(conversion As Func(Of TFrom, TTo)) As Func(Of TFrom, TTo)
        Return Nothing
    End Function
End Class

Module Conversion

End Module

From @DzonnyDZ's event log which I got by email, the stack was:

Message: System.InvalidOperationException: Unexpected value 'Module' of type 'Microsoft.CodeAnalysis.TypeKind'
   at Microsoft.CodeAnalysis.VisualBasic.ClsComplianceChecker.ReportNonCompliantTypeArguments(TypeSymbol type, NamedTypeSymbol context, Symbol diagnosticSymbol)
   at Microsoft.CodeAnalysis.VisualBasic.ClsComplianceChecker.CheckParameterCompliance(ImmutableArray`1 parameters, NamedTypeSymbol context)
   at Microsoft.CodeAnalysis.VisualBasic.ClsComplianceChecker.VisitMethod(MethodSymbol symbol)
   at Microsoft.CodeAnalysis.VisualBasic.Symbols.MethodSymbol.Accept(VisualBasicSymbolVisitor visitor)
   at Microsoft.CodeAnalysis.VisualBasic.VisualBasicSymbolVisitor.Visit(Symbol symbol)
   at Microsoft.CodeAnalysis.VisualBasic.ClsComplianceChecker.VisitNamedType(NamedTypeSymbol symbol)
   at Microsoft.CodeAnalysis.VisualBasic.Symbols.NamedTypeSymbol.Accept(VisualBasicSymbolVisitor visitor)
   at Microsoft.CodeAnalysis.VisualBasic.VisualBasicSymbolVisitor.Visit(Symbol symbol)
   at Microsoft.CodeAnalysis.VisualBasic.ClsComplianceChecker.VisitNamespace(NamespaceSymbol symbol)
   at Microsoft.CodeAnalysis.VisualBasic.Symbols.NamespaceSymbol.Accept(VisualBasicSymbolVisitor visitor)
   at Microsoft.CodeAnalysis.VisualBasic.VisualBasicSymbolVisitor.Visit(Symbol symbol)
   at Microsoft.CodeAnalysis.VisualBasic.ClsComplianceChecker.VisitNamespace(NamespaceSymbol symbol)
   at Microsoft.CodeAnalysis.VisualBasic.Symbols.NamespaceSymbol.Accept(VisualBasicSymbolVisitor visitor)
   at Microsoft.CodeAnalysis.VisualBasic.VisualBasicSymbolVisitor.Visit(Symbol symbol)
   at Microsoft.CodeAnalysis.VisualBasic.ClsComplianceChecker.VisitNamespace(NamespaceSymbol symbol)
   at Microsoft.CodeAnalysis.VisualBasic.Symbols.NamespaceSymbol.Accept(VisualBasicSymbolVisitor visitor)
   at Microsoft.CodeAnalysis.VisualBasic.VisualBasicSymbolVisitor.Visit(Symbol symbol)
   at Microsoft.CodeAnalysis.VisualBasic.ClsComplianceChecker.VisitModule(ModuleSymbol symbol)
   at Microsoft.CodeAnalysis.VisualBasic.ClsComplianceChecker.VisitAssembly(AssemblySymbol symbol)
   at Microsoft.CodeAnalysis.VisualBasic.Symbols.AssemblySymbol.Accept(VisualBasicSymbolVisitor visitor)
   at Microsoft.CodeAnalysis.VisualBasic.VisualBasicSymbolVisitor.Visit(Symbol symbol)
   at Microsoft.CodeAnalysis.VisualBasic.ClsComplianceChecker.CheckCompliance(VisualBasicCompilation compilation, DiagnosticBag diagnostics, CancellationToken cancellationToken, SyntaxTree filterTree, Nullable`1 filterSpanWithinTree)
   at Microsoft.CodeAnalysis.VisualBasic.VisualBasicCompilation.GetClsComplianceDiagnostics(CancellationToken cancellationToken, SyntaxTree filterTree, Nullable`1 filterSpanWithinTree)
   at Microsoft.CodeAnalysis.VisualBasic.VisualBasicCompilation.GetDiagnosticsForSyntaxTree(CompilationStage stage, SyntaxTree tree, Nullable`1 filterSpanWithinTree, Boolean includeEarlierStages, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.VisualBasic.SyntaxTreeSemanticModel.GetDiagnostics(Nullable`1 span, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver.CompilationData.GetOrCreateCachedSemanticModel(SyntaxTree tree, Compilation compilation, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers.<>c__DisplayClass50_0.<GetAnalyzerSemanticDiagnosticsCoreAsync>b__0()
   at Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers.<ComputeAnalyzerDiagnosticsAsync>d__51.MoveNext()

@jaredpar jaredpar added the Bug label Mar 14, 2016
@jaredpar jaredpar assigned khyperia and unassigned jcouv May 9, 2016
khyperia added a commit that referenced this issue May 11, 2016
Fix #9719: Add Module kind to CLS Compliance checker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Bug Tenet-Reliability Customer telemetry indicates that the product is failing in a crash/hang/dataloss manner.
Projects
None yet
Development

No branches or pull requests

6 participants