Bug 36717 - Navigating back in stack causes blank page
Summary: Navigating back in stack causes blank page
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 2.0.0
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2015-12-08 16:15 UTC by Cody Beyer (MSFT)
Modified: 2016-04-13 20:08 UTC (History)
5 users (show)

Tags: ac
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 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 Cody Beyer (MSFT) 2015-12-08 16:15:30 UTC
### Description

The following sample app demonstrates an issue where when removing a page from a navigation stack, and then navigating back, the resultant page is blank

### Sample


### Video


### Steps to Reproduce

1. Download sample
2. Deploy to Android Simulator
3. Click "Root Click"
4. Click "2 Click"
5. Click "Back"

### Expected Results

Taken to page on step 3

### Actual Results

Blank page appears

### Versions

=== Xamarin Studio ===

Version 5.10.1 (build 6)
Installation UUID: 9896401f-d610-4967-a815-13e30f20b910
	Mono 4.2.1 (explicit/6dd2d0d)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 402010102

=== Xamarin.Profiler ===

Not Installed

=== Apple Developer Tools ===

Xcode 7.1.1 (9081)
Build 7B1005

=== Xamarin.iOS ===

Version: (Business Edition)
Hash: eb4c1ef
Branch: master
Build date: 2015-12-01 02:12:30-0500

=== Xamarin.Android ===

Version: (Business Edition)
Android SDK: /Users/codybeyer/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		4.0.3 (API level 15)
		4.4   (API level 19)
		6.0   (API level 23)

SDK Tools Version: 24.4.1
SDK Platform Tools Version: 23.0.1
SDK Build Tools Version: 23.0.1

Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

=== Xamarin Android Player ===

Version: 0.6.5
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Version: (Business Edition)

=== Build Information ===

Release ID: 510010006
Git revision: 0b60eecdb531933734519c13257d16a780274aab
Build date: 2015-12-04 20:28:20-05
Xamarin addins: 9876fd7c9837977178411ec7375b4352c0a0d6af
Build lane: monodevelop-lion-cycle6-baseline

=== Operating System ===

Mac OS X 10.11.1
Darwin Codys-MacBook-Pro.local 15.0.0 Darwin Kernel Version 15.0.0
    Sat Sep 19 15:53:46 PDT 2015
    root:xnu-3247.10.11~1/RELEASE_X86_64 x86_64
Comment 1 Andy Barajs 2015-12-15 23:49:57 UTC
I think I have encountered a very similar (or the same) bug. 

Sample Project:

NOTE: Currently the sample project is set to use FormsApplicationActivity, so when you first run it, it works correctly.  

After changing it to use FormsAppCompatActivity instead, is when it breaks. I noticed the sample project in the post above also uses FormsAppCompatActivity(which looks to cause the problem). 

I left commented sections in these files to help change App to use FormsAppCompatActivity instead of FormsApplicationActivity: 
- AndroidManifest.xml
- styles.xml
- MainActivity.cs

### Steps to Reproduce

1. Download sample
2. Deploy to Android Simulator
3. Click on Label "Click HERE to go to Page 2"
4. Click on Label "Click HERE to go to Page 3"
5. Click on Label "Click HERE to go to Page 1"

### Expected Results

Taken to Page 1

### Actual Results

Blank page appears
Comment 2 Andy Barajs 2015-12-16 00:05:02 UTC
Updated Sample Project: https://drive.google.com/file/d/0B9i9Q9lLKa7XcEFlaWFjVFdMV0U/view?usp=sharing
Comment 3 Marco 2015-12-27 13:38:36 UTC
I have the same problem and I can add this:

Using FormsAppCompatActivity the navigation doesn't work anymore.

I can use PushAsync and PopAsync, but if I try to use InsertPageBefore and then PopAsync or if I use RemovePage, then this doesn't work.

If I switch to FormsApplicationActivity then all works well.
Comment 4 Jason Smith [MSFT] 2016-04-13 20:08:25 UTC
Thank you for taking the time to submit this report. After reviewing the description of this bug, we believe it no longer affects the current version of Xamarin.Forms. If you are still experiencing the issue after updating your packages, please reopen this report with an attached reproduction.
For your convenience, we have created some reproduction best practices viewable here: https://gist.github.com/jassmith/92405c300e54a01dcc6d

Warm regards,
Xamarin Forms Team