Bug 43726 - Setting TabbedPage.ItemsSource to Null Causes Crash
Summary: Setting TabbedPage.ItemsSource to Null Causes Crash
Status: VERIFIED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Android (show other bugs)
Version: 2.3.2
Hardware: PC Windows
: Normal major
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
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:


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

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.

Notice (2018-05-21): bugzilla.xamarin.com will be switching to read-only mode on Thursday, 2018-05-25 22:00 UTC.

Please join us on Visual Studio Developer Community and GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs and copy them to the new locations as needed for follow-up. The See Also field on each Bugzilla bug will be updated with a link to its new location when applicable.

After Bugzilla is read-only, if you have new information to add for a bug that does not yet have a matching issue on Developer Community or GitHub, you can create a follow-up issue in the new location. Copy and paste the title and description from this bug, and then add your new details. You can get a pre-formatted version of the title and description here:

In special cases you might also want the comments:

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.

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