[mono][swift] App crashes in AOT + interpreter setup as it cannot find System.Runtime.InteropServices.Swift
types
#105245
Labels
Milestone
Description
maccatalyst-arm64 (probably ios-arm64) application crashes when it references an assembly that must be interpreted in Release mode.
This is achieved by adding:
in the project file, referencing a method from
MyLib
assembly which has to be interpreted and building/running the app.Tested with
dotnet 9.0.100-preview.6.24328.19
Repro
dotnet publish -c Release -r maccatalyst-arm64 -t:Run MyMacCat/MyMacCat.csproj
Expected behavior
App displays
ID1 ID2
Actual behavior
App crashes with:
Workaround
Full AOT compilation does not reproduce this problem. This can be achieved by commenting out:
<!-- <MtouchInterpreter>-all,MyLib</MtouchInterpreter> -->
Initial investigation
App seems to crash at:
runtime/src/mono/mono/mini/interp/transform.c
Line 4490 in 13abb44
swift_error
isNULL
. By inspecting the trimmedSPC.dll
it seems like all the types from:System.Runtime.InteropServices.Swift
got removed during the build, which means we need to rethink the assumptions in these cases.The text was updated successfully, but these errors were encountered: