Bug 47569 - Fast add and remove of Webview crashes only on Windows (UWP)
Summary: Fast add and remove of Webview crashes only on Windows (UWP)
Status: CONFIRMED
Alias: None
Product: Forms
Classification: Xamarin
Component: Windows ()
Version: 2.3.2
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-11-21 12:41 UTC by JCunha
Modified: 2017-06-22 01:26 UTC (History)
3 users (show)

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

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 for Bug 47569 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description JCunha 2016-11-21 12:41:45 UTC
By using Xamarin.Forms only, if you fastly add and remove a WebView from ContentView, UWP crashes with an unhandled error: {"Object reference not set to an instance of an object."}

The same scenario works fine for Android and iOS.

I created a solution to reproduce the error. The code can be found at: https://github.com/joaocunhaeld/issues/tree/master/Xamarin.WebFastSwitch

To reproduce the error, just set the delay properly on the MainPage_Appearing method:
        
        private async void MainPage_Appearing(object sender, EventArgs e)
        {
            this.ToogleWebPage();

            ////await Task.Delay(200); // error occurs on UWP
            await Task.Delay(2000);

            this.ToogleWebPage();
        }


Thanks in advance,
JCunha