Bug 41900 - UWP Map on navigated Page can't change size.
Summary: UWP Map on navigated Page can't change size.
Alias: None
Product: Forms
Classification: Xamarin
Component: Windows ()
Version: 2.2.0
Hardware: PC Windows
: Normal major
Target Milestone: ---
Assignee: Bugzilla
: 42847 45289 49068 ()
Depends on:
Reported: 2016-06-16 15:55 UTC by Charles Petzold
Modified: 2017-07-06 05:48 UTC (History)
16 users (show)

Tags: ac
Is this bug a regression?: ---
Last known good build:

repro project (94.38 KB, application/zip)
2016-08-17 21:00 UTC, Jimmy [MSFT]

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

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..