This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.
Bug 45330 - System.ObjectDisposedException: Cannot access a disposed object. Object name: 'Android.Views.GestureDetector'.
Summary: System.ObjectDisposedException: Cannot access a disposed object. Object name:...
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms (show other bugs)
Version: 2.3.2
Hardware: PC Windows
: --- blocker
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-10-12 16:58 UTC by bblonchek
Modified: 2017-06-11 09:27 UTC (History)
33 users (show)

See Also:
Tags: Android ac
Is this bug a regression?: ---
Last known good build:


Attachments
sample solution (196.51 KB, application/x-zip-compressed)
2016-10-12 17:05 UTC, bblonchek
Details

Description bblonchek 2016-10-12 16:58:50 UTC
# Steps to reproduce
See the attached sample solution.
Run the app.
Scroll back and forth in the list rapidly.
Tap on an item to go to a detail page
Navigate back to the list page.
Scroll back and forth in the list.

Eventually the app will crash with the following exception:

System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'Android.Views.GestureDetector'.

10-12 12:48:04.970 I/MonoDroid(31095): UNHANDLED EXCEPTION:
10-12 12:48:04.986 I/MonoDroid(31095): System.ObjectDisposedException: Cannot access a disposed object.
10-12 12:48:04.986 I/MonoDroid(31095): Object name: 'Android.Views.GestureDetector'.
10-12 12:48:04.986 I/MonoDroid(31095):   at (wrapper managed-to-native) Java.Interop.NativeMethods:java_interop_jnienv_call_nonvirtual_boolean_method_a (intptr,intptr&,intptr,intptr,intptr,Java.Interop.JniArgumentValue*)
10-12 12:48:04.986 I/MonoDroid(31095):   at Java.Interop.JniEnvironment+InstanceMethods.CallNonvirtualBooleanMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniObjectReference type, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x0008f] in /Users/builder/data/lanes/3819/c1d1c79c/source/Java.Interop/src/Java.Interop/Java.Interop/JniEnvironment.g.cs:11728 
10-12 12:48:04.986 I/MonoDroid(31095):   at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualBooleanMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x0006b] in /Users/builder/data/lanes/3819/c1d1c79c/source/Java.Interop/src/Java.Interop/Java.Interop/JniPeerMembers.JniInstanceMethods_Invoke.cs:67 
10-12 12:48:04.986 I/MonoDroid(31095):   at Android.Views.View.DispatchTouchEvent (Android.Views.MotionEvent e) [0x0002c] in /Users/builder/data/lanes/3819/c1d1c79c/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.Views.View.cs:12433 
10-12 12:48:04.986 I/MonoDroid(31095):   at Xamarin.Forms.Platform.Android.PlatformRenderer.DispatchTouchEvent (Android.Views.MotionEvent e) [0x00035] in C:\BuildAgent2\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\PlatformRenderer.cs:32 
10-12 12:48:04.987 I/MonoDroid(31095):   at Android.Views.View.n_DispatchTouchEvent_Landroid_view_MotionEvent_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_e) [0x00011] in /Users/builder/data/lanes/3819/c1d1c79c/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.Views.View.cs:12420 
10-12 12:48:04.987 I/MonoDroid(31095):   at (wrapper dynamic-method) System.Object:97380020-8a25-41e1-9c74-c813eb723b61 (intptr,intptr,intptr)
10-12 12:48:05.028 E/mono-rt (31095): Stacktrace:
10-12 12:48:05.028 E/mono-rt (31095): 
10-12 12:48:05.028 E/mono-rt (31095):   at <unknown> <0xffffffff>
10-12 12:48:05.028 E/mono-rt (31095):   at (wrapper managed-to-native) Java.Interop.NativeMethods.java_interop_jnienv_new_string (intptr,intptr&,char*,int) <0x00047>
10-12 12:48:05.028 E/mono-rt (31095):   at Java.Interop.JniEnvironment/Strings.NewString (char*,int) [0x0000a] in /Users/builder/data/lanes/3819/c1d1c79c/source/Java.Interop/src/Java.Interop/Java.Interop/JniEnvironment.g.cs:13019
10-12 12:48:05.028 E/mono-rt (31095):   at Java.Interop.JniEnvironment/Strings.NewString (string) [0x00028] in /Users/builder/data/lanes/3819/c1d1c79c/source/Java.Interop/src/Java.Interop/Java.Interop/JniEnvironment.Strings.cs:15
10-12 12:48:05.028 E/mono-rt (31095):   at Android.Runtime.JNIEnv.NewString (string) [0x0000c] in /Users/builder/data/lanes/3819/c1d1c79c/source/xamarin-android/src/Mono.Android/Android.Runtime/JNIEnv.cs:937
10-12 12:48:05.028 E/mono-rt (31095):   at Java.Lang.Throwable..ctor (string) [0x00022] in /Users/builder/data/lanes/3819/c1d1c79c/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Java.Lang.Throwable.cs:47
10-12 12:48:05.028 E/mono-rt (31095):   at Android.Runtime.JavaProxyThrowable..ctor (System.Exception) [0x00000] in /Users/builder/data/lanes/3819/c1d1c79c/source/xamarin-android/src/Mono.Android/Android.Runtime/JavaProxyThrowable.cs:10
10-12 12:48:05.028 E/mono-rt (31095):   at Java.Lang.Throwable.FromException (System.Exception) [0x00023] in /Users/builder/data/lanes/3819/c1d1c79c/source/xamarin-android/src/Mono.Android/Java.Lang/Throwable.cs:241
10-12 12:48:05.028 E/mono-rt (31095):   at Android.Runtime.AndroidEnvironment.UnhandledException (System.Exception) [0x0007e] in /Users/builder/data/lanes/3819/c1d1c79c/source/xamarin-android/src/Mono.Android/Android.Runtime/AndroidEnvironment.cs:116
10-12 12:48:05.028 E/mono-rt (31095):   at (wrapper dynamic-method) object.97380020-8a25-41e1-9c74-c813eb723b61 (intptr,intptr,intptr) <IL 0x00030, 0x0009f>
10-12 12:48:05.028 E/mono-rt (31095):   at (wrapper native-to-managed) object.97380020-8a25-41e1-9c74-c813eb723b61 (intptr,intptr,intptr) <IL 0x00023, 0x000ff>


