SfChart crashes with ObjectDisposedException

If I use a binding for a HorizontalLineAnnotation SfChart gives a ObjectDisposedException if this binding is updated.
Please see my code below. I get the exception, if I press the button.

(CarouselView is from CarouselView.FormsPlugin nuget package)

XAML:


             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                xmlns:carouselView="clr-namespace:CarouselView.FormsPlugin.Abstractions;assembly=CarouselView.FormsPlugin.Abstractions"
                xmlns:chart="clr-namespace:Syncfusion.SfChart.XForms;assembly=Syncfusion.SfChart.XForms"
             x:Class="SfChartProblem.MainPage">
   
        ShowIndicators="True"
        ShowArrows="False"
        IndicatorsShape="Circle"
        VerticalOptions="FillAndExpand"
        HorizontalOptions="FillAndExpand">
       
           
               
                >
                   
                       
                            Minimum="0.5"
                            Maximum="10.5"
                            >
                       

                   

                   
                       
                            Minimum="-10"
                            Maximum="10">
                       

                   

                   
                   
                       
                   
               


               

               
                   
                   

4 Replies

MR Michael Reim April 24, 2018 11:43 AM UTC

Sorry can't post the code, so please see attachment.

Attachment: MainPage_9ea09fa.zip


MK Muneesh Kumar G Syncfusion Team May 3, 2018 12:49 PM UTC

Hi Michael, 
  
Thanks for using Syncfusion products.  
  
We have analyzed your query and we would like to inform you that changing the property of the view in another tab page is trying to access the disposed object in SfChart. However, we have resolved this issue by setting the null value to Chart property of annotation in custom renderer of Android. Please refer the code from following sample. 
 
 
Note: We will fix this issue in source level and include it in our 2017 Volume 2 release. 
 
Please let us know if you have any queries.  
  
Thanks, 
Muneesh Kumar G. 
  
 



MR Michael Reim May 9, 2018 08:36 AM UTC

Hello Muneesh,

thank you for the workaround.
It works like a charm.

Regards,
Michael


DV Divya Venkatesan Syncfusion Team May 10, 2018 05:21 AM UTC

Hi Michael,

Thanks for the update. We are glad to know that the given solution works.

Please let us know if you need any further assistance.

Regards,
Divya Venkatesan


Loader.
Up arrow icon