Welcome to the Xamarin.Android feedback portal. We’re happy you’re here! If you have feedback on how to improve the Xamarin.Android, we’d love to hear it!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

1
Vote

Hi,

after moving an SFCalendar from an Activity into a Fragment I was getting ObjectDisposed Exceptions like this:

--------------------------------------------------------------------------------------------------------------------------------------------------------------------

The thread 0x1f has exited with code 0 (0x0).

03-04 10:44:02.902 D/Mono ( 5444): DllImport attempting to load: '/system/lib/liblog.so'.

03-04 10:44:02.902 D/Mono ( 5444): DllImport loaded library '/system/lib/liblog.so'.

03-04 10:44:02.902 D/Mono ( 5444): DllImport searching in: '/system/lib/liblog.so' ('/system/lib/liblog.so').

03-04 10:44:02.902 D/Mono ( 5444): Searching for '__android_log_print'.

03-04 10:44:02.902 D/Mono ( 5444): Probing '__android_log_print'.

03-04 10:44:02.902 D/Mono ( 5444): Found as '__android_log_print'.

03-04 10:44:02.903 I/MonoDroid( 5444): UNHANDLED EXCEPTION:

03-04 10:44:02.905 I/MonoDroid( 5444): System.ObjectDisposedException: Cannot access a disposed object.

03-04 10:44:02.905 I/MonoDroid( 5444): Object name: 'Android.Graphics.Paint'.

03-04 10:44:02.905 I/MonoDroid( 5444): at Java.Interop.JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) [0x00029] in :0

03-04 10:44:02.905 I/MonoDroid( 5444): at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00000] in :0

03-04 10:44:02.905 I/MonoDroid( 5444): at Android.Graphics.Paint.set_Color (Android.Graphics.Color value) [0x00028] in <11f101b564894ca7af6c482ddc51c698>:0

03-04 10:44:02.905 I/MonoDroid( 5444): at Com.Syncfusion.Calendar.CellTextView.SetTextColor (Android.Graphics.Color textclr) [0x00007] in <52246280cd05448b886c596887fa40a6>:0

03-04 10:44:02.905 I/MonoDroid( 5444): at Com.Syncfusion.Calendar.SelectionLayout.MonthItemTextBackColorUpdate (Com.Syncfusion.Calendar.MonthViewItem monthViewItem, System.Int32 calendarIndex, System.Boolean isStart, System.Boolean isEnd, System.Boolean isSelect) [0x00082] in <52246280cd05448b886c596887fa40a6>:0

03-04 10:44:02.905 I/MonoDroid( 5444): at Com.Syncfusion.Calendar.SelectionLayout.UpdateSingleSelection (System.Int32 prevSelectedIndex, System.Int32 currentSelectedIndex) [0x000c1] in <52246280cd05448b886c596887fa40a6>:0

03-04 10:44:02.905 I/MonoDroid( 5444): at Com.Syncfusion.Calendar.ViewRenderer.GetCellCoordinate (System.Single xPosition, System.Single yPosition, System.Int32 selectedindex) [0x0055f] in <52246280cd05448b886c596887fa40a6>:0

03-04 10:44:02.905 I/MonoDroid( 5444): at Com.Syncfusion.Calendar.SelectionLayout.HandleSelection (Android.Views.MotionEvent motionEvent, System.Int32 index, System.Single startXPosition, System.Single startYPosition) [0x00182] in <52246280cd05448b886c596887fa40a6>:0

03-04 10:44:02.905 I/MonoDroid( 5444): at Com.Syncfusion.Calendar.SwipePanel.ExecuteOnActionUp (System.Single position, System.Single calendarValue, Android.Views.MotionEvent ev) [0x00270] in <52246280cd05448b886c596887fa40a6>:0

03-04 10:44:02.905 I/MonoDroid( 5444): at Com.Syncfusion.Calendar.SwipePanel.Handle_Touch (System.Object sender, Android.Views.View+TouchEventArgs ev) [0x00385] in <52246280cd05448b886c596887fa40a6>:0

03-04 10:44:02.905 I/MonoDroid( 5444): at Android.Views.View+IOnTouchListenerImplementor.OnTouch (Android.Views.View v, Android.Views.MotionEvent e) [0x00014] in <11f101b564894ca7af6c482ddc51c698>:0

03-04 10:44:02.905 I/MonoDroid( 5444): at Android.Views.View+IOnTouchListenerInvoker.n_OnTouch_Landroid_view_View_Landroid_view_MotionEvent_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_v, System.IntPtr native_e) [0x00019] in <11f101b564894ca7af6c482ddc51c698>:0