# Expected behavior


# Actual behavior


# Supplemental info (logs, images, videos)
Have to continue to scroll in list, tap on items, repeat to get the crash as this is an intermittent issue.
The sample is using a third-party syncfusion chart control to put the image in the list cell as this seems to be related to having images in listview items and that is what is causing the problem in our solution.

# Test environment (full version information)





Microsoft Visual Studio Professional 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.6.01038

Installed Version: Professional

LightSwitch for Visual Studio 2015   00322-40000-00000-AA974
Microsoft LightSwitch for Visual Studio 2015

Visual Basic 2015   00322-40000-00000-AA974
Microsoft Visual Basic 2015

Visual C# 2015   00322-40000-00000-AA974
Microsoft Visual C# 2015

Visual C++ 2015   00322-40000-00000-AA974
Microsoft Visual C++ 2015

Windows Phone SDK 8.0 - ENU   00322-40000-00000-AA974
Windows Phone SDK 8.0 - ENU

Application Insights Tools for Visual Studio Package   7.8.00927.1
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2015 (RC1 Update 1)   14.1.20203.0
ASP.NET and Web Tools 2015 (RC1 Update 1)

ASP.NET Web Frameworks and Tools 2012.2   4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.40314.0
For additional information, visit http://www.asp.net/

Azure App Service Tools v2.9.1   14.0.20519.0
Azure App Service Tools v2.9.1

Azure Data Lake Node   1.0
This package contains the Data Lake integration nodes for Server Explorer.

Azure Data Lake Tools for Visual Studio   2.0.6000.0
Microsoft Azure Data Lake Tools for Visual Studio

Command Bus, Event Stream and Async Manager   Merq
Provides ICommandBus, IEventStream and IAsyncManager MEF services for loosely coupled Visual Studio extension components communication and integration.

Common Azure Tools   1.8
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

GitHub.VisualStudio   1.0
A Visual Studio Extension that brings the GitHub Flow into Visual Studio.

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

Microsoft Azure HDInsight HQL Service   2.0.6000.0
Language service for Hive query

Microsoft Azure HDInsight Tools for Visual Studio   2.0.6000.0
An integrated development environment for HDInsight application development.

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

Microsoft Azure Tools   2.9
Microsoft Azure Tools for Microsoft Visual Studio 2015 - v2.9.40518.2

NuGet Package Manager   3.4.4
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools   14.0.60519.0
Microsoft SQL Server Data Tools

ToolWindowHostedEditor   1.0
Hosting json editor into a tool window

TypeScript   1.8.36.0
TypeScript tools for Visual Studio

Visual Studio Tools for Universal Windows Apps   14.0.25527.01
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

