Skip to content

Fix dangling type-refs in DirectWriteForwarder and System.Printing #634

Closed

Description

@vatsan-madhavan

From @dagood on Friday, 19 April 2019 18:26:06

When the build attempts to crossgen these files, we get warnings:

Warning: Could not load type 'System.Runtime.CompilerServices.SuppressMergeCheckAttribute' from assembly 'System.Runtime, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. while resolving 0x1000002 - System.Runtime.CompilerServices.SuppressMergeCheckAttribute.
Warning: Could not load type 'System.Runtime.CompilerServices.DecoratedNameAttribute' from assembly 'System.Runtime, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. while resolving 0x1000044 - System.Runtime.CompilerServices.DecoratedNameAttribute.
Warning: Could not load type 'System.Runtime.CompilerServices.AssemblyAttributesGoHereM' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. while resolving 0x100006d - System.Runtime.CompilerServices.AssemblyAttributesGoHereM.
Warning: Could not load type 'System.Runtime.CompilerServices.AssemblyAttributesGoHere' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. while resolving 0x1000071 - System.Runtime.CompilerServices.AssemblyAttributesGoHere.
Warning: Could not load type 'System.Runtime.InteropServices.Marshal' from assembly 'System.Runtime, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. while resolving 0x1000090 - System.Runtime.InteropServices.Marshal.
Warning: Could not load type 'System.Runtime.CompilerServices.SuppressMergeCheckAttribute' from assembly 'System.Runtime, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. while resolving 0xa000001 - System.Runtime.CompilerServices.SuppressMergeCheckAttribute..ctor.
Warning: Could not load type 'System.Runtime.CompilerServices.DecoratedNameAttribute' from assembly 'System.Runtime, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. while resolving 0xa000014 - System.Runtime.CompilerServices.DecoratedNameAttribute..ctor.
Warning: Could not load type 'System.Runtime.InteropServices.Marshal' from assembly 'System.Runtime, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. while resolving 0xa0000c2 - System.Runtime.InteropServices.Marshal.GetExceptionPointers.
Native image wd-out/DirectWriteForwarder.dll generated successfully.

Warning: Could not load type 'System.Runtime.CompilerServices.DecoratedNameAttribute' from assembly 'System.Runtime, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. while resolving 0x1000004 - System.Runtime.CompilerServices.DecoratedNameAttribute.
Warning: Could not load type 'System.Runtime.CompilerServices.IsVolatile' from assembly 'System.Runtime.CompilerServices.VisualC, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. while resolving 0x100000b - System.Runtime.CompilerServices.IsVolatile.
Warning: Could not load type 'System.Runtime.CompilerServices.AssemblyAttributesGoHere' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. while resolving 0x10000a7 - System.Runtime.CompilerServices.AssemblyAttributesGoHere.
Warning: Could not load type 'System.Runtime.CompilerServices.AssemblyAttributesGoHereM' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. while resolving 0x10000b9 - System.Runtime.CompilerServices.AssemblyAttributesGoHereM.
Warning: Could not load type 'System.Runtime.InteropServices.Marshal' from assembly 'System.Runtime, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. while resolving 0x100013b - System.Runtime.InteropServices.Marshal.
Warning: Could not load type 'System.Runtime.CompilerServices.DecoratedNameAttribute' from assembly 'System.Runtime, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. while resolving 0xa000002 - System.Runtime.CompilerServices.DecoratedNameAttribute..ctor.
Warning: Could not load type 'System.Runtime.InteropServices.Marshal' from assembly 'System.Runtime, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. while resolving 0xa0002cc - System.Runtime.InteropServices.Marshal.GetExceptionPointers.
Native image wd-out/System.Printing.dll generated successfully.

Core-Setup seems to be missing some dependency input to crossgen. There's an ongoing email thread to identify what it would be.

The files are safe to use, but the warnings should be fixed.

Copied from original issue: dotnet/core-setup#5940

