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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Cannot access a disposed object

Thread ID:





131069 Jun 19,2017 08:44 AM UTC Jun 20,2017 10:34 AM UTC Xamarin.Android 1
Tags: SfDataGrid
Asked On June 19, 2017 08:44 AM UTC


I'm trying your SfDataGrid and I'm getting in trouble when I call an async void button click handle than contains an await Task method call. The button handler ends with a FragmentManager.PopBackStack(); but I think there is something lost on disposing grid.

After some other work on the app, the GC is automatically called and I get the following error that shutdown my app:

Unhandled Exception:
06-19 10:31:53.184 E/mono (16264): System.ObjectDisposedException: Cannot access a disposed object.
06-19 10:31:53.184 E/mono (16264): Object name: 'Syncfusion.SfDataGrid.SfDataGrid'.
06-19 10:31:53.184 E/mono (16264): at Java.Interop.JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) [0x00030] in /Users/builder/data/lanes/3511/ce955cc0/source/Java.Interop/src/Java.Interop/Java.Interop/JniPeerMembers.cs:153
06-19 10:31:53.184 E/mono (16264): at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualInt32Method (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00002] in /Users/builder/data/lanes/3511/ce955cc0/source/Java.Interop/src/Java.Interop/Java.Interop/JniPeerMembers.JniInstanceMethods_Invoke.cs:201
06-19 10:31:53.184 E/mono (16264): at Android.Views.ViewGroup.get_ChildCount () [0x00000] in /Users/builder/data/lanes/3511/ce955cc0/source/monodroid/src/Mono.Android/platforms/android-22/src/generated/Android.Views.ViewGroup.cs:1117
06-19 10:31:53.184 E/mono (16264): at Syncfusion.SfDataGrid.SfDataGrid.Dispose (System.Boolean disposing) [0x00000] in <8578f20a05e5450c903cc09f21f2ec6d>:0
06-19 10:31:53.184 E/mono (16264): at Java.Lang.Object.Finalize () [0x00051] in /Users/builder/data/lanes/3511/ce955cc0/source/xamarin-android/src/Mono.Android/Java.Lang/Object.cs:67

Could you provide me some information?
Thank you!

Ashok N [Syncfusion]
Replied On June 20, 2017 10:34 AM UTC

Hi Customer,  
Thanks for contacting Syncfusion support. 
We have tested the reported issue by loading SfDataGrid into Fragment and called FragmentManager.PopBackStack() method in button click event but we are not able to reproduce the reported crash. For your reference we have attached the working copy of our sample in the below link. Could you please do revert us by modifying our sample to replicate the issue. Otherwise please share your sample along with replication procedure, that would be more helpful for us to proceed further.  


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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