Xamarin   4.2.0.695 (7603786)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   7.0.1.2 (c1d1c79)
Visual Studio extension to enable development for Xamarin.Android.

Xamarin.iOS   10.0.0.1 (29910bb)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 1 bblonchek 2016-10-12 17:05:29 UTC
Created attachment 18003 [details]
sample solution
Comment 2 Rob Wilson 2016-10-13 12:57:45 UTC
Thank you for raising this ticket! 

I can confirm that I have the exact same issue, re-created in exactly the same way, however I use FFImageLoading to render my images.  The current commonality is that images are involved within the list.

I have no caching strategy set in my XAML.

Some history behind my issue is on the Xamarin Forums http://forums.xamarin.com/discussion/comment/226024/#Comment_226024
Comment 3 Attila Fodor 2016-10-19 06:45:18 UTC
I have the same problem.

I/MonoDroid( 7548): UNHANDLED EXCEPTION:

I/MonoDroid( 7548): System.ObjectDisposedException: Cannot access a disposed object.

I/MonoDroid( 7548): Object name: 'Android.Views.GestureDetector'.

I/MonoDroid( 7548):   at Java.Interop.JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) [0x00030] in <a8bda6a3637a4dffb7ce4066ce3b1247>:0 

I/MonoDroid( 7548):   at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualBooleanMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00001] in <a8bda6a3637a4dffb7ce4066ce3b1247>:0 

I/MonoDroid( 7548):   at Android.Views.GestureDetector.OnTouchEvent (Android.Views.MotionEvent ev) [0x00036] in <d2860ab0a43a41a5a70ae07f69495af1>:0 

I/MonoDroid( 7548):   at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Android.Views.View.IOnTouchListener.OnTouch (Android.Views.View v, Android.Views.MotionEvent e) [0x0004a] in <d572ae0ccf89437fad1de1370c623a06>:0 

I/MonoDroid( 7548):   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 <d2860ab0a43a41a5a70ae07f69495af1>:0 

I/MonoDroid( 7548):   at (wrapper dynamic-method) System.Object:5da60e97-7d76-4239-a0be-a819cd94b0a1 (intptr,intptr,intptr,intptr)

I/MonoDroid( 7548): UNHANDLED EXCEPTION:

I/MonoDroid( 7548): System.ObjectDisposedException: Cannot access a disposed object.

I/MonoDroid( 7548): Object name: 'Android.Views.GestureDetector'.

I/MonoDroid( 7548):   at Java.Interop.JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) [0x00030] in <a8bda6a3637a4dffb7ce4066ce3b1247>:0 

I/MonoDroid( 7548):   at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualBooleanMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00001] in <a8bda6a3637a4dffb7ce4066ce3b1247>:0 

I/MonoDroid( 7548):   at Android.Views.GestureDetector.OnTouchEvent (Android.Views.MotionEvent ev) [0x00036] in <d2860ab0a43a41a5a70ae07f69495af1>:0 

I/MonoDroid( 7548):   at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Android.Views.View.IOnTouchListener.OnTouch (Android.Views.View v, Android.Views.MotionEvent e) [0x0004a] in <d572ae0ccf89437fad1de1370c623a06>:0 

I/MonoDroid( 7548):   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 <d2860ab0a43a41a5a70ae07f69495af1>:0 

I/MonoDroid( 7548):   at (wrapper dynamic-method) System.Object:5da60e97-7d76-4239-a0be-a819cd94b0a1 (intptr,intptr,intptr,intptr)

I/MonoDroid( 7548): --- End of stack trace from previous location where exception was thrown ---

I/MonoDroid( 7548):   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <98ccc6281ed94c8ba27ba961e361bf36>:0 

I/MonoDroid( 7548):   at Java.Interop.JniEnvironment+InstanceMethods.CallNonvirtualBooleanMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniObjectReference type, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x000a8] in <a8bda6a3637a4dffb7ce4066ce3b1247>:0 

I/MonoDroid( 7548):   at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualBooleanMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00068] in <a8bda6a3637a4dffb7ce4066ce3b1247>:0 

I/MonoDroid( 7548):   at Android.Views.View.DispatchTouchEvent (Android.Views.MotionEvent e) [0x00036] in <d2860ab0a43a41a5a70ae07f69495af1>:0 

I/MonoDroid( 7548):   at Xamarin.Forms.Platform.Android.PlatformRenderer.DispatchTouchEvent (Android.Views.MotionEvent e) [0x00035] in <d572ae0ccf89437fad1de1370c623a06>:0 

