Skip to content

[mono] App hangs at startup when using dotnet publish -t:Run and different combination of RIDs #10544

@tipa

Description

@tipa

Android framework version

net10.0-android (Preview)

Affected platform version

.net10-rc2

Description

App crashes when accessing crypto-related APIs.
From what I can recall, this issue started with .net10-rc2 - it still worked fine on .net10-rc1 or .net9

Steps to Reproduce

  • dotnet new android
  • Add this to csproj: <RuntimeIdentifiers>android-arm;android-arm64;android-x64</RuntimeIdentifiers>
  • Add the following code:
using var ecdsa = ECDsa.Create();
ecdsa.ImportPkcs8PrivateKey(Convert.FromBase64String("MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgSpP55ELdXswj9JRZAPRwtTfS4CNRqpKIs+28rNHiPAqhRANCAASs8nLES7b+goKslppNVOurf0MonZdw3pb6TxS8Z/5j+UNY1sWK1ChxpuwNS9I3R50cfdQo/lA9PPhw6XIg8ytd\r\n"), out _);
  • dotnet publish -t:Run (or dotnet build -c:Release -t:Run)
  • crash (when running on arm64 device, in my case Pixel 7)

Did you find any workaround?

  • Removing the android-arm rid
  • Putting the android-arm rid last in the list: <RuntimeIdentifiers>android-arm64;android-x64;android-arm</RuntimeIdentifiers>

Relevant log output

Metadata

Metadata

Labels

Area: App RuntimeIssues in `libmonodroid.so`.needs-triageIssues that need to be assigned.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions