Skip to content
This repository was archived by the owner on Nov 13, 2026. It is now read-only.
This repository was archived by the owner on Nov 13, 2026. It is now read-only.

NotImplementedException in EETypeNode.OutputBaseSize #1530

Closed

Description

@wjk

I just added the Autofac dependency injection framework to my CoreRT app, and now ILC.exe is crashing. Here is the backtrace it gives me:

Unhandled Exception: System.NotImplementedException: The method or operation is not implemented.
     at ILCompiler.DependencyAnalysis.EETypeNode.OutputBaseSize(ObjectDataBuilder& objData)
     at ILCompiler.DependencyAnalysis.EETypeNode.GetData(NodeFactory factory, Boolean relocsOnly)
     at ILCompiler.DependencyAnalysis.ObjectNode.GetStaticDependencies(NodeFactory factory)
     at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.GetStaticDependenciesImpl(DependencyNodeCore`1 node)
     at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.GetStaticDependencies(DependencyNodeCore`1 node)
     at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.ProcessMarkStack()
     at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.ComputeMarkedNodes()
     at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.get_MarkedNodeList()
     at ILCompiler.Compilation.Compile()
     at ILCompiler.Program.Run(String[] args)
     at ILCompiler.Program.Main(String[] args)

Some brief investigation reveals that the offending line of code is here. I will update this issue as soon as I know what type is causing the problem.

Activity

  1. wjk commented on Jul 16, 2016

    @wjk
    ContributorAuthor

    The type in question is the TService in IRegistrationBuilder.As<TService>(). The source for this method can be found here.

  2. wjk commented on Jul 16, 2016

    @wjk
    ContributorAuthor

    Using IRegistrationBuilder.As(params Type[]) gives me the same crash as when I use the generic version.

  3. MichalStrehovsky commented on Jul 16, 2016

    @MichalStrehovsky
    Member

    We shouldn't be creating EETypes for generic parameters. If you can set a conditional breakpoint on the EETypeNode's constructor and set the condition to trigger when we're creating it (e.g. type is GenericParameterDesc) that might give us more info about the root cause.

    That said, within the scope of this issue we'll probably only find a better way to error out early. There's no support for generic interface methods in the compiler right now (#631) and failing to compile and/or link is expected.

    Autofac will likely also take offense about reflection not working either (#511). Activator.CreateInstance, MethodInfo, FieldInfo, none of this works.

  4. MichalStrehovsky commented on Oct 20, 2016

    @MichalStrehovsky
    Member

    Generic virtual methods are tracked elsewhere (#631).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions