runtime: [Wasm][AOT] AOT Compilation failed for method 'void System.IO.Strategies.Net5CompatFileStreamStrategy:Dispose (bool)'.

Description

When running an application with WebAssembly Full AOT, the following exception happens at runtime:

System.ExecutionEngineException: AOT Compilation failed for method 'void System.IO.Strategies.Net5CompatFileStreamStrategy:Dispose (bool)'.

Not sure to produce a repro for this one, as there’s no stack trace because of AOT. Will try to get one from the newer js-based exception tracing.

edit: Unfortunately, adding :

mono_trace_enable(1);
mono_trace_set_options("E:all");

does not raise this type of exceptions in a way that can be shown in browser logs.

Configuration

2784aadb026

Regression?

Not sure.

Other information

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 3
  • Comments: 17 (10 by maintainers)

Commits related to this issue

Most upvoted comments

The finally code will be AOTed, and run using AOT in the non-exception case, and using the interpreter in the exception case.

I order to troubleshoot the mismatch error, you’ll need to add the following property:

<PropertyGroup>
   <WasmShellEnableEmccProfiling>true</WasmShellEnableEmccProfiling>
</PropertyGroup>

This will show the full stack trace of the error, so it can be analyzed.

As for the Microsoft.Windows.Compatibility, yes, it is needed.