Bug 56577 - Crash in Android DatePickerRenderer
Summary: Crash in Android DatePickerRenderer
Status: RESOLVED DUPLICATE of bug 58665
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.3.4
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Paul DiPietro [MSFT]
Depends on:
Reported: 2017-05-17 19:44 UTC by daniel.bergquist
Modified: 2017-08-30 20:15 UTC (History)
5 users (show)

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:

Description daniel.bergquist 2017-05-17 19:44:52 UTC
In my app any time I select a date and dismiss the picker on Android, I get a crash within Forms. This doesn't appear to happen when creating a new Forms project and adding a date picker, so I don't have a simple test case that I can attach. I am getting this both on and

System.NullReferenceException: Object reference not set to an instance of an object.
  at Xamarin.Forms.Platform.Android.DatePickerRenderer+<>c__DisplayClass9_0.<CreateDatePickerDialog>b__0 (System.Object o, Android.App.DatePickerDialog+DateSetEventArgs e) [0x00027] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\Renderers\DatePickerRenderer.cs:110
  at Android.App.DatePickerDialog+IOnDateSetListenerImplementor.OnDateSet (Android.Widget.DatePicker view, System.Int32 year, System.Int32 month, System.Int32 dayOfMonth) [0x00015] in <33e6e739ac344166b157e323586f11a1>:0
  at Android.App.DatePickerDialog+IOnDateSetListenerInvoker.n_OnDateSet_Landroid_widget_DatePicker_III (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_view, System.Int32 year, System.Int32 month, System.Int32 dayOfMonth) [0x0000f] in <33e6e739ac344166b157e323586f11a1>:0
  at at (wrapper dynamic-method) System.Object:45c1ee1c-a180-490a-b6b3-bc57ce6fc259 (intptr,intptr,intptr,int,int,int)
Comment 1 Paul DiPietro [MSFT] 2017-05-18 13:31:33 UTC
Are you experiencing the issue on the prerelease or nightly? If you eventually find that you can reliably reproduce the issue, uploading a reproduction project would help.
Comment 2 daniel.bergquist 2017-05-18 14:00:50 UTC
Both of those versions I got from the stable nuget. I have not tried any other version.
Comment 3 daniel.bergquist 2017-05-31 21:18:08 UTC
Still happens in
Comment 4 Paul DiPietro [MSFT] 2017-05-31 21:38:00 UTC
We can't really do anything here without a reproduction project.
Comment 5 Paul DiPietro [MSFT] 2017-06-19 18:28:10 UTC
This issue will be closed due to a lack of response, so we'll reasonably assume that this is no longer an issue. Please reopen this and attach a minimized reproduction project if the issue still exists as of the latest prerelease or nightly build.
Comment 6 Phuc Pham 2017-08-30 18:20:20 UTC
Here is the sample code and steps to reproduce this.  

Code : https://github.com/ojasteredesai/ZCMobileDemo.Lite/tree/master/ZCMobileDemo.Lite

Steps : 

Below are the Steps to Reproduce the issue on Android Platform.
1.) Run the app via above repository on Android device
2.) Click on GO TO LOGIN TYPE PAGE button
3.) Click on GO TO LOGIN PAGE button
4.) Click on Text Field that will open Time Picker
5.) Select time and click on OK button it will crash the app

We have also created the bug regarding this issue at Bugzilla and below is URL for that

Please let me know if you need more info.
Comment 7 Andrew Way 2017-08-30 18:34:15 UTC
Reopening per customer request.
Comment 8 Andrew Way 2017-08-30 20:15:04 UTC

*** This bug has been marked as a duplicate of bug 58665 ***