Bug 43726

Summary: Setting TabbedPage.ItemsSource to Null Causes Crash
Product: Forms Reporter: Jimmy [MSFT] <jimmy.garrido>
Component: AndroidAssignee: Bugzilla <bugzilla>
Status: VERIFIED FIXED    
Severity: major CC: jani.lirkki, jas, parmendrak, paul.dipietro
Priority: Normal    
Version: 2.3.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Tags: ac Is this bug a regression?: ---
Last known good build:
Attachments: repro project

Description Jimmy [MSFT] 2016-08-24 22:10:48 UTC
Created attachment 17206 [details]
repro project

### Overview
On Android with AppCompat, setting a TabbedPage ItemsSource to null will cause the app to crash with an ArgumentOutOfRangeException because it tries to scroll to CurrentPage which is also now null.

Stacktrace: https://gist.github.com/jimmgarrido/6175406581b0804b20440c8d9fbe15c4

### Steps to Reproduce
1. Run the attached repro project
2. Switch to a child other than the first
3. Press "Set Null"


### Expected Results
The TabbedPage will be empty with no visible children pages.


### Actual Results
App crashes


### Testing Info
Reproduced on Forms 2.3.1 and 2.3.2-pre1
Comment 3 Jani Lirkki 2016-09-14 12:24:58 UTC
Still reproducible in Xamarin Forms version 2.3.2.127.
Comment 4 Jani Lirkki 2016-09-19 07:01:12 UTC
This is no longer reproducible in Xamarin Forms version 2.3.3.152-pre2. Thanks!
Comment 5 Parmendra Kumar 2016-09-22 13:38:43 UTC
I have checked this issue with xamarin.forms version 2.3.3.152-pre2 and observed that this issue has been fixed.

Hence closing this issue.