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

iOS ListView with GroupHeader leads into crash since latest release #2473

Closed
Sebastian1989101 opened this issue Apr 16, 2018 · 15 comments
Closed

Comments

@Sebastian1989101
Copy link

Sebastian1989101 commented Apr 16, 2018

Description

When I use a ListView with GroupHeaders I get an Exception since the last Xamarin.Forms stable release. It works with the previous version. The crash occurs as soon as my Data Source changes through a search or something else.

Steps to Reproduce

  1. Using Group Headers within a ListView and change the data on runtime (through a search for example)

Expected Behavior

No exception as it was with the latest 2.5.0 stable release of Forms.

Actual Behavior

This exception:

Application.Main (System.String[] args)
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: index

ListProxy.get_Item (System.Int32 index)
IList.get_Item (System.Int32 index)
TemplatedItemsList`2[TView,TItem].get_Item (System.Int32 index)
ListViewRenderer+ListViewDataSource.HeaderViewDisplayingEnded (UIKit.UITableView tableView, UIKit.UIView headerView, System.nint section)
(wrapper managed-to-native) ObjCRuntime.Messaging.objc_msgSend(intptr,intptr)
UITableView.ReloadData ()
ListViewRenderer.UpdateItems (System.Collections.Specialized.NotifyCollectionChangedEventArgs e, System.Int32 section, System.Boolean resetWhenGrouped)
ListViewRenderer.OnCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
TemplatedItemsList`2[TView,TItem].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
TemplatedItemsList`2[TView,TItem].GroupedReset ()
TemplatedItemsList`2[TView,TItem].OnCollectionChangedGrouped (System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
TemplatedItemsList`2[TView,TItem].OnProxyCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e, System.Boolean fixWindows)
TemplatedItemsList`2[TView,TItem].OnProxyCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
TemplatedItemsList`2[TView,TItem].OnItemsSourceChanged (System.Boolean fromGrouping)
TemplatedItemsList`2[TView,TItem].BindableOnPropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e)
(wrapper delegate-invoke) .invoke_void_object_PropertyChangedEventArgs(object,System.ComponentModel.PropertyChangedEventArgs)
BindableObject.OnPropertyChanged (System.String propertyName)
Element.OnPropertyChanged (System.String propertyName)
BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindableObject+BindablePropertyContext context, System.Object value, System.Boolean currentlyApplying, Xamarin.Forms.Internals.SetValueFlags attributes, System.Boolean silent)
BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.Internals.SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes)
BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value, System.Boolean fromStyle, System.Boolean checkAccess)
BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value)
ItemsView`1[TVisual].set_ItemsSource (System.Collections.IEnumerable value)
FlowListView.ReloadGroupedContainerList ()
FlowListView.ForceReload (System.Boolean updateOnly)
FlowListView.FlowListViewPropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e)
(wrapper delegate-invoke) .invoke_void_object_PropertyChangedEventArgs(object,System.ComponentModel.PropertyChangedEventArgs)
BindableObject.OnPropertyChanged (System.String propertyName)
Element.OnPropertyChanged (System.String propertyName)
BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindableObject+BindablePropertyContext context, System.Object value, System.Boolean currentlyApplying, Xamarin.Forms.Internals.SetValueFlags attributes, System.Boolean silent)
BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.Internals.SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes)
BindingExpression.ApplyCore (System.Object sourceObject, Xamarin.Forms.BindableObject target, Xamarin.Forms.BindableProperty property, System.Boolean fromTarget)
BindingExpression.Apply (System.Boolean fromTarget)
BindingExpression+BindingExpressionPart.<PropertyChanged>b__47_0 ()
NSAsyncActionDispatcher.Apply ()
(wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate)
UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName)
Application.Main (System.String[] args)

This happens if I use a Array as DataSource (with replacing the array after the data is filtered) and also if I use the Clear method on a ObservableCollection. However it seems like it can be avoided by used Remove after I added the filtered result.

Basic Information

  • Version with issue:
  • Last known good version:
  • IDE:
  • Platform Target Frameworks: .NET Standard 2.0
    • iOS: every iOS version
  • Nuget Packages: 2.5.1
  • Affected Devices: Every iOS device

Screenshots

Reproduction Link

@PureWeen
Copy link
Contributor

This will be fixed soon in an upcoming patch
#2323

@Sebastian1989101
Copy link
Author

@PureWeen Can you already say when you will push a fixed version? Because we got a App through our QA which is now available to our customers with this bug..

@PureWeen
Copy link
Contributor

The release is tagged and moving through the verification pipelines so unless it hits any blockers we'll hopefully have it out this week.

@Sebastian1989101
Copy link
Author

@PureWeen Is the release already out? Because if it is, the bug still exists and I just updated everything (Studio, Libraries).

@PureWeen
Copy link
Contributor

Not yet :-/ we're hoping for early this week

@ponci
Copy link

ponci commented Apr 25, 2018

Any news about the release date? @PureWeen

@Sebastian1989101
Copy link
Author

I hope this issue will not be handled like the SplitView MasterDetail issue on Forms... About two weeks since the bugged version was released already and still no bug fix. Well to be fair, SplitView is reported since 2015 and still not fixed...

@Sebastian1989101
Copy link
Author

@PureWeen still an open issue... Sadly MvvmCross uses at least the latest "stable" release for the newest Version so I cannot go back... How long do we still need to wait for such a important fix? It breaks my whole app because I use grouped listviews everywhere...

@WilliamWatterson86
Copy link

Any news on a release date for this?

@Sebastian1989101
Copy link
Author

@WilliamWarrerson86 I guess it ends the same like the Master Detail SplitView issue (which is open since years now...). It will get ignored. Fixing something like this should not take multiple weeks...

@PureWeen
Copy link
Contributor

PureWeen commented May 3, 2018

The fix exists and it's checked into master and all the branches. Really apologize on the delays with this one a fix will be coming

@PureWeen
Copy link
Contributor

PureWeen commented May 4, 2018

@MitchBomcanhao
Copy link

years later we're still getting loads of similar crashes to this on the latest xamarin forms packages...

@Sebastian1989101
Copy link
Author

years later we're still getting loads of similar crashes to this on the latest xamarin forms packages...

Don't get your hopes up for any fixes tbh. Xamarin.Forms is on a bug collecting state since at least 2018 introducing more bugs and issues with each release without fixing stuff. Same goes for MAUI. It's a total mess and not useable at all except for very very small none complex applications. You are better off making your app native twice or using a different framework if you expect performance or something working.

@MitchBomcanhao
Copy link

I'm not hopeful, but if nobody complains about it then it is a certainty that it won't get fixed.
I'm pretty sure that whatever bugs are on xamarin forms are likely to still be there on maui, so there are a lot of those things where if they should fix it on maui (because it is their future), then backporting to xamarin forms should be easy enough.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants