Open daltzctr opened 4 days ago
Discussed with @grendello and tehre's actually two problems here:
Android SDK doesn't deal well with collisions when there's a native library (libSkiaSharp.so
) that has a name that matches the base name of a managed assembly (SkiaSharp.dll
) because the AOT image lookup may ask for libSkiaSharp.so
if it doesn't find its preferred name SkiaSharp.dll.so
(I believe this is the first one we ask for). That's https://github.com/dotnet/android/issues/9081
On the runtime side, we need to be more graceful here:
if we found sofile
, but it doesn't have either the mono_aot_version
symbol or the mono_aot_file_info
symbol we should set usable = FALSE
and fail out gracefully. Instead the first thing we try to do is memcpy from info->aotid
even if info
might be null.
/cc @vitek-karas @steveisok
Description
I was directed to submit an issue here by the dotnet android development team. I upgraded my MAUI application to .NET 9 Preview 5 and have occurred release mode crashes whenever initializing a view that contains Skiasharp.
Reproduction Steps
Expected behavior
It does not crash
Actual behavior
It crashes
Regression?
Yes. This worked in .NET 8
Known Workarounds
<RunAOTCompilation>False</RunAOTCompilation>
Configuration
Other information
This is not specific to any MAUI version and only occurs if skiasharp has to be loaded. I have attached some logs that may be useful below. A managed stack trace is not available and I have no other logs besides ones directly shared with Microsoft Staff. Contact @grendello for the detailed log.