dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.16k stars 1.74k forks source link

Maui Hybrid App stuck on "Loading..." in release mode on Android. #16313

Closed rad765 closed 1 year ago

rad765 commented 1 year ago

Description

MAUI Hybrid App stuck on first "Loading" in release mode on Android, even in Out of the box app. Compile in Debug mode and the program runs fine.

Using Visual studio 17.7 Preview 4 and .Net 8 preview 6

Steps to Reproduce

1: create a new Maui Hybrid project in Visual studio (version 17.7.0 - Previev 4 and .Net 8 Preview 6) 2: compile in release mode, and run on either Android. Either physical device or Emulater.

Link to public reproduction project repository

None

Version with bug

7.0.49

Last version that worked well

6.0

Affected platforms

Android

Affected platform versions

Emulator (Pixel 5) + Android V. 13 plus one older version

Did you find any workaround?

No response

Relevant log output

No response

MackinnonBuck commented 1 year ago

Looks like a dupe of https://github.com/aspnet/AspNetCore-ManualTests/issues/1934.

@grendello Are you able to look into this?

SliemBeji-FBC commented 1 year ago

The link is invaild. Could you update it?

MackinnonBuck commented 1 year ago

@SliemBeji-FBC The link is not invalid - it's a private repository 🙂

MackinnonBuck commented 1 year ago

Looks like this bug no longer exists as of .NET 8.0 RC1. @grendello, do you know if there was a deliberate fix for this?

grendello commented 1 year ago

@MackinnonBuck there was no fix as such. We disabled code that caused it (marshal methods) and we're going to work on it for NET9. The current suspicions are that either marshal methods trigger a race condition somewhere (as they make portions of the runtime java interop code much faster), or that there's a subtle runtime bug lurking somewhere.

MackinnonBuck commented 1 year ago

Thanks for the update, @grendello.

I'm going to close out this issue because the described bug no longer reproduces, even though the underlying problem is still being investigated. We can reopen this later if the problem pops back up.