I/MonoDroid( 7548):   at Android.Views.View.n_DispatchTouchEvent_Landroid_view_MotionEvent_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_e) [0x00011] in <d2860ab0a43a41a5a70ae07f69495af1>:0 

I/MonoDroid( 7548):   at (wrapper dynamic-method) System.Object:54198da8-b646-4e28-936a-2427337aa68f (intptr,intptr,intptr)

E/InputEventReceiver( 7548): Exception dispatching input event.

E/MessageQueue-JNI( 7548): Exception in MessageQueue callback: handleReceiveCallback

E/MessageQueue-JNI( 7548): android.runtime.JavaProxyThrowable: System.ObjectDisposedException: Cannot access a disposed object.

E/MessageQueue-JNI( 7548): Object name: 'Android.Views.GestureDetector'.

E/MessageQueue-JNI( 7548):   at Java.Interop.JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) [0x00030] in <a8bda6a3637a4dffb7ce4066ce3b1247>:0 

E/MessageQueue-JNI( 7548):   at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualBooleanMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00001] in <a8bda6a3637a4dffb7ce4066ce3b1247>:0 

E/MessageQueue-JNI( 7548):   at Android.Views.GestureDetector.OnTouchEvent (Android.Views.MotionEvent ev) [0x00036] in <d2860ab0a43a41a5a70ae07f69495af1>:0 

E/MessageQueue-JNI( 7548):   at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Android.Views.View.IOnTouchListener.OnTouch (Android.Views.View v, Android.Views.MotionEvent e) [0x0004a] in <d572ae0ccf89437fad1de1370c623a06>:0 

E/MessageQueue-JNI( 7548):   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 <d2860ab0a43a41a5a70ae07f69495af1>:0 

E/MessageQueue-JNI( 7548):   at (wrapper dynamic-method) System.Object:5da60e97-7d76-4239-a0be-a819cd94b0a1 (intptr,intptr,intptr,intptr)

E/MessageQueue-JNI( 7548): --- End of stack trace from previous location where exception was thrown ---

E/MessageQueue-JNI( 7548):   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <98ccc6281ed94c8ba27ba961e361bf36>:0 

E/MessageQueue-JNI( 7548):   at Java.Interop.JniEnvironment+InstanceMethods.CallNonvirtualBooleanMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniObjectReference type, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x000a8] in <a8bda6a3637a4dffb7ce4066ce3b1247>:0 

E/MessageQueue-JNI( 7548):   at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualBooleanMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00068] in <a8bda6a3637a4dffb7ce4066ce3b1247>:0 

E/MessageQueue-JNI( 7548):   at Android.Views.View.DispatchTouchEvent (Android.Views.MotionEvent e) [0x00036] in <d2860ab0a43a41a5a70ae07f69495af1>:0 

E/MessageQueue-JNI( 7548):   at Xamarin.Forms.Platform.Android.PlatformRenderer.DispatchTouchEvent (Android.Views.MotionEvent e) [0x00035] in <d572ae0ccf89437fad1de1370c623a06>:0 

E/MessageQueue-JNI( 7548):   at Android.Views.View.n_DispatchTouchEvent_Landroid_view_MotionEvent_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_e) [0x00011] in <d2860ab0a43a41a5a70ae07f69495af1>:0 

E/MessageQueue-JNI( 7548):   at (wrapper dynamic-method) System.Object:54198da8-b646-4e28-936a-2427337aa68f (intptr,intptr,intptr)

E/MessageQueue-JNI( 7548): 	at md5b60ffeb829f638581ab2bb9b1a7f4f3f.PlatformRenderer.n_dispatchTouchEvent(Native Method)

E/MessageQueue-JNI( 7548): 	at md5b60ffeb829f638581ab2bb9b1a7f4f3f.PlatformRenderer.dispatchTouchEvent(PlatformRenderer.java:47)

E/MessageQueue-JNI( 7548): 	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)

E/MessageQueue-JNI( 7548): 	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1917)

E/MessageQueue-JNI( 7548): 	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)

E/MessageQueue-JNI( 7548): 	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1917)

E/MessageQueue-JNI( 7548): 	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)

E/MessageQueue-JNI( 7548): 	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1917)

E/MessageQueue-JNI( 7548): 	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)

E/MessageQueue-JNI( 7548): 	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1917)

E/MessageQueue-JNI( 7548): 	at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2068)

E/MessageQueue-JNI( 7548): 	at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1515)

