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

Linker crashes on interop method with function pointers #1345

Closed
jkotas opened this issue Jul 10, 2020 · 3 comments · Fixed by #1350
Closed

Linker crashes on interop method with function pointers #1345

jkotas opened this issue Jul 10, 2020 · 3 comments · Fixed by #1350

Comments

@jkotas
Copy link
Member

jkotas commented Jul 10, 2020

 Mono.Linker.LinkerFatalErrorException: ILLinker: error IL1005: .Interop.Kernel32.EnumSystemLocalesEx(method,UInt32,Void*,IntPtr): Error processing method '.Interop.Kernel32.EnumSystemLocalesEx(method,UInt32,Void*,IntPtr)' in assembly 'System.Private.CoreLib.dll'
   ---> System.NullReferenceException: Object reference not set to an instance of an object.
     at Mono.Linker.Steps.MarkStep.ProcessInteropMethod(MethodDefinition method)
     at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method, DependencyInfo& reason)
     at Mono.Linker.Steps.MarkStep.ProcessQueue()
     --- End of inner exception stack trace ---
     at Mono.Linker.Steps.MarkStep.ProcessQueue()
     at Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue()
     at Mono.Linker.Steps.MarkStep.Process()
     at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
     at Mono.Linker.Pipeline.ProcessStep(LinkContext context, IStep step)
     at Mono.Linker.Pipeline.Process(LinkContext context)
     at Mono.Linker.Driver.Run(ILogger customLogger)

See dotnet/runtime#39082 for repro

@marek-safar
Copy link
Contributor

@MichalStrehovsky could you look into this?

/cc @vitek-karas

@RussKie
Copy link
Member

RussKie commented Aug 12, 2020

I'm still hitting this in Microsoft.NET.Sdk.IL: 5.0.0-rc.1.20411.1, SDK: 5.0.100-preview.7.20356.2/5.0.100-preview.8.20359.7

C:\Development\winforms\.dotnet\sdk\5.0.100-preview.8.20359.7\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ILLink.targets(99,5): error MSB6006: "dotnet.exe" exited with code 1. [C:\Development\winforms\src\System.Windows.Forms\src\System.Windows.Forms.csproj]

How/where do I get the fixed version?

@vitek-karas
Copy link
Member

@RussKie Do you still see the failure? I tried something similar with 5.0.100-rc.1.20453.7 and it worked.
If you still see a failure, could you please paste the exact error and what did you try?

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

Successfully merging a pull request may close this issue.

4 participants