CRASH: When popping a modal page that contains SfRotator on iOS

Hi,

I have a ContentPage that has a SfRotator control, I push this page as a modal. When the page is popped, the app crashes. This only occurs on iOS, it works perfect on Android.

See below for the stack trace. The last part of it involved the SfRotator constrol.

Any idea what may be the cause?

Regards,

-Jeff

Parameter name: source
System.Linq.Enumerable.ElementAt<TSource>(IEnumerable<T> source, int index)ElementAt.cs:15
Syncfusion.SfRotator.XForms.iOS.SfRotatorRenderer.ConvertFormsTemplateToNative(DataTemplate view, nint index, CGRect size, SfRotator _rotator)<fc15477b4a284e9385f6aa64e7c70430>:0
Syncfusion.SfRotator.XForms.iOS.SfRotatorRenderer.HandleDrawItemEventHandler(object sender, RotatorViewEventArgs e)<fc15477b4a284e9385f6aa64e7c70430>:0
Syncfusion.SfRotator.iOS.SfRotator.OnDrawItem(RotatorViewEventArgs args)<8a522b5ec2eb4e548501f5b27966532d>:0
Syncfusion.SfRotator.iOS.SfRotator.NavigateImageViewUpdate()<8a522b5ec2eb4e548501f5b27966532d>:0
Syncfusion.SfRotator.iOS.SfRotator.set_SelectedIndex(nint value)<8a522b5ec2eb4e548501f5b27966532d>:0
Syncfusion.SfRotator.XForms.iOS.SfRotatorMapping.OnRotatorPropertiesChanged(string propertyName, SfRotator formsRotator, SFRotator nativeRotator)<fc15477b4a284e9385f6aa64e7c70430>:0
Syncfusion.SfRotator.XForms.iOS.SfRotatorRenderer.OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)<fc15477b4a284e9385f6aa64e7c70430>:0
<Module>.invoke_void_object_PropertyChangedEventArgs(object, PropertyChangedEventArgs)(wrapper delegate-invoke)
Xamarin.Forms.BindableObject.OnPropertyChanged(string propertyName)
Xamarin.Forms.Element.OnPropertyChanged(string propertyName)
Xamarin.Forms.BindableObject.SetValueActual(BindableProperty property, BindableObject.BindablePropertyContext context, object value, bool currentlyApplying, SetValueFlags attributes, bool silent)
Xamarin.Forms.BindableObject.SetValueCore(BindableProperty property, object value, SetValueFlags attributes, BindableObject.SetValuePrivateFlagsprivateAttributes)
Xamarin.Forms.BindingExpression.ApplyCore(object sourceObject, BindableObject target, BindableProperty property, bool fromTarget)
Xamarin.Forms.BindingExpression.Apply(object sourceObject, BindableObject target, BindableProperty property)
Xamarin.Forms.Binding.Apply(object newContext, BindableObject bindObj, BindableProperty targetProperty)
Xamarin.Forms.BindableObject.ApplyBindings(bool skipBindingContext)
Xamarin.Forms.BindableObject.ApplyBindings()
Xamarin.Forms.BindableObject.SetInheritedBindingContext(BindableObject bindable, object value)
Xamarin.Forms.Element.SetChildInheritedBindingContext(Element child, object context)
Xamarin.Forms.Element.OnBindingContextChanged()
Xamarin.Forms.View.OnBindingContextChanged()
Xamarin.Forms.Grid.OnBindingContextChanged()
Xamarin.Forms.BindableObject.SetInheritedBindingContext(BindableObject bindable, object value)
Xamarin.Forms.Element.SetChildInheritedBindingContext(Element child, object context)
Xamarin.Forms.TemplatedPage.SetChildInheritedBindingContext(Element child, object context)
Xamarin.Forms.Element.OnBindingContextChanged()
Xamarin.Forms.Page.OnBindingContextChanged()
Xamarin.Forms.ContentPage.OnBindingContextChanged()
Xamarin.Forms.BindableObject.BindingContextPropertyChanged(BindableObject bindable, object oldvalue, object newvalue)
Xamarin.Forms.BindableObject.SetValueActual(BindableProperty property, BindableObject.BindablePropertyContext context, object value, bool currentlyApplying, SetValueFlags attributes, bool silent)
Xamarin.Forms.BindableObject.SetValueCore(BindableProperty property, object value, SetValueFlags attributes, BindableObject.SetValuePrivateFlagsprivateAttributes)
Xamarin.Forms.BindableObject.SetValue(BindableProperty property, object value, bool fromStyle, bool checkAccess)
Xamarin.Forms.BindableObject.SetValue(BindableProperty property, object value)
Xamarin.Forms.BindableObject.set_BindingContext(object value)
FreshMvvm.FreshBasePageModel.RaisePageWasPopped()FreshBasePageModel.cs:153
FreshMvvm.PageModelCoreMethods.<PopPageModel>d__12.MoveNext()PageModelCoreMethods.cs:106
MyApp.HowItWorksCarouselPageModel.<<get_Close>b__30_0>d.MoveNext()HowItWorksCarouselPageModel.cs:93 // This initiates the pop

