none
Visual studio enterprise 2015 vbc.exe crash on building vbproj

    Question

  • Hi

    I have installed Visual studio enterprise 2015 installed on Windows server 2012 R2

    I had to migrate from VS2013 to VS2015 and almost all *.vbproj projects build successfully except 2 projects(vbproj) constantly vbc.exe crashes while Release or Debug  build.

    Please find the below error log from event viewer

    Application: vbc.exe
    Framework Version: v4.0.30319
    Description: The application requested process termination through System.Environment.FailFast(string message).
    Message: System.NullReferenceException: Object reference not set to an instance of an object.
       at Microsoft.CodeAnalysis.VisualBasic.NamespaceScopeBuilder.BuildNamespaceScope(PEModuleBuilder moduleBuilder, Dictionary`2 xmlNamespaces, IEnumerable`1 aliasImports, ImmutableArray`1 memberImports, DiagnosticBag diagnostics)
       at Microsoft.CodeAnalysis.VisualBasic.Symbols.SourceFile.TranslateImports(PEModuleBuilder moduleBuilder, DiagnosticBag diagnostics)
       at Microsoft.CodeAnalysis.VisualBasic.MethodCompiler.GenerateMethodBody(PEModuleBuilder moduleBuilder, MethodSymbol method, Int32 methodOrdinal, BoundStatement block, ImmutableArray`1 lambdaDebugInfo, ImmutableArray`1 closureDebugInfo, StateMachineTypeSymbol stateMachineTypeOpt, VariableSlotAllocator variableSlotAllocatorOpt, DebugDocumentProvider debugDocumentProvider, DiagnosticBag diagnostics, Boolean emittingPdb)
       at Microsoft.CodeAnalysis.VisualBasic.MethodCompiler.LowerAndEmitMethod(MethodSymbol method, Int32 methodOrdinal, BoundBlock block, Binder binderOpt, TypeCompilationState compilationState, DiagnosticBag diagsForCurrentMethod, ProcessedFieldOrPropertyInitializers processedInitializers, SynthesizedSubmissionFields previousSubmissionFields, MethodSymbol constructorToInject, Int32& delegateRelaxationIdDispenser)
       at Microsoft.CodeAnalysis.VisualBasic.MethodCompiler.CompileMethod(MethodSymbol method, Int32 methodOrdinal, Int32& withEventPropertyIdDispenser, Int32& delegateRelaxationIdDispenser, Predicate`1 filter, TypeCompilationState compilationState, ProcessedFieldOrPropertyInitializers processedInitializers, Binder containingTypeBinder, SynthesizedSubmissionFields previousSubmissionFields, MethodSymbol& referencedConstructor)
       at Microsoft.CodeAnalysis.VisualBasic.MethodCompiler.CompileNamedType(NamedTypeSymbol containingType, Predicate`1 filter)
       at Microsoft.CodeAnalysis.VisualBasic.MethodCompiler._Closure$__30-0._Lambda$__0()
    Stack:
       at System.Environment.FailFast(System.String, System.Exception)
       at Microsoft.CodeAnalysis.FatalError.Report(System.Exception, System.Action`1<System.Exception>)
       at Microsoft.CodeAnalysis.FatalError.ReportUnlessCanceled(System.Exception)
       at Microsoft.CodeAnalysis.VisualBasic.MethodCompiler+_Closure$__30-0._Lambda$__0()
       at Microsoft.CodeAnalysis.VisualBasic.NamespaceScopeBuilder.BuildNamespaceScope(Microsoft.CodeAnalysis.VisualBasic.Emit.PEModuleBuilder, System.Collections.Generic.Dictionary`2<System.String,Microsoft.CodeAnalysis.VisualBasic.XmlNamespaceAndImportsClausePosition>, System.Collections.Generic.IEnumerable`1<Microsoft.CodeAnalysis.VisualBasic.AliasAndImportsClausePosition>, System.Collections.Immutable.ImmutableArray`1<Microsoft.CodeAnalysis.VisualBasic.NamespaceOrTypeAndImportsClausePosition>, Microsoft.CodeAnalysis.DiagnosticBag)
       at Microsoft.CodeAnalysis.VisualBasic.Symbols.SourceFile.TranslateImports(Microsoft.CodeAnalysis.VisualBasic.Emit.PEModuleBuilder, Microsoft.CodeAnalysis.DiagnosticBag)
       at Microsoft.CodeAnalysis.VisualBasic.MethodCompiler.GenerateMethodBody(Microsoft.CodeAnalysis.VisualBasic.Emit.PEModuleBuilder, Microsoft.CodeAnalysis.VisualBasic.Symbols.MethodSymbol, Int32, Microsoft.CodeAnalysis.VisualBasic.BoundStatement, System.Collections.Immutable.ImmutableArray`1<Microsoft.CodeAnalysis.CodeGen.LambdaDebugInfo>, System.Collections.Immutable.ImmutableArray`1<Microsoft.CodeAnalysis.CodeGen.ClosureDebugInfo>, Microsoft.CodeAnalysis.VisualBasic.StateMachineTypeSymbol, Microsoft.CodeAnalysis.CodeGen.VariableSlotAllocator, Microsoft.CodeAnalysis.CodeGen.DebugDocumentProvider, Microsoft.CodeAnalysis.DiagnosticBag, Boolean)
       at Microsoft.CodeAnalysis.VisualBasic.MethodCompiler.LowerAndEmitMethod(Microsoft.CodeAnalysis.VisualBasic.Symbols.MethodSymbol, Int32, Microsoft.CodeAnalysis.VisualBasic.BoundBlock, Microsoft.CodeAnalysis.VisualBasic.Binder, Microsoft.CodeAnalysis.VisualBasic.TypeCompilationState, Microsoft.CodeAnalysis.DiagnosticBag, ProcessedFieldOrPropertyInitializers, Microsoft.CodeAnalysis.VisualBasic.SynthesizedSubmissionFields, Microsoft.CodeAnalysis.VisualBasic.Symbols.MethodSymbol, Int32 ByRef)
       at Microsoft.CodeAnalysis.VisualBasic.MethodCompiler.CompileMethod(Microsoft.CodeAnalysis.VisualBasic.Symbols.MethodSymbol, Int32, Int32 ByRef, Int32 ByRef, System.Predicate`1<Microsoft.CodeAnalysis.VisualBasic.Symbol>, Microsoft.CodeAnalysis.VisualBasic.TypeCompilationState, ProcessedFieldOrPropertyInitializers, Microsoft.CodeAnalysis.VisualBasic.Binder, Microsoft.CodeAnalysis.VisualBasic.SynthesizedSubmissionFields, Microsoft.CodeAnalysis.VisualBasic.Symbols.MethodSymbol ByRef)
       at Microsoft.CodeAnalysis.VisualBasic.MethodCompiler.CompileNamedType(Microsoft.CodeAnalysis.VisualBasic.Symbols.NamedTypeSymbol, System.Predicate`1<Microsoft.CodeAnalysis.VisualBasic.Symbol>)
       at Microsoft.CodeAnalysis.VisualBasic.MethodCompiler+_Closure$__30-0._Lambda$__0()
       at Roslyn.Utilities.UICultureUtilities+<>c__DisplayClass5_0.<WithCurrentUICulture>b__0()
       at System.Threading.Tasks.Task.Execute()
       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.ThreadPoolWorkQueue.Dispatch()

    Thanks,

    KAV


    KAV


    • Edited by MeghaGowda Wednesday, December 02, 2015 5:40 PM
    Tuesday, December 01, 2015 9:19 PM

All replies

  • Hi KAV,

    Thanks for your post.

    From the information you offered.

    I suspect if the cause was in your VS2015 or your local environment.

    In order to verify it. I suggest you could build these two projects on another machine which has VS2015 Enterprise edition.

    1. If it works fine on other machine. I think the problem was in your local environment.

    In the case, you’d better close all third party application in Test Manager or restart your machine then try it again.

    If still no help. I suggest you could repair your VS2015 or install the VS2015 update1 RTM. Then try it again.

    2. If same error occurred on another machine. I think the cause is probably related to these two projects(vbproj)

    I suppose if there was something wrong in these two projects(vbproj) which cause the  vbc.exe crashed.

    In this case, I suggest you could create two new empty solutions, then copy the files into these new empty solutions. Then  try to build these new solutions.

    Best Regards,

    Lake  Xiao

    Thursday, December 03, 2015 8:45 AM
    Moderator