Bug 41900

Summary: UWP Map on navigated Page can't change size.
Product: Forms Reporter: Charles Petzold <charles.petzold>
Component: WindowsAssignee: Bugzilla <bugzilla>
Severity: major CC: david.ortinau, FieldstrikeMobile, georg.haberl, gilles.dehais, innovia, jas, jbtremblay, jimmy.garrido, kuramochia, meyer.mark.j, norman.mackay, rui.marinho, sahou, swati.das, v-sapaun, wayne.creasey
Priority: Normal    
Version: 2.2.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Tags: ac Is this bug a regression?: ---
Last known good build:
Attachments: repro project

Description Charles Petzold 2016-06-16 15:55:09 UTC
The following App class creates a Map on a page that is navigated to from the main page:

public class App : Application
    public App()
        Button button = new Button
            Text = "Navigate to Map",
            HorizontalOptions = LayoutOptions.Center,
            VerticalOptions = LayoutOptions.Center
        button.Clicked += async (sender, args) =>
            await button.Navigation.PushAsync(new ContentPage
                Content = new Map()
        MainPage = new NavigationPage(new ContentPage
            Content = button

On the UWP platforms, this map cannot change size. If the phone is rotated (or if the desktop window is resized), the program goes out on an unhandled exception with the text "Catastrophic failure."
Comment 1 georg.haberl 2016-06-23 07:26:05 UTC
I experience the same thing
Microsoft Lumia 640 XL Dual SIM
OSBuild: 10.0.10586.420
Xamarin.Forms.Maps v2.3.0.49
Xamarin.Forms v2.3.0.49

--> maybe it's also connected to Bug 39489?
Comment 2 georg.haberl 2016-06-23 07:27:13 UTC
Sorry bug reference in Comment 1 was ment to be Bug 41529
Comment 3 georg.haberl 2016-07-07 09:04:39 UTC
I forked the Xamarin.Forms Github project and tried this again with directly referencing the source projects (hoping I could fix it and make a pull request later).
So there must be a difference when using the nuget packages VS the sources - maybe someone has some insights for me?
Comment 4 gilles.dehais 2016-07-18 10:16:37 UTC
I have the same issue.

To simulate the bug :

Create 2 page in the portable project.

page 1 has a button and when it is clicked, pushasync to the page 2.
page 2 has a simple map.

On UWP, when rotating the phone (Lumia 920 and Lumia 930) on page 2, the application crash with message "catastrophic failure".

When I replace pushasync by pushmodalasync, everything works perfectly.
Comment 5 gilles.dehais 2016-07-18 10:20:59 UTC
I have the bug in and previous version.
Comment 6 Samantha Houts [MSFT] 2016-07-28 17:20:36 UTC
*** Bug 42847 has been marked as a duplicate of this bug. ***
Comment 7 Jimmy [MSFT] 2016-08-17 21:00:03 UTC
Created attachment 17091 [details]
repro project

This seems to also be affecting W8.1 / WP8.1 RT apps. On mobile, it crashes when the device is rotated causing a size change.

However, on UWP, I cannot reproduce the crash anymore on devices running the W10 Anniversary Update (version 1607).
Comment 8 Samantha Houts [MSFT] 2016-10-19 18:31:53 UTC
*** Bug 45289 has been marked as a duplicate of this bug. ***
Comment 9 Samantha Houts [MSFT] 2017-02-01 01:02:20 UTC
*** Bug 49068 has been marked as a duplicate of this bug. ***
Comment 11 Samantha Houts [MSFT] 2017-02-15 18:26:08 UTC
Comment 12 Rui Marinho 2017-03-07 10:48:04 UTC
Should be fixed on 2.3.5-pre1
Comment 13 Mark 2017-05-08 13:33:45 UTC
My UWP app still crashes when resizing the page on 2.3.5-pre2
Comment 14 innovia 2017-06-16 22:26:41 UTC
My app also still crash..
I use this workaround:
	_nativeMap.RotateInteractionMode = MapInteractionMode.ControlOnly;
seems fix the issue... obviously you can't rotate easily the map..