9 Replies

VA Vinnalan Aravazhi Syncfusion Team March 12, 2018 02:02 PM UTC

Hi Jeff,

Thanks for contacting Syncfusion support.

We have checked the reported issue "CRASH: When popping a modal page that contains SfRotator on iOS" from our side and we are unable to reproduce the reported issue from our side.

We have attached the sample in which we have checked the reported issue from our side. Please find the sample from the below link.

Sample: http://www.syncfusion.com/downloads/support/forum/136344/ze/RotatorSample632205157 

So, could you please provide below mentioned details,

1) Modified sample which replicates the reported issue.

2) Which IOS version and device model reported issue gets occur.

It will help us to provide appropriate solution on this.

Regards,
Vinnalan K A.
 



JB Jeff Bowman March 12, 2018 04:06 PM UTC

Thanks!

I will try and see if I can cause the crash in this sample, and attach it back here.

Regards,

-Jeff


VA Vinnalan Aravazhi Syncfusion Team March 13, 2018 04:04 AM UTC

Hi Jeff,

Thanks for the update.

We will wait until we hear from you. Please let us know if you have any other queries.

Regards,
Vinnalan K A.


JB Jeff Bowman March 13, 2018 03:10 PM UTC

Hi Vinnalan,

I am having trouble reproducing this in the sample. However, as I was trying to reproduce this in the sample, I was able to find a workaround for the crash that may help in determining the issue.

We are using MVVM for this page, and the ItemsSource was being defined in the view model.

Since the stack trace was showing basically a form of a 'null reference' exception when talking about the source (which is IEnumerable) I guessed that this was the ItemsSource property of the Rotator. It got me thinking that perhaps someway the ItemSource was being disposed before your code executed because the ViewModel itself was being disposed before your code was execute.

To test this, I changed the location of the definition of the ItemsSource from the View Model to being defined in the constructor of the Rotator page. After making this change, the crash no longer occurs.

In your case, would it be possible to make sure that ItemsSource isn't null before sending it along in the ConvertFormsTemplateToNative method?

Regards,

-Jeff


VA Vinnalan Aravazhi Syncfusion Team March 14, 2018 12:19 PM UTC

Hi Jeff,

Thanks for the update.

We were unable to reproduce the issue. A support incident to track the status of this defect has been created under your account. Please log on to our support website to check for further updates

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents

Please let me know if you have any questions.

Regards,
Vinnalan K A.
 



AM Assoume Mba, Verdier April 1, 2018 05:16 PM UTC

I got the same issue. In a modal page on iOS xamarin form.
I notice that it crashes after 5 minutes. Auto start mode. 
I have an iPad mini model ME279C/A running iOS 11.0.3.  The same occurs with Sample App from app Store (Syncfusion Control Explorer) if I select rotator, It plays after 5 minutes It crashes.



VA Vinnalan Aravazhi Syncfusion Team April 2, 2018 12:25 PM UTC

Hi Assoume,

Thanks for contacting Syncfusion support.

We have checked the reported issue "CRASH: When popping a modal page that contains SfRotator on iOS" from our side and we are unable to reproduce the reported issue from our side. We have attached the sample in which we have checked the reported issue from our side. Please find the sample from the below link.

Sample: http://www.syncfusion.com/downloads/support/forum/136344/ze/RotatorSample-136607706 

So, could you please provide below mentioned details,

1) Modified sample which replicates the reported issue.

It will help us to provide appropriate solution on this.

Regards,
Vinnalan K A. 



AM Assoume Mba, Verdier April 2, 2018 04:57 PM UTC

Hi

Using your sample It works fine. I changed code to use a DataTemplate for the rotator ItemTemplate  using (View/ViewModel). The image is an Uri from online website. 

My first impression is about the size of the image may affect crash delay (could take more time to crash for small image). 

I attached the sample with my changes. It may take less than 5min to see the crash on a physical iPad Mini device. (ME279C/A running iOS 11.0.3)


Regards.

Attachment: RotatorSample_db699f74.zip


VA Vinnalan Aravazhi Syncfusion Team April 3, 2018 12:16 PM UTC

Hi Assoume,

Thanks for the update.

We have checked the reported issue "CRASH: When popping a modal page that contains SfRotator on iOS" from our side using provided sample and we are unable to reproduce the reported issue from our side. Please send the Stacktrace details which will help us analyze the issue further to provide appropriate solution for this.

Regards,
Vinnalan K A.

Loader.
Up arrow icon