E/MessageQueue-JNI( 7548): 	at android.app.Activity.dispatchTouchEvent(Activity.java:2464)

E/MessageQueue-JNI( 7548): 	at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2016)

E/MessageQueue-JNI( 7548): 	at android.view.View.dispatchPointerEvent(View.java:7886)

E/MessageQueue-JNI( 7548): 	at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:3947)

E/MessageQueue-JNI( 7548): 	at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:3826)

E/MessageQueue-JNI( 7548): 	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3392)

E/MessageQueue-JNI( 7548): 	at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3442)

E/MessageQueue-JNI( 7548): 	at

D/AndroidRuntime( 7548): Shutting down VM

Here is my environment

Microsoft Visual Studio Professional 2015
Version 14.0.25421.03 Update 3
Microsoft .NET Framework
Version 4.6.01038

Installed Version: Professional

LightSwitch for Visual Studio 2015   00322-40000-00000-AA083
Microsoft LightSwitch for Visual Studio 2015

Visual Basic 2015   00322-40000-00000-AA083
Microsoft Visual Basic 2015

Visual C# 2015   00322-40000-00000-AA083
Microsoft Visual C# 2015

Visual C++ 2015   00322-40000-00000-AA083
Microsoft Visual C++ 2015

Windows Phone SDK 8.0 - ENU   00322-40000-00000-AA083
Windows Phone SDK 8.0 - ENU

Application Insights Tools for Visual Studio Package   7.9.01018.2
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2015.1 (Beta8)   14.1.11107.0
ASP.NET and Web Tools 2015.1 (Beta8)

ASP.NET Web Frameworks and Tools 2012.2   4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.40314.0
For additional information, visit http://www.asp.net/

Clang with Microsoft CodeGen   14.0.25317
Clang with Microsoft CodeGen

Command Bus, Event Stream and Async Manager   Merq
Provides ICommandBus, IEventStream and IAsyncManager MEF services for loosely coupled Visual Studio extension components communication and integration.

Common Azure Tools   1.8
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Devart Code Compare   4.1.78
Devart Code Compare
Copyright (c) 2012-2015 Devart. All rights reserved.
http://www.devart.com/codecompare/

Devart dotConnect for Oracle   8.5.521.0
Devart dotConnect for Oracle
Copyright 2002 - 2015 Devart. All rights reserved.
Web: www.devart.com/dotconnect/oracle
Support: support@devart.com

Devart Entity Developer   5.8.720.0
Devart Entity Developer
Copyright © 2008-2015 Devart. All rights reserved.
Web: www.devart.com/entitydeveloper 
Support: support@devart.com

EMDKProfileManagerWizardVS   1.0
EMDK for Xamarin

GitHub.VisualStudio   1.0
A Visual Studio Extension that brings the GitHub Flow into Visual Studio.

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

KofePackagePackage Extension   1.0
KofePackagePackage Visual Studio Extension Detailed Info

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

NuGet Package Manager   3.4.4
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools   14.0.60519.0
Microsoft SQL Server Data Tools

TypeScript   1.8.34.0
TypeScript tools for Visual Studio

Visual C++ for Cross Platform Mobile Development (Android)   14.0.25401.00
Visual C++ for Cross Platform Mobile Development (Android)

Visual C++ for Cross Platform Mobile Development (iOS)   14.0.25401.00
Visual C++ for Cross Platform Mobile Development (iOS)

Visual Studio Tools for Apache Cordova   Update 10
Visual Studio Tools for Apache Cordova

Visual Studio Tools for Universal Windows Apps   14.0.25420.01
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

Windows Installer XML Toolset   3.10.3.3007
Windows Installer XML Toolset version 3.10.3.3007
Copyright (c) .NET Foundation and contributors. All rights reserved.

Xamarin   4.2.0.695 (7603786)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   7.0.1.2 (c1d1c79)
Visual Studio extension to enable development for Xamarin.Android.

Xamarin.iOS   10.0.0.1 (29910bb)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 4 Perry Hickman 2016-10-19 12:34:03 UTC
I'm getting the same problem except the lists I use only has text.

In the view down the page I have several lines and each line a has a prompt and a entry.  If the user clicks in the entry I bring up a popup with an entry and a list of possible choices (as many as 100 item could be in the list). The user could either type or scroll through the list. The list is updated on every change to the entry.  Only four items in the list are seen at a time so the user needs to scroll the list.

