Skip to content

[Marshal Methods] MAUI project infinite loop on startup #7893

Description

@jonathanpeppers

Android application type

.NET Android (net7.0-android, etc.)

Affected platform version

.NET 8 Preview 2

Description

A customer's app won't get past the splash screen when built in Release mode:

image

But it appears to work if you set AndroidEnableMarshalMethods=false.

Steps to Reproduce

  1. I can share the sample with you privately in Teams
  2. Run the app in Release mode. It can be a fresh/clean build, so not an incremental build issue.

Did you find any workaround?

AndroidEnableMarshalMethods=false

Relevant log output

The log just kind of gets here... And stops?

03-15 23:25:52.948 14320 14320 D Mono    : AOT: FOUND method Microsoft.Maui.WeakList`1/<>c:<CleanupIfNeeded>b__12_0 (System.WeakReference`1<T>) [0x7b4e6fcfd530 - 0x7b4e6fcfd5f7 0x7b4e6fd39ba3]

log.txt

Activity

  1. added this to the .NET 8 milestone on Mar 17, 2023
  2. ghost added
    needs-triageIssues that need to be assigned.
    on Mar 17, 2023
  3. 333fred commented on Mar 17, 2023

    @333fred
    Member

    Thanks for the investigation Jon!

  4. daltzctr commented on Jun 20, 2023

    @daltzctr

    I've also ran into this issue as well. The above workaround solves it.

  5. jpobst commented on Aug 24, 2023

    @jpobst
    Contributor

    We are turning off AndroidEnableMarshalMethods for .NET 8. Bumping to .NET 9 when we will try to fix and finish the feature.

  6. changed the title [-].NET 8 customer MAUI project -- some kind of infinite loop on startup?[/-] [+][Marshal Methods] MAUI project infinite loop on startup[/+] on Oct 10, 2023
  7. added
    bugComponent does not function as intended.
    and removed
    needs-triageIssues that need to be assigned.
    on Oct 10, 2023
  8. jpobst commented on May 17, 2024

    @jpobst
    Contributor

    Tracking via #8253.

  9. locked and limited conversation to collaborators on Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Area: App RuntimeIssues in `libmonodroid.so`.bugComponent does not function as intended.

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions