Hello,
In our app, whenever we close a page to go back to the previous one, just before closing it, we set the page's BindingContext to Null to cleanup some other stuff in our app. It usually isn't a problem with your grid, but on one of our pages, a NullReference happened that crashed the app :
NullReferenceException Object reference not set to an instance of an object at Syncfusion.SfDataGrid.XForms.SpannedDataRow.Dispose (System.Boolean disposing) <0xc877bca4 + 0x00024> in <31e4d624db2b4decb46fcb05e41f89c5>:0 at Syncfusion.SfDataGrid.XForms.DataRowBase.Dispose () <0xc876b71c + 0x0001f> in <31e4d624db2b4decb46fcb05e41f89c5>:0 at Syncfusion.SfDataGrid.XForms.RowGenerator.OnItemsSourceChanged () <0xc876c6a8 + 0x0009b> in <31e4d624db2b4decb46fcb05e41f89c5>:0 at Syncfusion.SfDataGrid.XForms.SfDataGrid.OnItemsSourceChanged (Xamarin.Forms.BindableObject bindable, System.Object oldValue, System.Object newValue) <0xc87465f4 + 0x008f7> in <31e4d624db2b4decb46fcb05e41f89c5>:0 at Xamarin.Forms.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) <0xca29f600 + 0x0033f> in <0e83d8ea25694febbc82730d1fc0e5e7>:0 at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.Internals.SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes) <0xca29ef58 + 0x0057b> in <0e83d8ea25694febbc82730d1fc0e5e7>:0 at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value, System.Boolean fromStyle, System.Boolean checkAccess) <0xca29ed50 + 0x000eb> in <0e83d8ea25694febbc82730d1fc0e5e7>:0 at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value, System.Boolean fromStyle) <0xca29ed10 + 0x00037> in <0e83d8ea25694febbc82730d1fc0e5e7>:0 at Xamarin.Forms.Setter.UnApply (Xamarin.Forms.BindableObject target, System.Boolean fromStyle) <0xca357180 + 0x0012f> in <0e83d8ea25694febbc82730d1fc0e5e7>:0 (...)
This crash happened only once, and I cannot reproduce it, but I was hoping you would be able to, at the very least, tell me what could be the cause.
There are 2 things that work differently with this page compared to the rest :
- We use a SfDataPager with OnDemandLoading
- Whenever there is only 1 page, the SfDataPager is hidden, and we use a different Binding for the SfDataGrid.ItemsSource (Basically, using DataTriggers, whenever there are 2 pages, we use SfDataPager.PagedSource as our ItemsSource, but if there is only 1 page, we use a normal Binding on a list)
Preferably, we would rather not change the way this grid works, because that is how our users want it to work.
This issue happened in these conditions :
- Honeywell CT60 on Android 6.0
- SyncFusion v17.3.0.34
- Xamarin.Android.Support v28.0.0.3
- Xamarin.Forms v4.3.0.908675