If I go quickly from one line to the other clicking in the entry, (popup comes up) scrolling to the end of the list choose an item.  (popup goes down) Go to the next line and do the same thing. After going through a few lines of doing this the app will crash with the "Cannot access a disposed object. 'Android.Views.GestureDetector'" error.

Package Manager Console Host Version 3.4.0.798

Xamarin   4.2.0.680 (c4382f5)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   7.0.0.18 (0e59c36)
Visual Studio extension to enable development for Xamarin.Android.

Xamarin.iOS   10.0.0.6 (6c3fee4)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 5 xevilboss 2016-10-19 14:00:49 UTC
I have same problem. Android 6.0, Xamarin Forms 2.3.3.152
Comment 6 Pawel Kanarek 2016-10-24 08:58:01 UTC
The same problem. Xamarin.Android 7.0.1.3, Xamarin.Forms 2.3.1.114
Comment 7 h.van.triest 2016-11-03 11:21:36 UTC
The same problem. Xamarin.Android 7.0.1.6, Xamarin.Forms 2.3.2.127
Comment 8 adrianknight89 2016-11-20 20:59:36 UTC
I think one requires a license to use SfChart. Any way someone can attach another repro without this library?
Comment 9 Robert Ewen 2016-11-23 20:37:23 UTC
The same problem. Xamarin.Android 7.0.2.37, Xamarin.Forms 2.3.3.168
Comment 10 bizzare 2016-11-28 11:59:51 UTC
Similar problem. Android 6 , Xamarin.Forms 2.3.0.107

For the listview, I have a boxview, multiple labels and 2 buttons per viewcell.

