You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
maccatalyst-arm64 (probably ios-arm64) application crashes when it references an assembly that must be interpreted in Release mode.
This is achieved by adding:
<MtouchInterpreter>-all,MyLib</MtouchInterpreter>
in the project file, referencing a method from MyLib assembly which has to be interpreted and building/running the app.
because swift_error is NULL. By inspecting the trimmed SPC.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:
mono_class_try_get_swift_error_class is cheap to call repeatedly - it has an internal static variable for a cache; so this is fine,
but mono_class_create_ptr is a little bit expensive (it has to do a hash table lookup for the cache); it also can't really deal with a NULL input
m_class_get_this_arg is not ok to call on a NULL swift_error.
So you need your own cheaper cache for swift_error_ptr (or move it into a conditional that's only used if the calling convention cares about Swift types)
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: