Skip to content

Startup crash F# AOT on Android #9185

@kerams

Description

@kerams

Description

I could swear this worked as soon as I installed 9.0.100-preview.4.24267.66 (as mentioned in dotnet/runtime#102166), but now a minimal F# Android application on .NET 9 crashes reliably across ABIs.

Reproduction Steps

dotnet new install Avalonia.Templates
dotnet new avalonia.xplat -lang F# -o TstFs

Change TFM to net9.0-android and add

<PropertyGroup Condition="'$(Configuration)'=='Release'">
  <PublishTrimmed>True</PublishTrimmed>
  <TrimMode>partial</TrimMode>
  <RunAOTCompilation>True</RunAOTCompilation>
</PropertyGroup>

Run in Release mode either in x64 emulator or on an arm64 device.

Expected behavior

Applications launches.

Actual behavior

Crashes on the splash screen.

Regression?

Yes, works with SDK 9.0.100-preview.2.24157.14 or TFM net8.0-android.

Known Workarounds

No response

Configuration

9.0.100-preview.4.24267.66
Win 11

Other information

No response

Metadata

Metadata

Labels

Area: App RuntimeIssues in `libmonodroid.so`.Area: F#Issues with F# (fsharp) projects

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions