Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows/UWP crashes on 8.0.10 #21360

Closed
negberts opened this issue Mar 21, 2024 · 8 comments · Fixed by CommunityToolkit/Maui#1771
Closed

Windows/UWP crashes on 8.0.10 #21360

negberts opened this issue Mar 21, 2024 · 8 comments · Fixed by CommunityToolkit/Maui#1771
Labels
area-controls-map Map / Maps i/regression This issue described a confirmed regression on a currently supported version platform/windows 🪟 t/bug Something isn't working

Comments

@negberts
Copy link

negberts commented Mar 21, 2024

Description

After updating our app to MAUI 8.0.10 the UWP app crashes/won't start. It doesn't even get to the splash screen. 8.0.7 works fine. 8.0.14 is also not working. Some error logging is in the event viewer:

Faulting application name: Pim.MobileApp.Maui.exe, version: 2.0.0.0, time stamp: 0x65cd0000
Faulting module name: KERNELBASE.dll, version: 10.0.19041.3996, time stamp: 0xb756c9ff
Exception code: 0xc000027b
Fault offset: 0x000000000012d952
Faulting process id: 0x5dbc
Faulting application start time: 0x01da7b97156892b4
Faulting application path: C:\Program Files\WindowsApps\F953A006.PIMinfraapp_1.0.362.0_x64__rjxgsa4r47vyj\Pim.MobileApp.Maui.exe
Faulting module path: C:\windows\System32\KERNELBASE.dll
Report Id: c037bac8-345e-4c08-bacc-089554d534c6
Faulting package full name: F953A006.PIMinfraapp_1.0.362.0_x64__rjxgsa4r47vyj
Faulting package-relative application ID: App

Steps to Reproduce

Update a MAUI app to 8.0.10, create an msix for it, for example via Azure Devops, and manually install it. Try to start it.

Link to public reproduction project repository

No response

Version with bug

8.0.10 SR3

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

8.0.7 SR2

Affected platforms

Windows

Affected platform versions

Windows SDK 10.0.19041.3996

Did you find any workaround?

Reverting back to 8.0.7 :-)

Relevant log output

No response

@negberts negberts added the t/bug Something isn't working label Mar 21, 2024
@PureWeen PureWeen added s/needs-repro Attach a solution or code which reproduces the issue platform/windows 🪟 labels Mar 21, 2024
@PureWeen
Copy link
Member

@negberts I tested publishing an MSIX on Windows 10 using 8.0.14 and I was able to launch it without any issues.

@negberts
Copy link
Author

@PureWeen it's the maps error that is being thrown now...

#19046

When I remove the line .UseMauiCommunityToolkitMaps("API_KEY") then the app no longer crashes...

I've already changed the UseMauiMaps call to

#if IOS || ANDROID
builder.UseMauiMaps();
#endif

So apparantly UseMauiCommunityToolkitMaps calls UseMauiMaps as well?

@dotnet-policy-service dotnet-policy-service bot added s/needs-attention Issue has more information and needs another look and removed s/needs-repro Attach a solution or code which reproduces the issue labels Mar 22, 2024
@jfversluis
Copy link
Member

So apparently UseMauiCommunityToolkitMaps calls UseMauiMaps as well?

Yes, that is a dependency, glad you were able to figure it out!

@negberts
Copy link
Author

@jfversluis but how can I use UseMauiCommunityToolkitMaps now then? Is a map on UWP simply not possible anymore?

@jfversluis
Copy link
Member

Ah I see what you're saying, yeah I guess we didn't consider this scenario.

Because now even when you would do

  var builder = MauiApp.CreateBuilder();
  builder
	  .UseMauiApp<App>()
	  .ConfigureFonts(fonts =>
	  {
		  fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
		  fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
	  });

    #if IOS || ANDROID
    builder.UseMauiMaps();
    #endif
    
    #if WINDOWS
    // Initialize the .NET MAUI Community Toolkit Maps by adding the below line of code
    builder.UseMauiCommunityToolkitMaps("key")
    #endif

   return builder.Build();

It would still call UseMauiMaps() from the UseMauiCommunityToolkitMaps() and then throw the exception.

@jfversluis jfversluis reopened this Mar 22, 2024
@jfversluis jfversluis added i/regression This issue described a confirmed regression on a currently supported version area/Maps🗺 and removed s/needs-attention Issue has more information and needs another look labels Mar 22, 2024
@negberts
Copy link
Author

@jfversluis That is exactly what we are doing :-)

@jfversluis
Copy link
Member

@negberts would you maybe be able to reach out on the email address on my GitHub profile and test something out with me?

The obvious thing here is to revert the PR, but I think maybe we can fix it on the Toolkit side and get a fix out more quickly.

@jfversluis
Copy link
Member

Completed on the .NET MAUI Community Toolkit side. Please update the Toolkit Maps package to 2.0.1 if you're experiencing this crash, thanks!

@github-actions github-actions bot locked and limited conversation to collaborators Apr 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-map Map / Maps i/regression This issue described a confirmed regression on a currently supported version platform/windows 🪟 t/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants