Bug 36251 - Issues when switching between pages of a TabbedPage on iOS
Summary: Issues when switching between pages of a TabbedPage on iOS
Alias: None
Product: Forms
Classification: Xamarin
Component: iOS ()
Version: 2.0.0
Hardware: Other Other
: --- normal
Target Milestone: ---
Assignee: Rui Marinho
Depends on:
Reported: 2015-11-25 11:58 UTC by i1387552
Modified: 2016-02-01 09:00 UTC (History)
4 users (show)

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

Test Project (160.41 KB, application/zip)
2015-11-25 11:58 UTC, i1387552

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 i1387552 2015-11-25 11:58:19 UTC
1. When switching between the tabs/pages too fast I get a NullReferenceException (at Xamarin.Forms.Platform.iOS.Platform.GetRenderer).
2. I couldn't figure out when this happens exactly but after frequently switching between the tabs/pages the toolbar items of one or more pages just disappear.

I attached a test project which shows these issues on the simulator and on my test device (5th gen. iPod).
Comment 1 i1387552 2015-11-25 11:58:59 UTC
Created attachment 13993 [details]
Test Project
Comment 2 i1387552 2015-12-04 09:52:19 UTC
I finally found out when the toolbar items disappear!

Just tap the currently selected tab again, select a different tab/page and when you go back to the previous page the toolbar items are gone.
Comment 3 Joe Maier 2015-12-18 13:52:55 UTC
Same issue here.
The disappearing toolbar icons are the first symptom of the problem.
After more clicks on the tabs the app finally crashes.

Here's the stacktrace of the NullReferenceException, caught in main.cs:

  at Xamarin.Forms.Platform.iOS.Platform.GetRenderer (Xamarin.Forms.VisualElement bindable) [0x00000] in <filename unknown>:0 
  at Xamarin.Forms.Platform.iOS.NavigationRenderer.GetAppearedOrDisappearedTask (Xamarin.Forms.Page page) [0x00011] in <filename unknown>:0 
  at Xamarin.Forms.Platform.iOS.NavigationRenderer.RemoveViewControllers (Boolean animated) [0x00048] in <filename unknown>:0 
  at Xamarin.Forms.Platform.iOS.NavigationRenderer.PopToRootViewController (Boolean animated) [0x00008] in <filename unknown>:0 
  at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
  at UIKit.UIApplication.Main (System.String[] args, IntPtr principal, IntPtr delegate) [0x00005] in /Users/builder/data/lanes/2377/73229919/source/maccore/src/UIKit/UIApplication.cs:77 
  at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/2377/73229919/source/maccore/src/UIKit/UIApplication.cs:61 
  at MyTestApp.iOS.Application.Main (System.String[] args) [0x00009] in /Users/me/Projects/Xamarin/My_Apps/MyTestApp/iOS/Main.cs:20 

This already happened in Xamarin Forms 1.5 and is still happening in 2.0.
Comment 4 Joe Maier 2015-12-18 13:55:07 UTC
Additional info:

IMHO this has nothing to do with clicking on the TABs too fast, it just happens after clicking often enough on different tabs (which obviously happens sooner the faster you tap :)
Comment 5 Rui Marinho 2016-01-08 11:33:22 UTC
Should be fixed in 2.0.2-pre1
Comment 6 Rui Marinho 2016-01-20 11:56:44 UTC
Correction should be fixed in 2.1.0-pre1
Comment 7 Joe Maier 2016-01-23 11:21:28 UTC
Just to be certain,
do you really mean 2.1.0 or was it a type and you meant 2.0.1?
After my tests it's not fixed in 2.0.1.
Comment 8 Parmendra Kumar 2016-01-28 11:15:23 UTC
I have checked this issue with Xamarin.Forms and now its working fine.

Hence closing this issue.
Comment 9 i1387552 2016-02-01 09:00:59 UTC
I can verify that this is fixed in 2.1.