This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.
Bug 41900 - UWP Map on navigated Page can't change size.
Summary: UWP Map on navigated Page can't change size.
Status: VERIFIED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Windows (show other bugs)
Version: 2.2.0
Hardware: PC Windows
: Normal major
Target Milestone: ---
Assignee: Bugzilla
URL:
: 42847 45289 49068 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-06-16 15:55 UTC by Charles Petzold
Modified: 2017-07-06 05:48 UTC (History)
16 users (show)

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


Attachments
repro project (94.38 KB, application/zip)
2016-08-17 21:00 UTC, Jimmy
Details

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 2.3.0.107 and previous version.
Comment 6 Samantha Houts 2016-07-28 17:20:36 UTC
*** Bug 42847 has been marked as a duplicate of this bug. ***
Comment 7 Jimmy 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 2016-10-19 18:31:53 UTC
*** Bug 45289 has been marked as a duplicate of this bug. ***
Comment 9 Samantha Houts 2017-02-01 01:02:20 UTC
*** Bug 49068 has been marked as a duplicate of this bug. ***
Comment 11 Samantha Houts 2017-02-15 18:26:08 UTC
https://github.com/xamarin/Xamarin.Forms/pull/724
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..

Note You need to log in before you can comment on or make changes to this bug.