System.ObjectDisposedException: Cannot access a disposed object. 'Android.Graphics.Paint'.

 Getting the following crash sometimes from the calendar component when app is resumed or fragment is shown again

System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'Android.Graphics.Paint'.
at Java.Interop.JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) [0x00029] in <26521a5118b44c858c385715922b9d5d>:0 
at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00000] in <26521a5118b44c858c385715922b9d5d>:0 
at Android.Graphics.Paint.set_AntiAlias (System.Boolean value) [0x00022] in <4ccdb3137d974856b786e1aeebbfbab6>:0 
at Com.Syncfusion.Calendar.CellTextView.OnDraw (Android.Graphics.Canvas canvas) [0x00000] in <4b61d9418d794fe299c3227256d1e7c6>:0 
at Android.Views.View.n_OnDraw_Landroid_graphics_Canvas_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_canvas) [0x00011] in <4ccdb3137d974856b786e1aeebbfbab6>:0 
at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.85(intptr,intptr,intptr)

1 Reply

SS SaiGanesh Sakthivel Syncfusion Team May 19, 2020 02:39 PM UTC

 Hi Ravi, 
 
Thank you for contacting Syncfusion support. 
 
We have checked the reported query “System.ObjectDisposedException” from our end. We regret to inform that we could not replicate the reported issue from our end. We have attached the tested sample in the following link for your reference. 
 
 
Please check the sample and if you are still facing the issue kindly modify our sample to replicate the issue with following details,  
   
  
·       Version of Syncfusion calendar and Xamarin.android  
·       Share the issue replicate video or procedure to replicate the issue.  
  
Regards,  
SaiGanesh Sakthivel 


Loader.
Up arrow icon