Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
Created attachment 16283 [details]
I have found an issue where if you have a picker within an Android app, that has AppCompact enabled. Then you tap the picker very rapidly multiple times, as if you were to select an item, multiple dialog windows appear. You can select "Cancel" on every single one, and most of the time the app will remain fine.
The real problem is that if you select an item within the dialog, when multiple windows are present, then the app will crash and throw either a NullReferenceException or a IndexOutOfBoundsException.
I looked into the render to see if there was a problem, and I found that the PickerListener.OnClick function [Line 145] just calls the PickerRenderer.OnClick function [Line 95] which does not preform any check to see if a _dialog window is present. Here is the link to the file that I was looking at: https://github.com/xamarin/Xamarin.Forms/blob/2d9288eee6e6f197364a64308183725e7bd561f9/Xamarin.Forms.Platform.Android/AppCompat/PickerRenderer.cs
I have attached a reproduction app that illustrates the problem, the version of Xamarin.Forms in the app is 188.8.131.5282, but the problem does happen in the latest version as well.
*** Bug 42148 has been marked as a duplicate of this bug. ***
Same problem here. Please fix asap.
Should be fixed for 2.3.2-pre.
I have checked this issue with Xamarin.Forms 2.3.2-pre1 and this issue not appear with latest pre version.
Hence close this issue.
If you still facing same issue, Please feel free to reopen this issue or filed new bug for the same.
Created attachment 26133 [details]
The sample which reproduces the breaking of the application while using picker.
While using picker in the project, we get a breaking issue with the following callstack.
Note: We use Xamarin version 184.108.40.2060
01-19 09:14:06.127 I/MonoDroid( 4730): System.NullReferenceException: Object reference not set to an instance of an object.
01-19 09:14:06.127 I/MonoDroid( 4730): at Xamarin.Forms.Platform.Android.PickerRenderer.<OnClick>b__11_2 (System.Object sender, System.EventArgs args) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\Renderers\PickerRenderer.cs:145
01-19 09:14:06.127 I/MonoDroid( 4730): at Android.Content.IDialogInterfaceOnDismissListenerImplementor.OnDismiss (Android.Content.IDialogInterface dialog) [0x0000d] in /Users/builder/data/lanes/3511/501e63ce/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.Content.IDialogInterface.cs:369
01-19 09:14:06.127 I/MonoDroid( 4730): at Android.Content.IDialogInterfaceOnDismissListenerInvoker.n_OnDismiss_Landroid_content_DialogInterface_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_dialog) [0x00011] in /Users/builder/data/lanes/3511/501e63ce/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.Content.IDialogInterface.cs:334
01-19 09:14:06.127 I/MonoDroid( 4730): at (wrapper dynamic-method) System.Object:d5899a9c-5e40-4345-93bc-a7ffc7e4fda1 (intptr,intptr,intptr)
I have attached a sample that replicates the issue.
Procedure to replicate the issue:
1. In DataGrid, tap a column with GridPicker column(3).
2. When picker appear, tap outside anywhere in the datagrid to dismiss or close the picker.
3. With that, please repeat the steps in #2 and do it as fast as you can.
4. In any seconds, the app will crash.