Bug 43726 - Setting TabbedPage.ItemsSource to Null Causes Crash
Summary: Setting TabbedPage.ItemsSource to Null Causes Crash
Alias: None
Product: Forms
Classification: Xamarin
Component: Android (show other bugs)
Version: 2.3.2
Hardware: PC Windows
: Normal major
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2016-08-24 22:10 UTC by Jimmy [MSFT]
Modified: 2016-09-22 13:38 UTC (History)
4 users (show)

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

repro project (47.05 KB, application/zip)
2016-08-24 22:10 UTC, Jimmy [MSFT]

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
Comment 4 Jani Lirkki 2016-09-19 07:01:12 UTC
This is no longer reproducible in Xamarin Forms version Thanks!
Comment 5 Parmendra Kumar 2016-09-22 13:38:43 UTC
I have checked this issue with xamarin.forms version and observed that this issue has been fixed.

Hence closing this issue.

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