03-04 10:44:02.905 I/MonoDroid( 5444): at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.95(intptr,intptr,intptr,intptr)

03-04 10:44:02.910 W/zygote ( 5444): JNI RegisterNativeMethods: attempt to register 0 native methods for android.runtime.JavaProxyThrowable

03-04 10:44:02.912 D/Mono ( 5444): DllImport searching in: '__Internal' ('(null)').

03-04 10:44:02.912 D/Mono ( 5444): Searching for 'java_interop_jnienv_throw'.

03-04 10:44:02.913 D/Mono ( 5444): Probing 'java_interop_jnienv_throw'.

03-04 10:44:02.913 D/Mono ( 5444): Found as 'java_interop_jnienv_throw'.

**System.ObjectDisposedException:** 'Cannot access a disposed object.

Object name: 'Android.Graphics.Paint'.'


03-04 10:44:04.314 E/mono ( 5444):

03-04 10:44:04.314 E/mono ( 5444): Unhandled Exception:

03-04 10:44:04.314 E/mono ( 5444): System.ObjectDisposedException: Cannot access a disposed object.

03-04 10:44:04.314 E/mono ( 5444): Object name: 'Android.Graphics.Paint'.

03-04 10:44:04.314 E/mono ( 5444): at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.95(intptr,intptr,intptr,intptr)

03-04 10:44:04.314 E/mono ( 5444): at (wrapper native-to-managed) Android.Runtime.DynamicMethodNameCounter.95(intptr,intptr,intptr,intptr)

03-04 10:44:04.314 E/mono-rt ( 5444): [ERROR] FATAL UNHANDLED EXCEPTION: System.ObjectDisposedException: Cannot access a disposed object.

03-04 10:44:04.314 E/mono-rt ( 5444): Object name: 'Android.Graphics.Paint'.

03-04 10:44:04.314 E/mono-rt ( 5444): at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.95(intptr,intptr,intptr,intptr)

-------------------------------------------------------------------------------------------------------------------------------------------------------------

Or

03-04 11:58:46.757 I/MonoDroid(14200): UNHANDLED EXCEPTION:

03-04 11:58:46.760 I/MonoDroid(14200): System.ObjectDisposedException: Cannot access a disposed object.

03-04 11:58:46.760 I/MonoDroid(14200): Object name: 'Java.Util.GregorianCalendar'.

03-04 11:58:46.760 I/MonoDroid(14200): at Java.Interop.JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) [0x00029] in :0

03-04 11:58:46.760 I/MonoDroid(14200): at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualObjectMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00000] in :0

03-04 11:58:46.760 I/MonoDroid(14200): at Java.Util.Calendar.Clone () [0x0000a] in <11f101b564894ca7af6c482ddc51c698>:0

03-04 11:58:46.760 I/MonoDroid(14200): at Com.Syncfusion.Calendar.SwipePanel.ExecuteOnActionUp (System.Single position, System.Single calendarValue, Android.Views.MotionEvent ev) [0x00022] in <52246280cd05448b886c596887fa40a6>:0

03-04 11:58:46.760 I/MonoDroid(14200): at Com.Syncfusion.Calendar.SwipePanel.Handle_Touch (System.Object sender, Android.Views.View+TouchEventArgs ev) [0x00385] in <52246280cd05448b886c596887fa40a6>:0

03-04 11:58:46.760 I/MonoDroid(14200): at Android.Views.View+IOnTouchListenerImplementor.OnTouch (Android.Views.View v, Android.Views.MotionEvent e) [0x00014] in <11f101b564894ca7af6c482ddc51c698>:0

03-04 11:58:46.760 I/MonoDroid(14200): at Android.Views.View+IOnTouchListenerInvoker.n_OnTouch_Landroid_view_View_Landroid_view_MotionEvent_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_v, System.IntPtr native_e) [0x00019] in <11f101b564894ca7af6c482ddc51c698>:0

03-04 11:58:46.760 I/MonoDroid(14200): at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.95(intptr,intptr,intptr,intptr)

03-04 11:58:46.769 W/zygote (14200): JNI RegisterNativeMethods: attempt to register 0 native methods for android.runtime.JavaProxyThrowable

03-04 11:58:46.773 D/Mono (14200): DllImport searching in: '__Internal' ('(null)').

03-04 11:58:46.773 D/Mono (14200): Searching for 'java_interop_jnienv_throw'.

03-04 11:58:46.773 D/Mono (14200): Probing 'java_interop_jnienv_throw'.

