Skip to content

Null Refs from GetBucketSize #28133

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

Closed
ryanbrandenburg opened this issue Jun 26, 2018 · 3 comments
Closed

Null Refs from GetBucketSize #28133

ryanbrandenburg opened this issue Jun 26, 2018 · 3 comments
Labels
Area-Compilers Area-External Resolution-Fixed The bug has been fixed and/or the requested behavior has been implemented

Comments

@ryanbrandenburg
Copy link
Contributor

Version Used: 2.8.0

Stack:

System.NullReferenceException: Object reference not set to an instance of an object.
2018-06-20T23:18:00.2836133Z       at Microsoft.CodeAnalysis.CodeGen.SwitchIntegralJumpTableEmitter.SwitchBucket.GetBucketSize(ConstantValue startConstant, ConstantValue endConstant)
2018-06-20T23:18:00.2851556Z       at Microsoft.CodeAnalysis.CodeGen.SwitchIntegralJumpTableEmitter.SwitchBucket.BucketOverflow(ConstantValue startConstant, ConstantValue endConstant)
2018-06-20T23:18:00.2948469Z       at Microsoft.CodeAnalysis.CodeGen.SwitchIntegralJumpTableEmitter.SwitchBucket.MergeIsAdvantageous(SwitchBucket bucket1, SwitchBucket bucket2)
2018-06-20T23:18:00.2964203Z       at Microsoft.CodeAnalysis.CodeGen.SwitchIntegralJumpTableEmitter.GenerateSwitchBuckets(Int32 startLabelIndex, Int32 endLabelIndex)
2018-06-20T23:18:00.2979387Z       at Microsoft.CodeAnalysis.CodeGen.SwitchIntegralJumpTableEmitter.EmitJumpTable()
2018-06-20T23:18:00.2996510Z       at Microsoft.CodeAnalysis.CodeGen.ILBuilder.EmitIntegerSwitchJumpTable(KeyValuePair`2[] caseLabels, Object fallThroughLabel, LocalOrParameter key, PrimitiveTypeCode keyTypeCode)
2018-06-20T23:18:00.3014113Z       at Microsoft.CodeAnalysis.CSharp.CodeGen.CodeGenerator.EmitSwitchHeader(BoundSwitchStatement switchStatement, BoundExpression expression, KeyValuePair`2[] switchCaseLabels, LabelSymbol fallThroughLabel)
2018-06-20T23:18:00.3151488Z       at Microsoft.CodeAnalysis.CSharp.CodeGen.CodeGenerator.EmitSwitchStatement(BoundSwitchStatement switchStatement)
2018-06-20T23:18:00.3168245Z       at Microsoft.CodeAnalysis.CSharp.CodeGen.CodeGenerator.EmitStatement(BoundStatement statement)
2018-06-20T23:18:00.3184526Z       at Microsoft.CodeAnalysis.CSharp.CodeGen.CodeGenerator.EmitStatements(ImmutableArray`1 statements)
2018-06-20T23:18:00.3199833Z       at Microsoft.CodeAnalysis.CSharp.CodeGen.CodeGenerator.EmitBlock(BoundBlock block)
2018-06-20T23:18:00.3215563Z       at Microsoft.CodeAnalysis.CSharp.CodeGen.CodeGenerator.EmitTryStatement(BoundTryStatement statement, Boolean emitCatchesOnly)
2018-06-20T23:18:00.3311412Z       at Microsoft.CodeAnalysis.CSharp.CodeGen.CodeGenerator.EmitStatement(BoundStatement statement)
2018-06-20T23:18:00.3327126Z       at Microsoft.CodeAnalysis.CSharp.CodeGen.CodeGenerator.EmitStatements(ImmutableArray`1 statements)
2018-06-20T23:18:00.3342734Z       at Microsoft.CodeAnalysis.CSharp.CodeGen.CodeGenerator.EmitBlock(BoundBlock block)
2018-06-20T23:18:00.3358070Z       at Microsoft.CodeAnalysis.CSharp.CodeGen.CodeGenerator.EmitStatement(BoundStatement statement)
2018-06-20T23:18:00.3373822Z       at Microsoft.CodeAnalysis.CSharp.CodeGen.CodeGenerator.EmitStatementAndCountInstructions(BoundStatement statement)
2018-06-20T23:18:00.3470004Z       at Microsoft.CodeAnalysis.CSharp.CodeGen.CodeGenerator.EmitSequencePointStatement(BoundSequencePoint node)
2018-06-20T23:18:00.3485625Z       at Microsoft.CodeAnalysis.CSharp.CodeGen.CodeGenerator.EmitStatement(BoundStatement statement)
2018-06-20T23:18:00.3501330Z       at Microsoft.CodeAnalysis.CSharp.CodeGen.CodeGenerator.EmitStatements(ImmutableArray`1 statements)
2018-06-20T23:18:00.3517485Z       at Microsoft.CodeAnalysis.CSharp.CodeGen.CodeGenerator.EmitBlock(BoundBlock block)
2018-06-20T23:18:00.3532247Z       at Microsoft.CodeAnalysis.CSharp.CodeGen.CodeGenerator.EmitStatement(BoundStatement statement)
2018-06-20T23:18:00.3548006Z       at Microsoft.CodeAnalysis.CSharp.CodeGen.CodeGenerator.GenerateImpl()
2018-06-20T23:18:00.3563711Z       at Microsoft.CodeAnalysis.CSharp.CodeGen.CodeGenerator.Generate(Int32& asyncCatchHandlerOffset, ImmutableArray`1& asyncYieldPoints, ImmutableArray`1& asyncResumePoints)
2018-06-20T23:18:00.3580885Z       at Microsoft.CodeAnalysis.CSharp.MethodCompiler.GenerateMethodBody(PEModuleBuilder moduleBuilder, MethodSymbol method, Int32 methodOrdinal, BoundStatement block, ImmutableArray`1 lambdaDebugInfo, ImmutableArray`1 closureDebugInfo, StateMachineTypeSymbol stateMachineTypeOpt, VariableSlotAllocator variableSlotAllocatorOpt, DiagnosticBag diagnostics, DebugDocumentProvider debugDocumentProvider, ImportChain importChainOpt, Boolean emittingPdb, Boolean emitTestCoverageData, ImmutableArray`1 dynamicAnalysisSpans)
2018-06-20T23:18:00.3599569Z       at Microsoft.CodeAnalysis.CSharp.MethodCompiler.CompileSynthesizedMethods(TypeCompilationState compilationState)
2018-06-20T23:18:00.3614922Z       at Microsoft.CodeAnalysis.CSharp.MethodCompiler.CompileNamedType(NamedTypeSymbol containingType)
2018-06-20T23:18:00.3630347Z       at Microsoft.CodeAnalysis.CSharp.MethodCompiler.<>c__DisplayClass21_0.<CompileNamedTypeAsTask>b__0()
2018-06-20T23:18:00.3646579Z       at Roslyn.Utilities.UICultureUtilities.<>c__DisplayClass5_0.<WithCurrentUICulture>b__0()
2018-06-20T23:18:00.3661924Z       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
2018-06-20T23:18:00.3681779Z    --- End of stack trace from previous location where exception was thrown ---
2018-06-20T23:18:00.3698443Z       at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
2018-06-20T23:18:00.3716383Z    --- End of stack trace from previous location where exception was thrown ---
2018-06-20T23:18:00.3732232Z       at Microsoft.CodeAnalysis.CSharp.MethodCompiler.WaitForWorkers()
2018-06-20T23:18:00.3750706Z       at Microsoft.CodeAnalysis.CSharp.MethodCompiler.CompileMethodBodies(CSharpCompilation compilation, PEModuleBuilder moduleBeingBuiltOpt, Boolean emittingPdb, Boolean emitTestCoverageData, Boolean hasDeclarationErrors, DiagnosticBag diagnostics, Predicate`1 filterOpt, CancellationToken cancellationToken)
2018-06-20T23:18:00.3768413Z       at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.CompileMethods(CommonPEModuleBuilder moduleBuilder, Boolean emittingPdb, Boolean emitMetadataOnly, Boolean emitTestCoverageData, DiagnosticBag diagnostics, Predicate`1 filterOpt, CancellationToken cancellationToken)
2018-06-20T23:18:00.3786460Z       at Microsoft.CodeAnalysis.Compilation.Emit(Stream peStream, Stream metadataPEStream, Stream pdbStream, Stream xmlDocumentationStream, Stream win32Resources, IEnumerable`1 manifestResources, EmitOptions options, IMethodSymbol debugEntryPoint, Stream sourceLinkStream, IEnumerable`1 embeddedTexts, CompilationTestData testData, CancellationToken cancellationToken)
2018-06-20T23:18:00.3804613Z       at Microsoft.CodeAnalysis.Compilation.Emit(Stream peStream, Stream pdbStream, Stream xmlDocumentationStream, Stream win32Resources, IEnumerable`1 manifestResources, EmitOptions options, IMethodSymbol debugEntryPoint, Stream sourceLinkStream, IEnumerable`1 embeddedTexts, Stream metadataPEStream, CancellationToken cancellationToken)
2018-06-20T23:18:00.3822068Z       at Microsoft.AspNetCore.Mvc.Razor.Internal.RazorViewCompiler.CompileAndEmit(RazorCodeDocument codeDocument, String generatedCode)
2018-06-20T23:18:00.3838144Z       at Microsoft.AspNetCore.Mvc.Razor.Internal.RazorViewCompiler.CompileAndEmit(String relativePath)
2018-06-20T23:18:00.3853552Z       at Microsoft.AspNetCore.Mvc.Razor.Internal.RazorViewCompiler.OnCacheMiss(String normalizedPath)
2018-06-20T23:18:00.3870876Z    --- End of stack trace from previous location where exception was thrown ---
2018-06-20T23:18:00.3887348Z       at Microsoft.AspNetCore.Mvc.Razor.Internal.DefaultRazorPageFactoryProvider.CreateFactory(String relativePath)
2018-06-20T23:18:00.3902825Z       at Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.CreateCacheResult(HashSet`1 expirationTokens, String relativePath, Boolean isMainPage)
2018-06-20T23:18:00.3918580Z       at Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.OnCacheMiss(ViewLocationExpanderContext expanderContext, ViewLocationCacheKey cacheKey)
2018-06-20T23:18:00.3934448Z       at Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.LocatePageFromViewLocations(ActionContext actionContext, String pageName, Boolean isMainPage)
2018-06-20T23:18:00.3950038Z       at Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.FindView(ActionContext context, String viewName, Boolean isMainPage)
2018-06-20T23:18:00.3974237Z       at Microsoft.AspNetCore.Mvc.ViewEngines.CompositeViewEngine.FindView(ActionContext context, String viewName, Boolean isMainPage)
2018-06-20T23:18:00.3994694Z       at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewResultExecutor.FindView(ActionContext actionContext, ViewResult viewResult)
2018-06-20T23:18:00.4010408Z       at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewResultExecutor.ExecuteAsync(ActionContext context, ViewResult result)
2018-06-20T23:18:00.4026808Z       at Microsoft.AspNetCore.Mvc.ViewResult.ExecuteResultAsync(ActionContext context)
2018-06-20T23:18:00.4046095Z       at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeResultAsync(IActionResult result)
2018-06-20T23:18:00.4064218Z       at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResultFilterAsync[TFilter,TFilterAsync]()
2018-06-20T23:18:00.4079222Z       at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResultExecutedContext context)
2018-06-20T23:18:00.4095221Z       at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next, Scope& scope, Object& state, Boolean& isCompleted)
2018-06-20T23:18:00.4110645Z       at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeResultFilters()
2018-06-20T23:18:00.4126493Z       at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()
2018-06-20T23:18:00.4143368Z       at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
2018-06-20T23:18:00.4159117Z       at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
2018-06-20T23:18:00.4174566Z       at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()
2018-06-20T23:18:00.4191927Z       at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()
2018-06-20T23:18:00.4207351Z       at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
2018-06-20T23:18:00.4224131Z       at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
2018-06-20T23:18:00.4241365Z       at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)

Steps to Reproduce:

  1. Clone [Design]Update CI configs to use node 10 aspnet/Templating#582 on a linux machine
  2. Run build.sh -ci

Expected Behavior: No Null-Refs, or a more descriptive error about what's going wrong.

Actual Behavior: System.NullReferenceException: Object reference not set to an instance of an object.

@pranavkm
Copy link
Contributor

@jcouv
Copy link
Member

jcouv commented Jun 29, 2018

@ryanbrandenburg The issue @pranavkm linked (thanks!) has the same stacktrace and it was resolved as fixed. Can you try the instructions there to confirm, then close this issue? Thanks

@jcouv jcouv added Area-External Resolution-Fixed The bug has been fixed and/or the requested behavior has been implemented labels Jun 29, 2018
@ryanbrandenburg
Copy link
Contributor Author

This is no longer reproducing for me, so I'm closing it. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Area-External Resolution-Fixed The bug has been fixed and/or the requested behavior has been implemented
Projects
None yet
Development

No branches or pull requests

4 participants