Activity

  1. added this to the Future milestone on May 1, 2019
  2. vatsan-madhavan commented on May 1, 2019

    @vatsan-madhavan
    MemberAuthor

    From @ericstj on Friday, 19 April 2019 19:28:35

    Actually all these look like they have the wrong AssemblyRef. That's a problem with the C++/CLI compiler. It looks to me like it's assuming a bunch of types are in the core library rather than resolving the type from references. /cc @tgani-msft

  3. vatsan-madhavan commented on May 1, 2019

    @vatsan-madhavan
    MemberAuthor

    From @vatsan-madhavan on Friday, 19 April 2019 20:52:09

    /cc @dotnet/wpf-developers

  4. vatsan-madhavan commented on May 1, 2019

    @vatsan-madhavan
    MemberAuthor

    From @dleeapho on Wednesday, 01 May 2019 16:46:19

    @vatsan-madhavan can you move this issue to your repo. Also @tgani-msft is there a compiler issue logged to track?

  5. modified the milestones: Future, Preview on May 1, 2019
  6. added
    Bug
    regression
    on May 1, 2019
  7. vatsan-madhavan commented on May 4, 2019

    @vatsan-madhavan
    MemberAuthor

    /cc @okman523

  8. vatsan-madhavan commented on May 8, 2019

    @vatsan-madhavan
    MemberAuthor
  9. modified the milestones: Preview, 3.0 on May 24, 2019
  10. added
    issue-type-tracking-external
    and removed
    Bug
    on Jun 20, 2019
  11. added
    rank20
    on Jul 16, 2019
  12. vatsan-madhavan commented on Jul 23, 2019

    @vatsan-madhavan
    MemberAuthor

    slip to P9

  13. added
    blocked
    on Aug 7, 2019
  14. vatsan-madhavan commented on Aug 10, 2019

    @vatsan-madhavan
    MemberAuthor

    We will have a new toolset in a couple of days and should be able to update the builds. This is still likely doable in Preview 9.

  15. vatsan-madhavan commented on Aug 12, 2019

    @vatsan-madhavan
    MemberAuthor

    This is partially mitigated by #1604.

    #1604 (comment)

    After this is fixed, the following dangling type-refs would still be left:

    • Release Builds:

      • DirectWriteForwarder:

        • [mscorlib] System.Runtime.CompilerServices.AssemblyAttributesGoHereM
        • [mscorlib] System.Runtime.CompilerServices.AssemblyAttributesGoHere
      • System.Printing

        • All the same problems observed in DirectWriteForwarder
        • Additional:[System.Runtime.CompilerServices.VisualC] System.Runtime.CompilerServices.IsVolatile
    • Debug Builds:

      • DirectWriteForwarder

        • [mscorlib] System.Runtime.CompilerServices.SuppressMergeCheckAttribute
        • [System.Runtime] System.Runtime.CompilerServices.AssemblyAttributesGoHere
        • [mscorlib] System.Runtime.CompilerServices.AssemblyAttributesGoHereM
        • [mscorlib] System.Runtime.CompilerServices.AssemblyAttributesGoHere
      • System.Printing

        • All the same problems observed in Debug/DirectWriteForwarder
        • Additional: [System.Runtime.CompilerServices.VisualC
  16. vatsan-madhavan commented on Aug 12, 2019

    @vatsan-madhavan
    MemberAuthor

    @sbomer, @fadimounir, if we still have these dangling type-refs, how does it negatively affect our ability to crossgen DirectWriteForwarder and System.Printing in .NET core 3.0 ?

    /cc @rladuca, @tgani-msft

  17. fadimounir commented on Aug 13, 2019

    @fadimounir

    @vatsan-madhavan crossgen will emit warnings on dangling typerefs, but won't fail to produce a R2R image. The affected code will be jitted at execution time, and could potentially throw exceptions at that point

  18. changed the title [-]Fix WindowsDesktop crossgen warnings for DirectWriteForwarder and System.Printing[/-] [+]Fix dangling type-refs in DirectWriteForwarder and System.Printing[/+] on Aug 25, 2019
  19. removed
    blocked
    on Aug 26, 2019
  20. ghost locked as resolved and limited conversation to collaborators on Apr 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

ask-modeissue-type-tracking-externalrank20regression

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions