This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.
Bug 26479 - OnAppearing event inconsistency on platforms
Summary: OnAppearing event inconsistency on platforms
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms (show other bugs)
Version: 1.3.1
Hardware: PC Mac OS
: Low minor
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-01-27 17:09 UTC by Jon Douglas [MSFT]
Modified: 2016-04-19 00:02 UTC (History)
14 users (show)

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


Attachments
Reproduction (278.38 KB, application/zip)
2015-01-27 17:09 UTC, Jon Douglas [MSFT]
Details
Updated sample project (333.66 KB, application/x-zip-compressed)
2015-07-21 03:34 UTC, Michael Rumpler
Details

Description Jon Douglas [MSFT] 2015-01-27 17:09:56 UTC
Created attachment 9524 [details]
Reproduction

*Description

The Appearing event is triggered on first appearance and on the reappearance after another window is closed on both Windows Phone 8 and IOS. However on Android it only is triggered on the initial appearance.

Trace:

IOS
====
[0:] 
2015-01-26 12:40:59.826 AppearingiOS[3204:420967] MainAppearingPage OnAppearing
[0:] MainAppearingPage OnAppearing
[0:] 
2015-01-26 12:41:53.457 AppearingiOS[3204:420967] Hello OnAppearing
[0:] Hello OnAppearing
[0:] 
2015-01-26 12:41:53.563 AppearingiOS[3204:420967] MainAppearingPage OnDisappearing
[0:] MainAppearingPage OnDisappearing
[0:] 
2015-01-26 12:41:55.453 AppearingiOS[3204:420967] MainAppearingPage OnAppearing
[0:] MainAppearingPage OnAppearing
[0:] 
2015-01-26 12:41:55.561 AppearingiOS[3204:420967] Hello OnDisappearing
[0:] Hello OnDisappearing
[0:] 
2015-01-26 12:41:56.559 AppearingiOS[3204:420967] Hello OnAppearing
[0:] Hello OnAppearing
[0:] 
2015-01-26 12:41:56.676 AppearingiOS[3204:420967] MainAppearingPage OnDisappearing
[0:] MainAppearingPage OnDisappearing



WinPhone8
=========
MainAppearingPage OnAppearing
MainAppearingPage OnDisappearing
Hello OnAppearing
Hello OnDisappearing
MainAppearingPage OnAppearing
MainAppearingPage OnDisappearing
Hello OnAppearing

Android
=======
01-26 12:27:02.867 I/mono-stdout( 1005): MainAppearingPage OnAppearing
MainAppearingPage OnAppearing
[0:] MainAppearingPage OnAppearing
Hello OnAppearing
01-26 12:28:55.355 I/mono-stdout( 1005): Hello OnAppearing
[0:] Hello OnAppearing

[0:] 
Hello OnAppearing
01-26 12:27:07.023 I/mono-stdout( 1005): Hello OnAppearing
[0:] Hello OnAppearing
[0:] 
Hello OnDisappearing
01-26 12:27:08.823 I/mono-stdout( 1005): Hello OnDisappearing
[0:] Hello OnDisappearing

*Xamarin Forms Version
1.3.1

*Version Information

Microsoft Visual Studio Professional 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Version 4.5.51641

Installed Version: Professional

LightSwitch for Visual Studio 2013 06177-179-0529066-02433
Microsoft LightSwitch for Visual Studio 2013

Team Explorer for Visual Studio 2013 06177-179-0529066-02433
Microsoft Team Explorer for Visual Studio 2013

Visual Basic 2013 06177-179-0529066-02433
Microsoft Visual Basic 2013

Visual C# 2013 06177-179-0529066-02433
Microsoft Visual C# 2013

Visual C++ 2013 06177-179-0529066-02433
Microsoft Visual C++ 2013

Visual F# 2013 06177-179-0529066-02433
Microsoft Visual F# 2013

Visual Studio 2013 Code Analysis Spell Checker 06177-179-0529066-02433
Microsoft(r) Visual Studio(r) 2013 Code Analysis Spell Checker

Portions of International CorrectSpell(tm) spelling correction system (c) 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.

The American Heritage(r) Dictionary of the English Language, Third Edition Copyright (c) 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.

Windows Phone SDK 8.0 - ENU 06177-179-0529066-02433
Windows Phone SDK 8.0 - ENU

Application Insights Tools for Visual Studio Package 1.0
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 12.3.50717.0
Microsoft Web Developer Tools contains the following components:
Support for creating and opening ASP.NET web projects
Browser Link: A communication channel between Visual Studio and browsers
Editor extensions for HTML, CSS, and JavaScript
Page Inspector: Inspection tool for ASP.NET web projects
Scaffolding: A framework for building and running code generators
Server Explorer extensions for Microsoft Azure Websites
Web publishing: Extensions for publishing ASP.NET web projects to hosting providers, on-premises servers, or Microsoft Azure