11-28 19:40:53.311 I/MonoDroid(15284): UNHANDLED EXCEPTION:
11-28 19:40:53.311 I/MonoDroid(15284): System.ObjectDisposedException: Cannot access a disposed object.
11-28 19:40:53.311 I/MonoDroid(15284): Object name: 'Android.Views.GestureDetector'.
11-28 19:40:53.311 I/MonoDroid(15284):   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 
11-28 19:40:53.311 I/MonoDroid(15284):   at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualBooleanMethod (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:57 
11-28 19:40:53.311 I/MonoDroid(15284):   at Android.Views.GestureDetector.OnTouchEvent (Android.Views.MotionEvent ev) [0x0002c] in /Users/builder/data/lanes/3511/ce955cc0/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.Views.GestureDetector.cs:1546 
11-28 19:40:53.311 I/MonoDroid(15284):   at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Android.Views.View.IOnTouchListener.OnTouch (Android.Views.View v, Android.Views.MotionEvent e) [0x0003f] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:101 
11-28 19:40:53.311 I/MonoDroid(15284):   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 /Users/builder/data/lanes/3511/ce955cc0/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.Views.View.cs:3558 
11-28 19:40:53.311 I/MonoDroid(15284):   at (wrapper dynamic-method) System.Object:5a6afa60-859d-4d0a-995b-1031273ea7e2 (intptr,intptr,intptr,intptr)
11-28 19:40:53.341 W/art     (15284): JNI RegisterNativeMethods: attempt to register 0 native methods for android.runtime.JavaProxyThrowable
11-28 19:40:53.351 D/Mono    (15284): DllImport searching in: '__Internal' ('(null)').
11-28 19:40:53.351 D/Mono    (15284): Searching for 'java_interop_jnienv_throw'.
11-28 19:40:53.351 D/Mono    (15284): Probing 'java_interop_jnienv_throw'.
11-28 19:40:53.351 D/Mono    (15284): Found as 'java_interop_jnienv_throw'.
Unhandled Exception:

System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'Android.Views.GestureDetector'.
Comment 11 Rui Marinho 2017-01-24 11:54:38 UTC
Should be fixed in 2.3.5-pre1
Comment 12 Fokke Vermeulen 2017-01-24 12:48:47 UTC
@Rui Marinho
Does a workaround help for us while waiting for that release?

Why not a hot-fix?
Comment 13 Pete Schmitz 2017-02-08 22:10:56 UTC
Any ETA on the 2.3.5 pre-release?
Comment 14 alperen babagil 2017-02-17 13:10:28 UTC
Same error Xamarin forms v2.3.3.180
Comment 15 williamd 2017-02-24 15:21:04 UTC
This is a crashing issue. Can we get a stable release with this fix please?
Comment 16 Attila Fodor 2017-02-24 15:24:24 UTC
I agree with William.
This is a serious problem.
Comment 17 Attila Fodor 2017-02-24 15:24:43 UTC
I agree with William.
This is a serious problem.
Comment 18 Nikolai Doronin 2017-02-28 08:00:06 UTC
I noticed that new version of Xamarin.Forms was released a few days ago; release notes say it comprises a fix for this issue: https://github.com/xamarin/Xamarin.Forms/releases/tag/release-2.3.3-hf1

But unfortunately, it seems this version is not available via NuGet: https://www.nuget.org/packages/Xamarin.Forms/
Comment 19 williamd 2017-02-28 13:53:31 UTC
I was able to put the nupkg files in my local nuget feed and I can confirm that the problem is fixed in the hotfix.
Comment 20 Pete Schmitz 2017-03-06 18:04:07 UTC
Can we get a nuget release that includes hf1 please? 

https://www.nuget.org/packages/Xamarin.Forms/
Comment 21 Adam 2017-03-07 04:13:34 UTC
Pete if you want a version based off the current master, which seems to be 2.3.4-pre1, with this hotfix, and I removed Windows 8 support, you can use my public feed (https://www.myget.org/F/adpedley/api/v3/index.json) for a package in the meantime.

I also commented on https://github.com/xamarin/Xamarin.Forms/commit/fa12ae1bae967b75f49d0e2643524c45c6a788ed where the fix was committed. I don't believe it has been properly fixed, there is still a small chance it will re-occur and it wasn't fixed in the framerenderer.cs either. There may also be other places.
Comment 22 Pete Schmitz 2017-03-07 17:54:29 UTC
Adam, thanks for taking the time to prepare a package that includes the hotfix. 

However, we're desperate for a stable, official, fix to this problem - it's a bottleneck that's preventing us from patching another issue that a few of our users are encountering in our current release build (https://bugzilla.xamarin.com/show_bug.cgi?id=40486).

For our app, we found that this bug is much more problematic, which forced us to revert our forms package. I feel the severity of this "RESOLVED FIXED" issue is being undermined...
Comment 23 E.Z. Hart 2017-03-07 21:31:57 UTC
Reopening this, as Adam pointed out above this issue is not fixed in FrameRenderer.
Comment 24 Matthew Richardson 2017-03-14 11:51:52 UTC
OK, looks like it also affects PlatformRenderer too.
Was looking through crash analytics on VS Mobile Centre today for our beta, and found 15 crashes with ObjectDisposedException. Stacktrace pointed to PlatformRenderer.DispatchTouchEvent (Android.Views.MotionEvent e) 06b59d59292941ee812f7dbf5408f80c:0.

So in summary...

RESOLVED
VisualElementRenderer.cs

NEEDS FIX
PlatformRenderer.cs
FrameRenderer.cs (TBC)

Note: As a workaround, we found switching Mono GC bridge mode from Tarjan to New worked. Seems Tarjan is a little more aggressive. Not sure if this problem should be reported to the Android platform team?

However defensive coding in the base renderer should prevent the crash.
Comment 25 Britton Beckham 2017-03-15 02:46:41 UTC
It looks like everyone has said enough about this issue, but wanted to let you guys know it's happening for me as well using 2.3.4.212-pre4. Wanted to add my stack trace in case there is some other file you guys over looked. We are eagerly awaiting a fix.... sucks we have to wait for 2.3.5.


JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self)
Cannot access a disposed object. Object name: 'Android.Views.GestureDetector'.

Cannot access a disposed object. Object name: 'Android.Views.GestureDetector'.
1
JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) a043032cf94a485190047a14918b9f60:0
2
JniPeerMembers+JniInstanceMethods.InvokeVirtualBooleanMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) a043032cf94a485190047a14918b9f60:0
3
GestureDetector.OnTouchEvent (Android.Views.MotionEvent ev) 6dcfb9cbdc674d6e80e25233e0b558fb:0
4
IOnTouchListener.OnTouch (Android.Views.View v, Android.Views.MotionEvent e) c446677c81524a0dbb8a7609a30be752:0
5
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) 6dcfb9cbdc674d6e80e25233e0b558fb:0
6
(wrapper dynamic-method) System.Object:b16b3bc0-ddcb-4a51-9f84-6771f35641b9 (intptr,intptr,intptr,intptr)
7
ExceptionDispatchInfo.Throw () 8c304e4006094a46a7950338a3b3cb5d:0
8
JniEnvironment+InstanceMethods.CallNonvirtualBooleanMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniObjectReference type, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) a043032cf94a485190047a14918b9f60:0
9
JniPeerMembers+JniInstanceMethods.InvokeVirtualBooleanMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) a043032cf94a485190047a14918b9f60:0
10
View.DispatchTouchEvent (Android.Views.MotionEvent e) 6dcfb9cbdc674d6e80e25233e0b558fb:0
11
PlatformRenderer.DispatchTouchEvent (Android.Views.MotionEvent e) c446677c81524a0dbb8a7609a30be752:0
12
View.n_DispatchTouchEvent_Landroid_view_MotionEvent_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_e) 6dcfb9cbdc674d6e80e25233e0b558fb:0
13
(wrapper dynamic-method) System.Object:3b610b57-cc98-440d-aeb4-cf5ec08d9a07 (intptr,intptr,intptr)
Comment 26 Rui Marinho 2017-03-22 11:56:19 UTC
Should be fixed on 2.3.4-pre6
Comment 27 MG 2017-05-26 16:31:07 UTC
Hey,
I'm on 2.3.4.247 and I'm facing this issue now, cannot attach the project as it's our production project.

Any thoughts?
Comment 28 MG 2017-05-26 17:15:20 UTC
A full stack trace here:

Xamarin caused by: android.runtime.JavaProxyThrowable: System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'Xamarin.Forms.Platform.Android.FormsTextView'.
  at Java.Interop.JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) [0x00029] in <5716a943049b49ca928a3a1c8d2386f4>:0 
  at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeNonvirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00000] in <5716a943049b49ca928a3a1c8d2386f4>:0 
  at Android.Widget.TextView.set_TextFormatted (Java.Lang.ICharSequence value) [0x00029] in <20a5debecbfd420ba8345429bf71acbe>:0 
  at Android.Widget.TextView.set_Text (System.String value) [0x0000d] in <20a5debecbfd420ba8345429bf71acbe>:0 
  at Xamarin.Forms.Platform.Android.LabelRenderer.UpdateText () [0x00098] in <fb1b373bb41f422cab210b1850374a59>:0 
  at Xamarin.Forms.Platform.Android.LabelRenderer.OnElementPropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e) [0x000c5] in <fb1b373bb41f422cab210b1850374a59>:0 
  at (wrapper delegate-invoke) <Module>:invoke_void_object_PropertyChangedEventArgs (object,System.ComponentModel.PropertyChangedEventArgs)
  at Xamarin.Forms.BindableObject.OnPropertyChanged (System.String propertyName) [0x00012] in <42fe931976e64c199eddde45068a6c09>:0 
  at Xamarin.Forms.Element.OnPropertyChanged (System.String propertyName) [0x00000] in <42fe931976e64c199eddde45068a6c09>:0 
  at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindableObject+BindablePropertyContext context, System.Object value, System.Boolean currentlyApplying, Xamarin.Forms.BindableObject+SetValueFlags attributes, System.Boolean silent) [0x000fb] in <42fe931976e64c199eddde45068a6c09>:0 
  at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.BindableObject+SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes) [0x0014b] in <42fe931976e64c199eddde45068a6c09>:0 
  at Xamarin.Forms.BindingExpression.ApplyCore (System.Object sourceObject, Xamarin.Forms.BindableObject target, Xamarin.Forms.BindableProperty property, System.Boolean fromTarget) [0x001f9] in <42fe931976e64c199eddde45068a6c09>:0 
  at Xamarin.Forms.BindingExpression.Apply (System.Boolean fromTarget) [0x0003e] in <42fe931976e64c199eddde45068a6c09>:0 
  at Xamarin.Forms.BindingExpression+BindingExpressionPart.<PropertyChanged>b__47_0 () [0x00000] in <42fe931976e64c199eddde45068a6c09>:0 
  at Java.Lang.Thread+RunnableImplementor.Run () [0x00008] in <20a5debecbfd420ba8345429bf71acbe>:0 
  at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00008] in <20a5debecbfd420ba8345429bf71acbe>:0 
  at (wrapper dynamic-method) System.Object:7b8cf35f-416c-4a02-9c9f-ecc98cc8906f (intptr,intptr)
	at mono.java.lang.RunnableImplementor.n_run(Native Method)
	at mono.java.lang.RunnableImplementor.run(RunnableImplementor.java:30)
	at android.os.Handler.handleCallback(Handler.java:751)
	at android.os.Handler.dispatchMessage(Handler.java:95)
	at android.os.Looper.loop(Looper.java:154)
	at android.app.ActivityThread.main(ActivityThread.java:6209)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)

Note You need to log in before you can comment on or make changes to this bug.