03-04 11:58:46.773 D/Mono (14200): Found as 'java_interop_jnienv_throw'.

**System.ObjectDisposedException:** 'Cannot access a disposed object.

Object name: 'Java.Util.GregorianCalendar'.'


03-04 11:59:00.248 E/mono (14200):

03-04 11:59:00.248 E/mono (14200): Unhandled Exception:

03-04 11:59:00.248 E/mono (14200): System.ObjectDisposedException: Cannot access a disposed object.

03-04 11:59:00.248 E/mono (14200): Object name: 'Java.Util.GregorianCalendar'.

03-04 11:59:00.248 E/mono (14200): at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.95(intptr,intptr,intptr,intptr)

03-04 11:59:00.248 E/mono (14200): at (wrapper native-to-managed) Android.Runtime.DynamicMethodNameCounter.95(intptr,intptr,intptr,intptr)

03-04 11:59:00.248 E/mono-rt (14200): [ERROR] FATAL UNHANDLED EXCEPTION: System.ObjectDisposedException: Cannot access a disposed object.

03-04 11:59:00.248 E/mono-rt (14200): Object name: 'Java.Util.GregorianCalendar'.

03-04 11:59:00.248 E/mono-rt (14200): at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.95(intptr,intptr,intptr,intptr)

03-04 11:59:00.248 E/mono-rt (14200): at (wrapper native-to-managed) Android.Runtime.DynamicMethodNameCounter.95(intptr,intptr,intptr,intptr)

03-04 11:59:00.249 D/ (14200): HostConnection::get() New Host Connection established 0x8f2e2980, tid 14200

Debugger Connection Lost: Debugger lost connection to the running application. Likely this means the application terminated unexpectedly.


-------------------------------------------------------------------------------------------------------------------------------------------------------------

So I tried to narrow the problem down by setting up a Test Project(see attached Project).

From this I get the following exception:

The thread 0x8 has exited with code 0 (0x0).

03-04 11:10:56.244 I/zygote ( 8134): Explicit concurrent copying GC freed 58115(4MB) AllocSpace objects, 0(0B) LOS objects, 36% free, 10MB/16MB, paused 249us total 46.993ms

03-04 11:10:56.264 D/Mono ( 8134): GC_TAR_BRIDGE bridges 10355 objects 12024 opaque 1379 colors 9318 colors-bridged 9223 colors-visible 9223 xref 3288 cache-hit 0 cache-semihit 0 cache-miss 95 setup 0.50ms tarjan 2.59ms scc-setup 0.59ms gather-xref 0.12ms xref-setup 0.05ms cleanup 0.41ms

03-04 11:10:56.264 D/Mono ( 8134): GC_BRIDGE: Complete, was running for 208.68ms

03-04 11:10:56.264 D/Mono ( 8134): GC_MINOR: (Nursery full) time 32.73ms, stw 33.36ms promoted 1371K major size: 10256K in use: 9467K los size: 6700K in use: 5869K

03-04 11:10:56.374 D/EGL_emulation( 8134): eglMakeCurrent: 0xa750a580: ver 2 0 (tinfo 0x90a376d0)

**System.ObjectDisposedException:** 'Cannot access a disposed object.

Object name: 'Com.Syncfusion.Calendar.InlineLayout'.'


03-04 11:11:12.419 D/Mono ( 8134): DllImport attempting to load: '/system/lib/liblog.so'.

03-04 11:11:12.420 D/Mono ( 8134): DllImport loaded library '/system/lib/liblog.so'.

03-04 11:11:12.420 D/Mono ( 8134): DllImport searching in: '/system/lib/liblog.so' ('/system/lib/liblog.so').

03-04 11:11:12.420 D/Mono ( 8134): Searching for '__android_log_print'.

03-04 11:11:12.420 D/Mono ( 8134): Probing '__android_log_print'.

03-04 11:11:12.420 D/Mono ( 8134): Found as '__android_log_print'.

03-04 11:11:12.423 I/MonoDroid( 8134): UNHANDLED EXCEPTION:

03-04 11:11:12.426 I/MonoDroid( 8134): System.ObjectDisposedException: Cannot access a disposed object.

03-04 11:11:12.426 I/MonoDroid( 8134): Object name: 'Com.Syncfusion.Calendar.InlineLayout'.

03-04 11:11:12.426 I/MonoDroid( 8134): at Java.Interop.JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) [0x00029] in :0

03-04 11:11:12.426 I/MonoDroid( 8134): at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeNonvirtualObjectMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00000] in :0

03-04 11:11:12.426 I/MonoDroid( 8134): at Android.Views.View.get_Parent () [0x0000a] in <11f101b564894ca7af6c482ddc51c698>:0

03-04 11:11:12.426 I/MonoDroid( 8134): at Com.Syncfusion.Calendar.SelectionLayout.HandleSelection (Android.Views.MotionEvent motionEvent, System.Int32 index, System.Single startXPosition, System.Single startYPosition) [0x00082] in <8a4f2ffe917b47b087e9e0808d84ee8e>:0

03-04 11:11:12.426 I/MonoDroid( 8134): at Com.Syncfusion.Calendar.SwipePanel.ExecuteOnActionUp (System.Single position, System.Single calendarValue, Android.Views.MotionEvent ev) [0x00270] in <8a4f2ffe917b47b087e9e0808d84ee8e>:0

03-04 11:11:12.426 I/MonoDroid( 8134): at Com.Syncfusion.Calendar.SwipePanel.Handle_Touch (System.Object sender, Android.Views.View+TouchEventArgs ev) [0x00385] in <8a4f2ffe917b47b087e9e0808d84ee8e>:0

03-04 11:11:12.426 I/MonoDroid( 8134): at Android.Views.View+IOnTouchListenerImplementor.OnTouch (Android.Views.View v, Android.Views.MotionEvent e) [0x00014] in <11f101b564894ca7af6c482ddc51c698>:0

03-04 11:11:12.426 I/MonoDroid( 8134): at Android.Views.View+IOnTouchListenerInvoker.n_OnTouch_Landroid_view_View_Landroid_view_MotionEvent_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_v, System.IntPtr native_e) [0x00019] in <11f101b564894ca7af6c482ddc51c698>:0

03-04 11:11:12.426 I/MonoDroid( 8134): at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.37(intptr,intptr,intptr,intptr)

03-04 11:11:12.436 W/zygote ( 8134): JNI RegisterNativeMethods: attempt to register 0 native methods for android.runtime.JavaProxyThrowable

03-04 11:11:12.439 D/Mono ( 8134): DllImport searching in: '__Internal' ('(null)').

03-04 11:11:12.439 D/Mono ( 8134): Searching for 'java_interop_jnienv_throw'.

03-04 11:11:12.439 D/Mono ( 8134): Probing 'java_interop_jnienv_throw'.

03-04 11:11:12.439 D/Mono ( 8134): Found as 'java_interop_jnienv_throw'.

**System.ObjectDisposedException:** 'Cannot access a disposed object.

Object name: 'Com.Syncfusion.Calendar.InlineLayout'.'


03-04 11:11:17.919 E/mono ( 8134):

03-04 11:11:17.919 E/mono ( 8134): Unhandled Exception:

03-04 11:11:17.919 E/mono ( 8134): System.ObjectDisposedException: Cannot access a disposed object.

03-04 11:11:17.919 E/mono ( 8134): Object name: 'Com.Syncfusion.Calendar.InlineLayout'.

03-04 11:11:17.919 E/mono ( 8134): at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.37(intptr,intptr,intptr,intptr)

03-04 11:11:17.919 E/mono ( 8134): at (wrapper native-to-managed) Android.Runtime.DynamicMethodNameCounter.37(intptr,intptr,intptr,intptr)

03-04 11:11:17.919 E/mono-rt ( 8134): [ERROR] FATAL UNHANDLED EXCEPTION: System.ObjectDisposedException: Cannot access a disposed object.

03-04 11:11:17.919 E/mono-rt ( 8134): Object name: 'Com.Syncfusion.Calendar.InlineLayout'.

03-04 11:11:17.919 E/mono-rt ( 8134): at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.37(intptr,intptr,intptr,intptr)

03-04 11:11:17.919 E/mono-rt ( 8134): at (wrapper native-to-managed) Android.Runtime.DynamicMethodNameCounter.37(intptr,intptr,intptr,intptr)

03-04 11:11:17.919 D/ ( 8134): HostConnection::get() New Host Connection established 0x90a0c900, tid 8134


To reproduce this exception do the following.

  1.  Run the app in a Simulator with Developer mode enabled and "Don´t keep activities" enabled(API 27 + Google Play)
  2.  Select a Day(for me it was 30.3.2020) on the bottom of the Screen of the current month to show the inlines
  3. Navigate Two month in the future
  4. Navigate Two
    month
    back
  5. Select the current Date

In my more real app I can not reproduce the exception not so easy. I have to press the Overview-Button multiple navigate and select different things more often… But all kinds of  
System.ObjectDisposedException are happening. A fix for this would be nice. If you need more Information I´m willing to help.