ASP.NET Web Frameworks and Tools 2012.2 4.1.21001.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013 5.2.20703.0
For additional information, visit http://www.asp.net/

Common Azure Tools 1.2
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

InstallShield Limited Edition
InstallShield. For more information visit the Flexera Software website at <http://www.FlexeraSoftware.com>;. Copyright (c) 2013 Flexera Software LLC. All Rights Reserved.

Microsoft Advertising SDK for Windows Phone
Microsoft Advertising SDK for Windows Phone
Build

Microsoft Azure Mobile Services Tools 1.2
Microsoft Azure Mobile Services Tools

Microsoft Azure Tools 2.4
Microsoft Azure Tools for Microsoft Visual Studio 2013 - v2.4.20730.1601

NuGet Package Manager 2.8.50917.658
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

Office Developer Tools for Visual Studio 2013 ENU 12.0.30626
Microsoft Office Developer Tools for Visual Studio 2013 ENU

PowerShell Tools 1.2
Provides file classification services using PowerShell

PreEmptive Analytics Visualizer 1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools 12.0.30919.1
Microsoft SQL Server Data Tools

Telerik Windows 8 XAML VSExtensions 2014.1.514.0
Telerik UI for Windows 8 XAML VSExtensions

Telerik Windows Phone VSExtensions 2014.5.1020.0
Telerik UI for Windows Phone VSExtensions

Telerik WinForms VSExtensions 2014.5.1021.0
Telerik UI for WinForms VSExtensions

Telerik WPF VSExtensions 2014.5.1020.0
Telerik UI for WPF VSExtensions

VisualSVN 4.0.9
Integration with Subversion version control. For more information about VisualSVN, see the VisualSVN website at http://www.visualsvn.com
Copyright (c) 2005-2014 VisualSVN Ltd. All rights reserved.

Windows Azure Tools 2.3
Windows Azure Tools for Microsoft Visual Studio 2013 - v2.3.20320.1602

Windows Phone 8.1 SDK Integration 1.0
This package integrates the tools for the Windows Phone 8.1 SDK into the menus and controls of Visual Studio.

Workflow Manager Tools 1.0 1.0
This package contains the necessary Visual Studio integration components for Workflow Manager.

Xamarin 3.9.274.0 (74260cb)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android 4.20.0.34 (49a04b966feb40dfdba49d57ba16249b66d606a6)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS 8.6.1.0 (dd1b996f9fab5be032c5bfc54df1bc445953e90f)
Visual Studio extension to enable development for Xamarin.iOS.

Xamarin.iOS Unified Migration 1.0
Automated migration for Xamarin iOS Classic projects to Unified
Comment 1 Michael Rumpler 2015-07-21 03:32:47 UTC
I updated the sample project to Xamarin.Forms.1.4.3.6376 and added projects for WinRT phone and tablet. Here are my test results:

Android:
PushModalAsync: Appearing of new page, Disappearing of old page is NOT raised, PopModalAsync: Disappearing of old page, Appearing of new is NOT raised

iOS:
Appearing of new page followed by Disappearing of old page

WinPhone SL:
OK (Appearing for the page which appears, on switch: Disappearing for old page followed by Appearing for new)

WinRT.Phone:
PushModalAsync: Appearing of new page followed by Disappearing of old page, PopModalAsync: the other way round (=expected)

WinRT.Tablet:
PushModalAsync: Appearing of new page followed by Disappearing of old page, PopModalAsync: the other way round (=expected)


The order of the events is not as important as if they are raised at all, but it should still be consistent across platforms. I would expect the Disappearing event of the old page before the new one raises Appearing.
Comment 2 Michael Rumpler 2015-07-21 03:34:10 UTC
Created attachment 12126 [details]
Updated sample project

Updated to current stable XF version, added WinRT projects
Comment 4 Rui Marinho 2016-04-08 19:17:58 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
Comment 5 Michael Rumpler 2016-04-11 08:19:00 UTC
This has indeed been fixed between XF 2.0.0.6482 and 2.2.0.5-pre2 (checked only Android).

But I'd rather you'd write that you fixed it and not that you "believe" it has been fixed in the last 9 months while nobody looked at it.
Comment 6 Ione Souza Junior 2016-04-18 23:18:09 UTC
I tested now in XF 2.2.0.5-pre2 and the problem continues.
Comment 7 Ione Souza Junior 2016-04-19 00:02:38 UTC
Sorry, I'm wrong. This problem has been fixed in the XF 2.2.0.5-pre2 version. 

Thank you Xamarin team!

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