We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SfChart GetStream() throws Exception

Thread ID:

Created:

Updated:

Platform:

Replies:

130979 Jun 14,2017 10:39 AM UTC Jun 16,2017 03:52 AM UTC Xamarin.Forms 1
loading
Tags: SfChart
Simon
Asked On June 14, 2017 10:39 AM UTC

I'm currently using the SfChart.GetStream() method to get an image of the chart and print it to a pdf later. Often but not always i get the following:


ChartDependencyService.GetStream (Syncfusion.SfChart.XForms.SfChart chart)

System.ObjectDisposedException: Cannot access a disposed object. Object name: 'Syncfusion.SfChart.XForms.Droid.SfChartExt'.


CANNOT ACCESS A DISPOSED OBJECT. OBJECT NAME: 'SYNCFUSION.SFCHART.XFORMS.DROID.SFCHARTEXT'.
  • 1
    JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self)
  • 2
    JniPeerMembers+JniInstanceMethods.InvokeVirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters)
  • 3
    View.set_DrawingCacheEnabled (System.Boolean value)
  • 4
    ChartDependencyService.GetStream (Syncfusion.SfChart.XForms.SfChart chart)
  • 5
    SfChart.GetStream ()
  • 6
    AuditOverviewView.SaveChart ()
  • 7
    (wrapper delegate-invoke) :invoke_void ()
  • 8
    BaseViewModel.RequestChartImageStream ()
  • 9
    AuditCentralPageViewModel.<get_FinalizeCommand>b__42_0 ()
  • 10
    <.ctor>b__0 (System.Object o)
  • 12
    AuditCentralPage+<ShowFinalizeDialog>d__1.MoveNext ()
  • 13
    ExceptionDispatchInfo.Throw ()


I think it might have something to do with the fact, that i use the GetStream() call not only when the page with the chart is active, but also when there is another page modally presented above the page with the chart. I want to get the image and create the pdf in this modally presented page too. My guess is, the chart is disposed internally cause its not displayed currently and thus the exception is thrown when calling the SfChart.GetSTream() method.So my question is, are my assumptions correct? What way is there around this, besides only calling the GetStream() Method when the ChartPage is active.esides only calling the GetStream() Method when the ChartPage is active.

Parthiban Sundaram [Syncfusion]
Replied On June 16, 2017 03:52 AM UTC

Hi Simon,

Thanks for your interest in Syncfusion components.

We were able to reproduce the reported issue at our end. A support incident has been created under your account and we request you to login into our Direct Trac support system for further updates on this issue. Our Direct Trac support system can be accessed from the following link:

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

Regards,
Parthiban S

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;