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

Fail predictably and with better error message for WinRT #182

Open
MichalStrehovsky opened this issue Oct 9, 2020 · 5 comments
Open

Fail predictably and with better error message for WinRT #182

MichalStrehovsky opened this issue Oct 9, 2020 · 5 comments
Labels
area-NativeAOT-coreclr .NET runtime optimized for ahead of time compilation bug Something isn't working

Comments

@MichalStrehovsky
Copy link
Member

Interop/WinRT/WinRT

@MichalStrehovsky MichalStrehovsky added bug Something isn't working area-NativeAOT-coreclr .NET runtime optimized for ahead of time compilation labels Oct 9, 2020
@jkotas jkotas changed the title Fail predictably for WinRT Fail predictably and with better error message for WinRT Oct 18, 2020
@emily33901
Copy link

Think I might have run into this one - is it just in any case of WinRT being used in the process where nativeaot is being run?

@MichalStrehovsky
Copy link
Member Author

This is for situation when an assembly being compiled to native code refers to a WinMD. NativeAot should be able to co-exist with WinRT runtime in the process - it just can't talk to it through the WinRT ABI directly.

Built-in support for WinRT was yanked from CoreCLR too, so this issue tracks simulating whatever error mode CoreCLR has for this.

(CsWinRT solves the problem for .NET 5 in general after support in the runtime has been yanked. NativeAOT currently lacks a component that CsWinRT depends on, but that will be the WinRT support story for NativeAOT eventually too.)

@emily33901
Copy link

NativeAOT will fast fail the process seemingly if it something that is unrealated to it throwing a com exception (or for that matter any hardware exception) even if its outside of its mapped address space which is very frustrating when (in my situation) you have no control over the code that throws that in question (libcef loading winapi loading combase which causes NativeAOT to go to RhpThrowHwEx and fastfail the process)

@jkotas
Copy link
Member

jkotas commented Nov 4, 2020

@emily33901 Could you please open a new issue on this, include the stacktrace where you see RhpThrowHwEx getting called?

@emily33901
Copy link

Yeah will do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-NativeAOT-coreclr .NET runtime optimized for ahead of time compilation bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants