System.ObjectDisposedException: Cannot access a disposed object. Object name: 'Com.Syncfusion.Autocomplete.SfAutoComplete'.

Mobile application has hit a runtime error as below.

Unhandled Exception:
System.ObjectDisposedException: Cannot access a disposed object. 
Object name: 'Com.Syncfusion.Autocomplete.SfAutoComplete'.

May I know how to solve this error? Please let me know if you need more information from me. Thanks!

Here is detailed error below 

Resolved pending breakpoint at 'Test.cs:549,1' to void Bombayhc.Ivy.Test.<get_name>d__46.MoveNext () [0x000e4].
01-05 11:10:54.637 D/Mono    ( 4899): Image addref System.Diagnostics.Debug[0xa7fdbca0] -> System.Diagnostics.Debug.dll[0xa7fb0d00]: 2
01-05 11:10:54.637 D/Mono    ( 4899): Prepared to set up assembly 'System.Diagnostics.Debug' (System.Diagnostics.Debug.dll)
01-05 11:10:54.637 D/Mono    ( 4899): Assembly System.Diagnostics.Debug[0xa7fdbca0] added to domain RootDomain, ref_count=1
01-05 11:10:54.637 D/Mono    ( 4899): AOT: image 'System.Diagnostics.Debug.dll.so' not found: dlopen failed: library "/data/app/com.innovantesitsolutions.emediNews-1/lib/x86/libaot-System.Diagnostics.Debug.dll.so" not found
01-05 11:10:54.638 D/Mono    ( 4899): AOT: image '/usr/local/lib/mono/aot-cache/x86/System.Diagnostics.Debug.dll.so' not found: dlopen failed: library "/data/app/com.innovantesitsolutions.emediNews-1/lib/x86/libaot-System.Diagnostics.Debug.dll.so" not found
01-05 11:10:54.638 D/Mono    ( 4899): Config attempting to parse: 'System.Diagnostics.Debug.dll.config'.
01-05 11:10:54.638 D/Mono    ( 4899): Config attempting to parse: '/usr/local/etc/mono/assemblies/System.Diagnostics.Debug/System.Diagnostics.Debug.config'.
01-05 11:10:54.638 D/Mono    ( 4899): Assembly Ref addref Bombayhc[0xa7fdb100] -> System.Diagnostics.Debug[0xa7fdbca0]: 2
01-05 11:10:54.638 D/Mono    ( 4899): Assembly Ref addref System.Diagnostics.Debug[0xa7fdbca0] -> mscorlib[0xa7fdb0a0]: 73
Thread finished: <Thread Pool> #2
The thread 0x2 has exited with code 0 (0x0).
Loaded assembly: System.Diagnostics.Debug.dll [External]
Thread started: <Thread Pool> #13
Unhandled Exception:

System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'Com.Syncfusion.Autocomplete.SfAutoComplete'.

