Bug 38821 - Back-to-back frequent Tapped event invocations on Android crashes app
Summary: Back-to-back frequent Tapped event invocations on Android crashes app
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.0.0
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-02-16 22:56 UTC by adrianknight89
Modified: 2016-08-25 16:28 UTC (History)
5 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description adrianknight89 2016-02-16 22:56:01 UTC
I'm still trying to repro this. I will upload code if I can easily reproduce the issue. I have a ContentView on a Grid with a Tapped event attached to it. If I tap on it many times in a short time interval, Android will crash with a useless platform specific exception (iOS seems to be working fine):


Unhandled Exception:

System.NullReferenceException: Object reference not set to an instance of an object

02-17 00:46:13.511 I/MonoDroid(32151): UNHANDLED EXCEPTION:
02-17 00:46:13.511 I/MonoDroid(32151): System.NullReferenceException: Object reference not set to an instance of an object
02-17 00:46:13.511 I/MonoDroid(32151):   at (wrapper dynamic-method) System.Object:de0d5658-c1e5-4682-9df6-345ce9101ec1 (intptr,intptr,intptr,intptr,single,single)
02-17 00:46:13.511 I/MonoDroid(32151):   at (wrapper native-to-managed) System.Object:de0d5658-c1e5-4682-9df6-345ce9101ec1 (intptr,intptr,intptr,intptr,single,single)
02-17 00:46:13.511 I/MonoDroid(32151):   at (wrapper managed-to-native) System.Object:wrapper_native_0xf4594d0d (intptr,intptr,intptr,Android.Runtime.JValue*)
02-17 00:46:13.511 I/MonoDroid(32151):   at (wrapper delegate-invoke) <Module>:invoke_bool_intptr_intptr_intptr_JValue* (intptr,intptr,intptr,Android.Runtime.JValue*)
02-17 00:46:13.511 I/MonoDroid(32151):   at Android.Runtime.JNIEnv.CallBooleanMethod (IntPtr jobject, IntPtr jmethod, Android.Runtime.JValue* parms) [0x00040] in /Users/builder/data/lanes/2512/d3008455/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:232 
02-17 00:46:13.511 I/MonoDroid(32151):   at Android.Views.GestureDetector.OnTouchEvent (Android.Views.MotionEvent ev) [0x0005a] in /Users/builder/data/lanes/2512/d3008455/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.Views.GestureDetector.cs:1661 
02-17 00:46:13.511 I/MonoDroid(32151):   at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Android.Views.View.IOnTouchListener.OnTouch (Android.Views.View v, Android.Views.MotionEvent e) [0x00046] in <filename unknown>:0 
02-17 00:46:13.511 I/MonoDroid(32151):   at Android.Views.View+IOnTouchListenerInvoker.n_OnTouch_Landroid_view_View_Landroid_view_MotionEvent_ (IntPtr jnienv, IntPtr native__this, IntPtr native_v, IntPtr native_e) [0x00019] in /Users/builder/data/lanes/2512/d3008455/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.Views.View.cs:3547 
02-17 00:46:13.511 I/MonoDroid(32151):   at (wrapper dynamic-method) System.Object:1dea5271-98d3-4427-bf14-037407fad5a3 (intptr,intptr,intptr,intptr)
02-17 00:46:13.511 E/mono-rt (32151): Stacktrace:
02-17 00:46:13.511 E/mono-rt (32151): 
02-17 00:46:13.511 E/mono-rt (32151):   at <unknown> <0xffffffff>
02-17 00:46:13.511 E/mono-rt (32151):   at (wrapper managed-to-native) object.wrapper_native_0xf459813d (intptr,intptr,int) <IL 0x0002b, 0xffffffff>
02-17 00:46:13.511 E/mono-rt (32151):   at Android.Runtime.JNIEnv.NewString (string) [0x00017] in /Users/builder/data/lanes/2512/d3008455/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.cs:791
02-17 00:46:13.511 E/mono-rt (32151):   at Java.Lang.Throwable..ctor (string) [0x00022] in /Users/builder/data/lanes/2512/d3008455/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Java.Lang.Throwable.cs:55
02-17 00:46:13.511 E/mono-rt (32151):   at Android.Runtime.JavaProxyThrowable..ctor (System.Exception) [0x00000] in /Users/builder/data/lanes/2512/d3008455/source/monodroid/src/Mono.Android/src/Runtime/JavaProxyThrowable.cs:10
02-17 00:46:13.511 E/mono-rt (32151):   at Java.Lang.Throwable.FromException (System.Exception) [0x00023] in /Users/builder/data/lanes/2512/d3008455/source/monodroid/src/Mono.Android/src/Java.Lang/Throwable.cs:148
02-17 00:46:13.511 E/mono-rt (32151):   at Android.Runtime.AndroidEnvironment.UnhandledException (System.Exception) [0x0007e] in /Users/builder/data/lanes/2512/d3008455/source/monodroid/src/Mono.Android/src/Runtime/AndroidEnvironment.cs:114
02-17 00:46:13.511 E/mono-rt (32151):   at (wrapper dynamic-method) object.1dea5271-98d3-4427-bf14-037407fad5a3 (intptr,intptr,intptr,intptr) <IL 0x00036, 0x000b7>
02-17 00:46:13.511 E/mono-rt (32151):   at (wrapper native-to-managed) object.1dea5271-98d3-4427-bf14-037407fad5a3 (intptr,intptr,intptr,intptr) <IL 0x0002a, 0xffffffff>
02-17 00:46:13.511 E/mono-rt (32151):   at <unknown> <0xffffffff>
02-17 00:46:13.511 E/mono-rt (32151):   at (wrapper managed-to-native) object.wrapper_native_0xf4594f09 (intptr,intptr,intptr,intptr,Android.Runtime.JValue*) <IL 0x0002e, 0xffffffff>
02-17 00:46:13.511 E/mono-rt (32151):   at (wrapper delegate-invoke) <Module>.invoke_bool_intptr_intptr_intptr_intptr_JValue* (intptr,intptr,intptr,intptr,Android.Runtime.JValue*) <IL 0x00087, 0xffffffff>
02-17 00:46:13.511 E/mono-rt (32151):   at Android.Runtime.JNIEnv.CallNonvirtualBooleanMethod (intptr,intptr,intptr,Android.Runtime.JValue*) [0x00060] in /Users/builder/data/lanes/2512/d3008455/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:658
02-17 00:46:13.511 E/mono-rt (32151):   at Android.Views.View.DispatchTouchEvent (Android.Views.MotionEvent) [0x00071] in /Users/builder/data/lanes/2512/d3008455/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.Views.View.cs:14093
02-17 00:46:13.511 E/mono-rt (32151):   at Xamarin.Forms.Platform.Android.PlatformRenderer.DispatchTouchEvent (Android.Views.MotionEvent) <IL 0x00037, 0x00313>
02-17 00:46:13.511 E/mono-rt (32151):   at Android.Views.View.n_DispatchTouchEvent_Landroid_view_MotionEvent_ (intptr,intptr,intptr) [0x00011] in /Users/builder/data/lanes/2512/d3008455/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.Views.View.cs:14073
02-17 00:46:13.511 E/mono-rt (32151):   at (wrapper dynamic-method) object.713fd5f9-34c1-4c3b-99ec-62527483efba (intptr,intptr,intptr) <IL 0x00017, 0x00053>
02-17 00:46:13.511 E/mono-rt (32151):   at (wrapper native-to-managed) object.713fd5f9-34c1-4c3b-99ec-62527483efba (intptr,intptr,intptr) <IL 0x00029, 0xffffffff>
02-17 00:46:13.511 E/mono-rt (32151): 
02-17 00:46:13.511 E/mono-rt (32151): Attempting native Android stacktrace:
02-17 00:46:13.511 E/mono-rt (32151): 
02-17 00:46:13.531 E/mono-rt (32151):  at ???+4147263908 [0x0]
02-17 00:46:13.541 E/mono-rt (32151):  at ???+4147263908 [0xf47ff050]
02-17 00:46:13.541 E/mono-rt (32151): 
02-17 00:46:13.541 E/mono-rt (32151): =================================================================
02-17 00:46:13.541 E/mono-rt (32151): Got a SIGSEGV while executing native code. This usually indicates
02-17 00:46:13.541 E/mono-rt (32151): a fatal error in the mono runtime or one of the native libraries 
02-17 00:46:13.541 E/mono-rt (32151): used by your application.
02-17 00:46:13.541 E/mono-rt (32151): =================================================================
02-17 00:46:13.541 E/mono-rt (32151): 
02-17 00:46:13.541 F/libc    (32151): Fatal signal 11 (SIGSEGV), code 1, fault addr 0x3e in tid 32151 (urcompany.App26)
Comment 1 adrianknight89 2016-02-20 20:21:12 UTC
I noticed this happens when the title bar is hidden.
Comment 2 adrianknight89 2016-08-25 16:28:35 UTC
must be fixed in one of the recent xamarin android updates.