Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

[Bug] Tab.Items.Clear() crashes on 4.5.0.356. #9801

Closed
PureWeen opened this issue Mar 2, 2020 · 11 comments
Closed

[Bug] Tab.Items.Clear() crashes on 4.5.0.356. #9801

PureWeen opened this issue Mar 2, 2020 · 11 comments
Assignees
Labels
e/1 🕐 1 i/regression in-progress This issue has an associated pull request that may resolve it! s/unverified New report that has yet to be verified t/bug 🐛
Milestone

Comments

@PureWeen
Copy link
Contributor

PureWeen commented Mar 2, 2020

#8215 (comment)

Hi guys,

Tab.Items.Clear() crashes on 4.5.0.356.

System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Attached is a repro solution. Crash occurs in AppShell.xaml.cs line 28 on Tab.Items.Clear()

Thanks

PickerTestApp.zip

@francis2
Copy link

francis2 commented Mar 2, 2020

I forgot to specify this crashes only on iOS.

@samhouts samhouts added this to the 4.5.0 milestone Mar 3, 2020
@samhouts samhouts added the in-progress This issue has an associated pull request that may resolve it! label Mar 12, 2020
@francis2
Copy link

Hi,

I am trying 4.5.0.495 on the same test project I sent to report this issue (#8215), and it does not work with iOS. It appears something else broke in this release.

The "Empty" Shell Tab is unreachable.

Works fine on Android. Fails on iOS. No errors in Visual studio--only the Tab fails to load properly in iOS.

Attached is a repro solution (same as in #8215).
PickerTestApp (1).zip

image

@PureWeen
Copy link
Contributor Author

@francis2 this should be fixed on the next releases

I tested your sample against nightly and it didn't crash for me

@francis2
Copy link

francis2 commented Apr 2, 2020

I'm sorry but I have to reopen this issue: the sample does not display the top tabs on iOS. It works fine in Android.

I just tried with Forms 4.5.0.530 and 4.6.0.529-pre3 and I get the same behavior.

If you comment out PickerTestApp/Views/AppShell.xaml.cs line 30 (resultsTab.Items.Clear()), then it works.

This is what's you're supposed to see:

expected

@francis2
Copy link

francis2 commented Apr 6, 2020

Hi,

What should I do to get noticed? Create a new issue and link it to this one?

@PureWeen
Copy link
Contributor Author

PureWeen commented Apr 6, 2020

Dangit :-/ sorry about this one @francis2

I've extended my platform UI tests to add top tabs and I'm seeing the issue on iOS

I'll have a PR up for this hopefully today

@francis2
Copy link

Hi guys, This now runs fine on 4.6.0.967, however I just tried 4.7.0.968 and it crashes. Did someone forget to merge into 4.7?

@PureWeen
Copy link
Contributor Author

@francis2

just using the same repro as here?

#9801 (comment)

@francis2
Copy link

Actually that repro works with 4.7. I'll have to do more tests next week. Could be Telerik controls.

@francis2
Copy link

I forgot about this one as I'm still using 4.6. So I re-tested today on 4.8:

The crash still occurs on line 25 in AppShell.xaml.cs -> secondTab.Items.Clear();

Xamarin.Forms 4.6.1073
Works as expected on both Android and iOS.

Xamarin.Forms 4.8.1269
Crashes on both OSes.

Logs and repro attached.

Android Debug Output.txt
iOS Debug Output.txt
PickerTestApp.zip

@francis2
Copy link

francis2 commented Sep 1, 2020

I opened a new issue #12000

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
e/1 🕐 1 i/regression in-progress This issue has an associated pull request that may resolve it! s/unverified New report that has yet to be verified t/bug 🐛
Projects
None yet
Development

No branches or pull requests

3 participants