maui icon indicating copy to clipboard operation
maui copied to clipboard

.NET MAUI Blazor crashes when changing system font on Android device

Open vsfeedback opened this issue 2 years ago • 3 comments

This issue has been moved from a ticket on Developer Community.


Hi! When I'm debugging a Blazor MAUI project and changing the system font of my Samsung Galaxy S20 FE 5G the app crashes.

Exception:

[mono-rt] [ERROR] FATAL UNHANDLED EXCEPTION: System.NotImplementedException: Either set MainPage or override CreateWindow.
[mono-rt]    at Microsoft.Maui.Controls.Application.CreateWindow(IActivationState activationState) in D:\a\_work\1\s\src\Controls\src\Core\HandlerImpl\Application.Impl.cs:line 126
[mono-rt]    at Microsoft.Maui.Controls.Application.Microsoft.Maui.IApplication.CreateWindow(IActivationState activationState) in D:\a\_work\1\s\src\Controls\src\Core\HandlerImpl\Application.Impl.cs:line 41
[mono-rt]    at Microsoft.Maui.Platform.ApplicationExtensions.CreatePlatformWindow(Activity activity, IApplication application, Bundle savedInstanceState) in D:\a\_work\1\s\src\Core\src\Platform\Android\ApplicationExtensions.cs:line 44
[mono-rt]    at Microsoft.Maui.MauiAppCompatActivity.OnCreate(Bundle savedInstanceState) in D:\a\_work\1\s\src\Core\src\Platform\Android\MauiAppCompatActivity.cs:line 32
[mono-rt]    at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_(IntPtr jnienv, IntPtr native__this, IntPtr native_savedInstanceState) in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/obj/Release/net6.0/android-32/mcw/Android.App.Activity.cs:line 2781
[mono-rt]    at Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PPL_V(_JniMarshal_PPL_V callback, IntPtr jnienv, IntPtr klazz, IntPtr p0) in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNINativeWrapper.g.cs:line 110
[BpBinder] onLastStrongRef automatically unlinking death recipients: 

Original Comments

Feedback Bot on 4/13/2022, 03:01 AM:

(private comment, text removed)


Original Solutions

(no solutions)

vsfeedback avatar Apr 14 '22 17:04 vsfeedback

I'm guessing this is not Blazor-specific, because Blazor doesn't do anything with fonts, and Blazor stuff isn't in the stack trace either.

Eilon avatar Apr 14 '22 19:04 Eilon

Hi! I'm the one who reported this. I'm on vacation and cannot try a new MAUI project, sorry 😊 Have a nice weekend! Excited to see upcoming release of MAUI 🧑‍💻

vallgrenerik avatar Apr 15 '22 19:04 vallgrenerik

Hi @vsfeedback. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version.

You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository.

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

ghost avatar Nov 10 '22 19:11 ghost