01-05 11:11:06.413 D/Mono    ( 4899): DllImport attempting to load: '/system/lib/liblog.so'.
01-05 11:11:06.413 D/Mono    ( 4899): DllImport loaded library '/system/lib/liblog.so'.
01-05 11:11:06.413 D/Mono    ( 4899): DllImport searching in: '/system/lib/liblog.so' ('/system/lib/liblog.so').
01-05 11:11:06.413 D/Mono    ( 4899): Searching for '__android_log_print'.
01-05 11:11:06.413 D/Mono    ( 4899): Probing '__android_log_print'.
01-05 11:11:06.413 D/Mono    ( 4899): Found as '__android_log_print'.
01-05 11:11:06.416 I/MonoDroid( 4899): UNHANDLED EXCEPTION:
01-05 11:11:06.488 I/MonoDroid( 4899): System.ObjectDisposedException: Cannot access a disposed object.
01-05 11:11:06.488 I/MonoDroid( 4899): Object name: 'Com.Syncfusion.Autocomplete.SfAutoComplete'.
01-05 11:11:06.488 I/MonoDroid( 4899):   at Java.Interop.JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) [0x00029] in <54816278eed9488eb28d3597fecd78f8>:0 
01-05 11:11:06.488 I/MonoDroid( 4899):   at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeNonvirtualObjectMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00000] in <54816278eed9488eb28d3597fecd78f8>:0 
01-05 11:11:06.488 I/MonoDroid( 4899):   at Android.Views.View.get_Context () [0x0000a] in <28e323a707a2414f8b493f6d4bb27c8d>:0 
01-05 11:11:06.488 I/MonoDroid( 4899):   at Com.Syncfusion.Autocomplete.SfAutoComplete.PerformCompletion (System.Int32 position, System.Int64 id) [0x000f7] in <cff2ee25a4b54c93a4d015eeb34bb7aa>:0 
01-05 11:11:06.488 I/MonoDroid( 4899):   at Com.Syncfusion.Autocomplete.SfAutoComplete.OnTouch (Android.Views.View v, Android.Views.MotionEvent e) [0x001c3] in <cff2ee25a4b54c93a4d015eeb34bb7aa>:0 
01-05 11:11:06.488 I/MonoDroid( 4899):   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) [0x00017] in <28e323a707a2414f8b493f6d4bb27c8d>:0 
01-05 11:11:06.488 I/MonoDroid( 4899):   at (wrapper dynamic-method) System.Object:d83764e0-3115-476e-8ca7-ede1b1f8e327 (intptr,intptr,intptr,intptr)
01-05 11:11:06.524 W/art     ( 4899): JNI RegisterNativeMethods: attempt to register 0 native methods for android.runtime.JavaProxyThrowable
01-05 11:11:06.532 D/Mono    ( 4899): DllImport searching in: '__Internal' ('(null)').
01-05 11:11:06.532 D/Mono    ( 4899): Searching for 'java_interop_jnienv_throw'.
01-05 11:11:06.532 D/Mono    ( 4899): Probing 'java_interop_jnienv_throw'.
01-05 11:11:06.532 D/Mono    ( 4899): Found as 'java_interop_jnienv_throw'.
An unhandled exception occured.

01-05 11:11:08.709 E/mono    ( 4899): 
01-05 11:11:08.709 E/mono    ( 4899): Unhandled Exception:
01-05 11:11:08.709 E/mono    ( 4899): System.ObjectDisposedException: Cannot access a disposed object.
01-05 11:11:08.709 E/mono    ( 4899): Object name: 'Com.Syncfusion.Autocomplete.SfAutoComplete'.
01-05 11:11:08.709 E/mono    ( 4899):   at (wrapper dynamic-method) System.Object:d83764e0-3115-476e-8ca7-ede1b1f8e327 (intptr,intptr,intptr,intptr)
01-05 11:11:08.709 E/mono-rt ( 4899): [ERROR] FATAL UNHANDLED EXCEPTION: System.ObjectDisposedException: Cannot access a disposed object.
01-05 11:11:08.709 E/mono-rt ( 4899): Object name: 'Com.Syncfusion.Autocomplete.SfAutoComplete'.
01-05 11:11:08.709 E/mono-rt ( 4899):   at (wrapper dynamic-method) System.Object:d83764e0-3115-476e-8ca7-ede1b1f8e327 (intptr,intptr,intptr,intptr)


3 Replies

SK Selva Kumar  Veerakrishnan Syncfusion Team January 8, 2018 12:51 PM UTC

Hi ASHISH,

Thank you for contacting Syncfusion Support.

We could not reproduce the issue “Object Disposed Exception in SfAutoComplete” in Xamarin.Forms.Android platform. We have prepared a sample for your reference to check this issue, please find the sample from the link given below.

Sample link: http://www.syncfusion.com/downloads/support/directtrac/general/ze/SFAutoComplete_5-1800883168.zip

If the issue still reproduced at your end, please update us with modified sample in which the issue occurs with the replication procedure.

This could help us to provide better solution on this.

Regards,

Selva Kumar V.


TS Tommaso Scalici August 10, 2018 11:03 AM UTC

This issue happens to me, too, sometimes. So it exists without doubt (SfAutoComplete)
Unfortunately I can't provide a repro project, because the exception seems to be thrown randomly, while typing in the control and the dropdown suggestion list appears / updates.
I will update the thread if I manage to find a way to reproduce the issue exactly.


PA Paul Anderson S Syncfusion Team August 10, 2018 11:08 AM UTC

Hi Tommaso, 
  
Greetings from Syncfusion. 
  
Please take your time and we will wait for your update so that we can eliminate the issue with AutoComplete control as we are not able to reproduce. 
  
Regards, 
Paul Anderson 


Loader.
Up arrow icon